From 2b5f3c9a9f817908ca4810d60cccbee548944a94 Mon Sep 17 00:00:00 2001 From: Lukasz Szaszkiewicz Date: Thu, 26 Mar 2020 21:57:23 +0100 Subject: [PATCH 1/3] uses encryption controllers from apiservercontrollerset --- pkg/operator/starter.go | 58 +++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/pkg/operator/starter.go b/pkg/operator/starter.go index dbb313c51..5f8291477 100644 --- a/pkg/operator/starter.go +++ b/pkg/operator/starter.go @@ -14,7 +14,6 @@ import ( operatorv1client "github.com/openshift/client-go/operator/clientset/versioned" operatorv1informers "github.com/openshift/client-go/operator/informers/externalversions" "github.com/openshift/library-go/pkg/controller/controllercmd" - "github.com/openshift/library-go/pkg/operator/encryption" "github.com/openshift/library-go/pkg/operator/encryption/controllers/migrators" encryptiondeployer "github.com/openshift/library-go/pkg/operator/encryption/deployer" "github.com/openshift/library-go/pkg/operator/events" @@ -106,6 +105,18 @@ func RunOperator(ctx context.Context, controllerConfig *controllercmd.Controller versionRecorder.SetVersion("operator", os.Getenv("OPERATOR_IMAGE_VERSION")) nodeInformer := kubeInformersForNamespaces.InformersFor("").Core().V1().Nodes() + nodeProvider := DeploymentNodeProvider{ + TargetNamespaceDeploymentInformer: kubeInformersForNamespaces.InformersFor(operatorclient.TargetNamespace).Apps().V1().Deployments(), + NodeInformer: nodeInformer, + } + deployer, err := encryptiondeployer.NewRevisionLabelPodDeployer("revision", operatorclient.TargetNamespace, kubeInformersForNamespaces, resourceSyncController, kubeClient.CoreV1(), kubeClient.CoreV1(), nodeProvider) + if err != nil { + return err + } + + migrationClient := kubemigratorclient.NewForConfigOrDie(controllerConfig.KubeConfig) + migrationInformer := migrationv1alpha1informer.NewSharedInformerFactory(migrationClient, time.Minute*30) + migrator := migrators.NewKubeStorageVersionMigrator(migrationClient, migrationInformer.Migration().V1alpha1(), kubeClient.Discovery()) openShiftAPIServerWorkload := operatorworkload.NewOpenShiftAPIServerWorkload( operatorClient, @@ -195,6 +206,17 @@ func RunOperator(ctx context.Context, controllerConfig *controllercmd.Controller OpenshiftDeploymentLatestRevisionClient{OperatorClient: operatorClient, TypedClient: operatorConfigClient.OperatorV1()}, v1helpers.CachedConfigMapGetter(kubeClient.CoreV1(), kubeInformersForNamespaces), v1helpers.CachedSecretGetter(kubeClient.CoreV1(), kubeInformersForNamespaces), + ).WithEncryptionControllers( + operatorclient.TargetNamespace, + deployer, + migrator, + kubeClient.CoreV1(), + configClient.ConfigV1().APIServers(), + configInformers.Config().V1().APIServers(), + kubeInformersForNamespaces, + schema.GroupResource{Group: "route.openshift.io", Resource: "routes"}, // routes can contain embedded TLS private keys + schema.GroupResource{Group: "oauth.openshift.io", Resource: "oauthaccesstokens"}, + schema.GroupResource{Group: "oauth.openshift.io", Resource: "oauthauthorizetokens"}, ).WithConfigUpgradableController(). WithLogLevelController() @@ -213,38 +235,6 @@ func RunOperator(ctx context.Context, controllerConfig *controllercmd.Controller controllerConfig.EventRecorder, ) - nodeProvider := DeploymentNodeProvider{ - TargetNamespaceDeploymentInformer: kubeInformersForNamespaces.InformersFor(operatorclient.TargetNamespace).Apps().V1().Deployments(), - NodeInformer: nodeInformer, - } - - deployer, err := encryptiondeployer.NewRevisionLabelPodDeployer("revision", operatorclient.TargetNamespace, kubeInformersForNamespaces, resourceSyncController, kubeClient.CoreV1(), kubeClient.CoreV1(), nodeProvider) - if err != nil { - return err - } - - migrationClient := kubemigratorclient.NewForConfigOrDie(controllerConfig.KubeConfig) - migrationInformer := migrationv1alpha1informer.NewSharedInformerFactory(migrationClient, time.Minute*30) - migrator := migrators.NewKubeStorageVersionMigrator(migrationClient, migrationInformer.Migration().V1alpha1(), kubeClient.Discovery()) - - encryptionControllers, err := encryption.NewControllers( - operatorclient.TargetNamespace, - deployer, - migrator, - operatorClient, - configClient.ConfigV1().APIServers(), - configInformers.Config().V1().APIServers(), - kubeInformersForNamespaces, - kubeClient.CoreV1(), - controllerConfig.EventRecorder, - schema.GroupResource{Group: "route.openshift.io", Resource: "routes"}, // routes can contain embedded TLS private keys - schema.GroupResource{Group: "oauth.openshift.io", Resource: "oauthaccesstokens"}, - schema.GroupResource{Group: "oauth.openshift.io", Resource: "oauthauthorizetokens"}, - ) - if err != nil { - return err - } - pruneController := prune.NewPruneController( operatorclient.TargetNamespace, []string{"encryption-config-"}, @@ -284,10 +274,10 @@ func RunOperator(ctx context.Context, controllerConfig *controllercmd.Controller configInformers.Start(ctx.Done()) dynamicInformers.Start(ctx.Done()) migrationInformer.Start(ctx.Done()) + migrationInformer.Start(ctx.Done()) go configObserver.Run(ctx, 1) go resourceSyncController.Run(ctx, 1) - go encryptionControllers.Run(ctx, 1) go pruneController.Run(ctx, 1) go runnableAPIServerControllers.Run(ctx) go staleConditions.Run(ctx, 1) From a531732a4949a76cb4ed401b4c1bce5df14ea6c6 Mon Sep 17 00:00:00 2001 From: Lukasz Szaszkiewicz Date: Fri, 27 Mar 2020 14:27:33 +0100 Subject: [PATCH 2/3] updates openshift/library-go version --- go.mod | 18 +++++++++--------- go.sum | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 8ceff05fe..77a7b3f75 100644 --- a/go.mod +++ b/go.mod @@ -9,23 +9,23 @@ require ( github.com/gonum/graph v0.0.0-20170401004347-50b27dea7ebb github.com/jteeuwen/go-bindata v3.0.8-0.20151023091102-a0ff2567cfb7+incompatible github.com/kubernetes-sigs/kube-storage-version-migrator v0.0.0-20191127225502-51849bc15f17 - github.com/openshift/api v0.0.0-20200320142426-0de0d539b0c3 + github.com/openshift/api v0.0.0-20200326160804-ecb9283fe820 github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160 - github.com/openshift/client-go v0.0.0-20200320150128-a906f3d8e723 - github.com/openshift/library-go v0.0.0-20200325084904-c4f5592456b1 + github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0 + github.com/openshift/library-go v0.0.0-20200327125526-163b2f0d6264 github.com/spf13/cobra v0.0.5 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.4.0 go.uber.org/atomic v1.3.3-0.20181018215023-8dc6146f7569 // indirect go.uber.org/multierr v1.1.1-0.20180122172545-ddea229ff1df // indirect gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e // indirect - k8s.io/api v0.18.0-beta.2 - k8s.io/apimachinery v0.18.0-beta.2 - k8s.io/client-go v0.18.0-beta.2 - k8s.io/component-base v0.18.0-beta.2 + k8s.io/api v0.18.0 + k8s.io/apimachinery v0.18.0 + k8s.io/client-go v0.18.0 + k8s.io/component-base v0.18.0 k8s.io/klog v1.0.0 - k8s.io/kube-aggregator v0.18.0-beta.2 - k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab + k8s.io/kube-aggregator v0.18.0 + k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 // indirect ) diff --git a/go.sum b/go.sum index b8c990bef..194397488 100644 --- a/go.sum +++ b/go.sum @@ -323,18 +323,23 @@ github.com/openshift/api v0.0.0-20200210091934-a0e53e94816b h1:BERD6sZj7w9Tt0RBp github.com/openshift/api v0.0.0-20200210091934-a0e53e94816b/go.mod h1:fT6U/JfG8uZzemTRwZA2kBDJP5nWz7v05UHnty/D+pk= github.com/openshift/api v0.0.0-20200320142426-0de0d539b0c3 h1:Ve2X8syACVcXONmT6jxdZqdAkZO3bkN6o78nZ/H1DiQ= github.com/openshift/api v0.0.0-20200320142426-0de0d539b0c3/go.mod h1:7k3+uZYOir97walbYUqApHUA2OPhkQpVJHt0n7GJ6P4= +github.com/openshift/api v0.0.0-20200326152221-912866ddb162/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE= +github.com/openshift/api v0.0.0-20200326160804-ecb9283fe820/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE= github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160 h1:V4E6yt4XWiBEPKnJbs/E8pgUq9AjZqzQfsL3eeT84Qs= github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc= github.com/openshift/client-go v0.0.0-20200116152001-92a2713fa240 h1:XYfJWv2Ch+qInGLDEedHRtDsJwnxyU1L8U7SY56NcA8= github.com/openshift/client-go v0.0.0-20200116152001-92a2713fa240/go.mod h1:4riOwdj99Hd/q+iAcJZfNCsQQQMwURnZV6RL4WHYS5w= github.com/openshift/client-go v0.0.0-20200320150128-a906f3d8e723 h1:FfrELmZ9N9NtVE15qmTRkJIETX75QHdr65xiuTKvNYo= github.com/openshift/client-go v0.0.0-20200320150128-a906f3d8e723/go.mod h1:wNBSSt4RZTHhUWyhBE3gxTR32QpF9DB2SfS14u2IxuE= +github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0/go.mod h1:uUQ4LClRO+fg5MF/P6QxjMCb1C9f7Oh4RKepftDnEJE= github.com/openshift/kubernetes-kube-storage-version-migrator v0.0.3-0.20200312103335-32e07ea4f8ca h1:YNtyJnE53QuEUSjl7L1AARocI021o7cU2bvh4prDtiE= github.com/openshift/kubernetes-kube-storage-version-migrator v0.0.3-0.20200312103335-32e07ea4f8ca/go.mod h1:unEnEWccGeVxaXSRsWTjRsNxMqYXmuQjzjcPFQ91H9M= github.com/openshift/library-go v0.0.0-20200318085456-5071c92bad8c h1:eNDB3aBssuvOKsg+KHLt8CDlCMOfbWf/KSMOGGF6+t8= github.com/openshift/library-go v0.0.0-20200318085456-5071c92bad8c/go.mod h1:OmQif4QBSpapk+JQ8aIIbaCRCCV92Dyt45lH+Os+OvM= github.com/openshift/library-go v0.0.0-20200325084904-c4f5592456b1 h1:Pipy7EvuE3jg7Ob2P5o+8JsMTAYkvSzInl5u29ZdEEU= github.com/openshift/library-go v0.0.0-20200325084904-c4f5592456b1/go.mod h1:Qc5duoXHzAKyUfA0REIlG/rdfWzknOpp9SiDiyg5Y7A= +github.com/openshift/library-go v0.0.0-20200327125526-163b2f0d6264 h1:VcZjTupwjxB9ANlKxerMNdfjqlTBWrVxgrjKi7VBwOY= +github.com/openshift/library-go v0.0.0-20200327125526-163b2f0d6264/go.mod h1:CfydoH0B+RYs22uQZQ36A1mz5m5zhucpMGh8t5s71v4= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -592,30 +597,37 @@ k8s.io/api v0.17.2 h1:NF1UFXcKN7/OOv1uxdRz3qfra8AHsPav5M93hlV9+Dc= k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= k8s.io/api v0.18.0-beta.2 h1:SK0PKYvDWhLz32ayrfQ1OSmEgz3sH6RvCtXpaBrv2ao= k8s.io/api v0.18.0-beta.2/go.mod h1:2oeNnWEqcSmaM/ibSh3t7xcIqbkGXhzZdn4ezV9T4m0= +k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= k8s.io/apiextensions-apiserver v0.17.1 h1:Gw6zQgmKyyNrFMtVpRBNEKE8p35sDBI7Tq1ImxGS+zU= k8s.io/apiextensions-apiserver v0.17.1/go.mod h1:DRIFH5x3jalE4rE7JP0MQKby9zdYk9lUJQuMmp+M/L0= k8s.io/apiextensions-apiserver v0.18.0-beta.2 h1:BnuFwNZwtBxQ/r+4P9IKOu8huYW9pYJWezQ4WnoQcI8= k8s.io/apiextensions-apiserver v0.18.0-beta.2/go.mod h1:Hnrg5jx8/PbxRbUoqDGxtQkULjwx8FDW4WYJaKNK+fk= +k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo= k8s.io/apimachinery v0.17.1 h1:zUjS3szTxoUjTDYNvdFkYt2uMEXLcthcbp+7uZvWhYM= k8s.io/apimachinery v0.17.1/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/apimachinery v0.18.0-beta.2 h1:KR/mjplxzpYK/3tYez9iE4j9vMWKLSN3E2cZQqd/3KQ= k8s.io/apimachinery v0.18.0-beta.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apiserver v0.17.1 h1:0cuh5kfAFPG2ImKT0rdNwdbPMUwDEfja14zX67V7eBQ= k8s.io/apiserver v0.17.1/go.mod h1:BQEUObJv8H6ZYO7DeKI5vb50tjk6paRJ4ZhSyJsiSco= k8s.io/apiserver v0.18.0-beta.2 h1:UsErgJmZXL8ZwfjTN/sknOxH97nwNSoqS6osu7iL7u0= k8s.io/apiserver v0.18.0-beta.2/go.mod h1:bnblMkMoCFnIfVnVftd0SXJPzyvrk3RtaqSbblphF/A= +k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw= k8s.io/client-go v0.17.1 h1:LbbuZ5tI7OYx4et5DfRFcJuoojvpYO0c7vps2rgJsHY= k8s.io/client-go v0.17.1/go.mod h1:HZtHJSC/VuSHcETN9QA5QDZky1tXiYrkF/7t7vRpO1A= k8s.io/client-go v0.18.0-beta.2 h1:7LXqrIxTryiPQLsQjr/8DIcIC1qhI8eSqNaaM05o6Q8= k8s.io/client-go v0.18.0-beta.2/go.mod h1:UvuVxHjKWIcgy0iMvF+bwNDW7l0mskTNOaOW1Qv5BMA= +k8s.io/client-go v0.18.0/go.mod h1:uQSYDYs4WhVZ9i6AIoEZuwUggLVEF64HOD37boKAtF8= k8s.io/code-generator v0.17.1/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= k8s.io/code-generator v0.18.0-beta.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/component-base v0.17.1 h1:lK/lUzZZQK+DlH0XD+gq610OUEmjWOyDuUYOTGetw10= k8s.io/component-base v0.17.1/go.mod h1:LrBPZkXtlvGjBzDJa0+b7E5Ij4VoAAKrOGudRC5z2eY= k8s.io/component-base v0.18.0-beta.2 h1:f2D8WjS20nJUL/Bi4cWDrWCSh1gTbnSatq/n0FqSX+c= k8s.io/component-base v0.18.0-beta.2/go.mod h1:HVk5FpRnyzQ/MjBr9//e/yEBjTVa2qjGXCTuUzcD7ks= +k8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -627,6 +639,7 @@ k8s.io/kube-aggregator v0.17.1 h1:t/kREQckXfnUnF+fl8fD8c+p30HTrvfGnWE5XWSjj38= k8s.io/kube-aggregator v0.17.1/go.mod h1:H5LcB3fx+P1gpowuZpzDu5B1XfABdO7JBKyB9J9bt34= k8s.io/kube-aggregator v0.18.0-beta.2 h1:2R1770iXAi+TfkUdJzFs5ryUfAn1KW0+jVWRGvIgINA= k8s.io/kube-aggregator v0.18.0-beta.2/go.mod h1:O3Td9mheraINbLHH4pzoFP2gRzG0Wk1COqzdSL4rBPk= +k8s.io/kube-aggregator v0.18.0/go.mod h1:ateewQ5QbjMZF/dihEFXwaEwoA4v/mayRvzfmvb6eqI= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c h1:/KUFqjjqAcY4Us6luF5RDNZ16KJtb49HfR3ZHB9qYXM= @@ -635,6 +648,7 @@ k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCui k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab h1:I3f2hcBrepGRXI1z4sukzAb8w1R4eqbsHrAsx06LGYM= k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= From 4d71039832105c7eafe39f6cf87bdf303b290785 Mon Sep 17 00:00:00 2001 From: Lukasz Szaszkiewicz Date: Fri, 27 Mar 2020 14:28:38 +0100 Subject: [PATCH 3/3] bump (*) --- go.sum | 10 ++ .../github.com/openshift/api/Dockerfile.build | 2 +- .../api/config/v1/types_operatorhub.go | 1 + vendor/github.com/openshift/api/go.mod | 6 +- vendor/github.com/openshift/api/go.sum | 13 +- ...000_10_config-operator_01_config.crd.yaml} | 14 +- ...authentication-operator_01_config.crd.yaml | 11 ++ ...roller-manager-operator_02_config.crd.yaml | 137 -------------- .../api/operator/v1/types_authentication.go | 15 +- .../openshift/api/operator/v1/types_config.go | 43 +++++ .../v1/types_servicecatalogapiserver.go | 2 + .../types_servicecatalogcontrollermanager.go | 2 + .../api/operator/v1/zz_generated.deepcopy.go | 112 ++++++++++++ .../v1/zz_generated.swagger_doc_generated.go | 36 +++- .../openshift/api/route/v1/types.go | 6 +- .../typed/config/v1/config_client.go | 5 + .../config/v1/fake/fake_config_client.go | 4 + .../typed/config/v1/fake/fake_operatorhub.go | 117 ++++++++++++ .../typed/config/v1/generated_expansion.go | 2 + .../versioned/typed/config/v1/operatorhub.go | 168 ++++++++++++++++++ .../externalversions/config/v1/interface.go | 7 + .../externalversions/config/v1/operatorhub.go | 73 ++++++++ .../informers/externalversions/generic.go | 2 + .../listers/config/v1/expansion_generated.go | 4 + .../config/listers/config/v1/operatorhub.go | 49 +++++ .../pkg/controller/factory/base_controller.go | 47 ++++- .../pkg/controller/factory/factory.go | 20 ++- .../controllerset/apiservercontrollerset.go | 44 ++++- .../pkg/operator/encryption/controllers.go | 4 +- .../resource/resourceapply/storage.go | 31 ++++ .../operator/resource/resourceread/storage.go | 15 +- .../api/networking/v1beta1/generated.proto | 7 +- vendor/k8s.io/api/networking/v1beta1/types.go | 7 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../apimachinery/pkg/apis/meta/v1/helpers.go | 4 +- .../apiserver/pkg/storage/etcd3/store.go | 30 +++- vendor/k8s.io/utils/net/net.go | 16 +- vendor/k8s.io/utils/net/port.go | 137 ++++++++++++++ vendor/modules.txt | 22 +-- 39 files changed, 1012 insertions(+), 215 deletions(-) rename vendor/github.com/openshift/api/operator/v1/{0000_50_cluster-svcat-apiserver-operator_02_config.crd.yaml => 0000_10_config-operator_01_config.crd.yaml} (93%) delete mode 100644 vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-controller-manager-operator_02_config.crd.yaml create mode 100644 vendor/github.com/openshift/api/operator/v1/types_config.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/fake/fake_operatorhub.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/operatorhub.go create mode 100644 vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/operatorhub.go create mode 100644 vendor/github.com/openshift/client-go/config/listers/config/v1/operatorhub.go create mode 100644 vendor/k8s.io/utils/net/port.go diff --git a/go.sum b/go.sum index 194397488..3204c17f8 100644 --- a/go.sum +++ b/go.sum @@ -324,6 +324,7 @@ github.com/openshift/api v0.0.0-20200210091934-a0e53e94816b/go.mod h1:fT6U/JfG8u github.com/openshift/api v0.0.0-20200320142426-0de0d539b0c3 h1:Ve2X8syACVcXONmT6jxdZqdAkZO3bkN6o78nZ/H1DiQ= github.com/openshift/api v0.0.0-20200320142426-0de0d539b0c3/go.mod h1:7k3+uZYOir97walbYUqApHUA2OPhkQpVJHt0n7GJ6P4= github.com/openshift/api v0.0.0-20200326152221-912866ddb162/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE= +github.com/openshift/api v0.0.0-20200326160804-ecb9283fe820 h1:pEmlKM0gcAPwPEOUt0JOMBd+3bDEOaSZLdvPTm2eU6E= github.com/openshift/api v0.0.0-20200326160804-ecb9283fe820/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE= github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160 h1:V4E6yt4XWiBEPKnJbs/E8pgUq9AjZqzQfsL3eeT84Qs= github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc= @@ -331,6 +332,7 @@ github.com/openshift/client-go v0.0.0-20200116152001-92a2713fa240 h1:XYfJWv2Ch+q github.com/openshift/client-go v0.0.0-20200116152001-92a2713fa240/go.mod h1:4riOwdj99Hd/q+iAcJZfNCsQQQMwURnZV6RL4WHYS5w= github.com/openshift/client-go v0.0.0-20200320150128-a906f3d8e723 h1:FfrELmZ9N9NtVE15qmTRkJIETX75QHdr65xiuTKvNYo= github.com/openshift/client-go v0.0.0-20200320150128-a906f3d8e723/go.mod h1:wNBSSt4RZTHhUWyhBE3gxTR32QpF9DB2SfS14u2IxuE= +github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0 h1:kMiuiZXH1GdfbiMwsuAQOqGaMxlo9NCUk0wT4XAdfNM= github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0/go.mod h1:uUQ4LClRO+fg5MF/P6QxjMCb1C9f7Oh4RKepftDnEJE= github.com/openshift/kubernetes-kube-storage-version-migrator v0.0.3-0.20200312103335-32e07ea4f8ca h1:YNtyJnE53QuEUSjl7L1AARocI021o7cU2bvh4prDtiE= github.com/openshift/kubernetes-kube-storage-version-migrator v0.0.3-0.20200312103335-32e07ea4f8ca/go.mod h1:unEnEWccGeVxaXSRsWTjRsNxMqYXmuQjzjcPFQ91H9M= @@ -597,11 +599,13 @@ k8s.io/api v0.17.2 h1:NF1UFXcKN7/OOv1uxdRz3qfra8AHsPav5M93hlV9+Dc= k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= k8s.io/api v0.18.0-beta.2 h1:SK0PKYvDWhLz32ayrfQ1OSmEgz3sH6RvCtXpaBrv2ao= k8s.io/api v0.18.0-beta.2/go.mod h1:2oeNnWEqcSmaM/ibSh3t7xcIqbkGXhzZdn4ezV9T4m0= +k8s.io/api v0.18.0 h1:lwYk8Vt7rsVTwjRU6pzEsa9YNhThbmbocQlKvNBB4EQ= k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= k8s.io/apiextensions-apiserver v0.17.1 h1:Gw6zQgmKyyNrFMtVpRBNEKE8p35sDBI7Tq1ImxGS+zU= k8s.io/apiextensions-apiserver v0.17.1/go.mod h1:DRIFH5x3jalE4rE7JP0MQKby9zdYk9lUJQuMmp+M/L0= k8s.io/apiextensions-apiserver v0.18.0-beta.2 h1:BnuFwNZwtBxQ/r+4P9IKOu8huYW9pYJWezQ4WnoQcI8= k8s.io/apiextensions-apiserver v0.18.0-beta.2/go.mod h1:Hnrg5jx8/PbxRbUoqDGxtQkULjwx8FDW4WYJaKNK+fk= +k8s.io/apiextensions-apiserver v0.18.0 h1:HN4/P8vpGZFvB5SOMuPPH2Wt9Y/ryX+KRvIyAkchu1Q= k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo= k8s.io/apimachinery v0.17.1 h1:zUjS3szTxoUjTDYNvdFkYt2uMEXLcthcbp+7uZvWhYM= k8s.io/apimachinery v0.17.1/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= @@ -609,16 +613,19 @@ k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/apimachinery v0.18.0-beta.2 h1:KR/mjplxzpYK/3tYez9iE4j9vMWKLSN3E2cZQqd/3KQ= k8s.io/apimachinery v0.18.0-beta.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apimachinery v0.18.0 h1:fuPfYpk3cs1Okp/515pAf0dNhL66+8zk8RLbSX+EgAE= k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apiserver v0.17.1 h1:0cuh5kfAFPG2ImKT0rdNwdbPMUwDEfja14zX67V7eBQ= k8s.io/apiserver v0.17.1/go.mod h1:BQEUObJv8H6ZYO7DeKI5vb50tjk6paRJ4ZhSyJsiSco= k8s.io/apiserver v0.18.0-beta.2 h1:UsErgJmZXL8ZwfjTN/sknOxH97nwNSoqS6osu7iL7u0= k8s.io/apiserver v0.18.0-beta.2/go.mod h1:bnblMkMoCFnIfVnVftd0SXJPzyvrk3RtaqSbblphF/A= +k8s.io/apiserver v0.18.0 h1:ELAWpGWC6XdbRLi5lwAbEbvksD7hkXxPdxaJsdpist4= k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw= k8s.io/client-go v0.17.1 h1:LbbuZ5tI7OYx4et5DfRFcJuoojvpYO0c7vps2rgJsHY= k8s.io/client-go v0.17.1/go.mod h1:HZtHJSC/VuSHcETN9QA5QDZky1tXiYrkF/7t7vRpO1A= k8s.io/client-go v0.18.0-beta.2 h1:7LXqrIxTryiPQLsQjr/8DIcIC1qhI8eSqNaaM05o6Q8= k8s.io/client-go v0.18.0-beta.2/go.mod h1:UvuVxHjKWIcgy0iMvF+bwNDW7l0mskTNOaOW1Qv5BMA= +k8s.io/client-go v0.18.0 h1:yqKw4cTUQraZK3fcVCMeSa+lqKwcjZ5wtcOIPnxQno4= k8s.io/client-go v0.18.0/go.mod h1:uQSYDYs4WhVZ9i6AIoEZuwUggLVEF64HOD37boKAtF8= k8s.io/code-generator v0.17.1/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= k8s.io/code-generator v0.18.0-beta.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= @@ -627,6 +634,7 @@ k8s.io/component-base v0.17.1 h1:lK/lUzZZQK+DlH0XD+gq610OUEmjWOyDuUYOTGetw10= k8s.io/component-base v0.17.1/go.mod h1:LrBPZkXtlvGjBzDJa0+b7E5Ij4VoAAKrOGudRC5z2eY= k8s.io/component-base v0.18.0-beta.2 h1:f2D8WjS20nJUL/Bi4cWDrWCSh1gTbnSatq/n0FqSX+c= k8s.io/component-base v0.18.0-beta.2/go.mod h1:HVk5FpRnyzQ/MjBr9//e/yEBjTVa2qjGXCTuUzcD7ks= +k8s.io/component-base v0.18.0 h1:I+lP0fNfsEdTDpHaL61bCAqTZLoiWjEEP304Mo5ZQgE= k8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -639,6 +647,7 @@ k8s.io/kube-aggregator v0.17.1 h1:t/kREQckXfnUnF+fl8fD8c+p30HTrvfGnWE5XWSjj38= k8s.io/kube-aggregator v0.17.1/go.mod h1:H5LcB3fx+P1gpowuZpzDu5B1XfABdO7JBKyB9J9bt34= k8s.io/kube-aggregator v0.18.0-beta.2 h1:2R1770iXAi+TfkUdJzFs5ryUfAn1KW0+jVWRGvIgINA= k8s.io/kube-aggregator v0.18.0-beta.2/go.mod h1:O3Td9mheraINbLHH4pzoFP2gRzG0Wk1COqzdSL4rBPk= +k8s.io/kube-aggregator v0.18.0 h1:J+wa9FDQ3SbgyA8wQBNg2m2FMSm+mMQfs2A58500hs0= k8s.io/kube-aggregator v0.18.0/go.mod h1:ateewQ5QbjMZF/dihEFXwaEwoA4v/mayRvzfmvb6eqI= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= @@ -648,6 +657,7 @@ k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCui k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab h1:I3f2hcBrepGRXI1z4sukzAb8w1R4eqbsHrAsx06LGYM= k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= diff --git a/vendor/github.com/openshift/api/Dockerfile.build b/vendor/github.com/openshift/api/Dockerfile.build index 9f1d7fcfd..5416338f9 100644 --- a/vendor/github.com/openshift/api/Dockerfile.build +++ b/vendor/github.com/openshift/api/Dockerfile.build @@ -1,4 +1,4 @@ -FROM fedora:30 +FROM fedora:31 ENV GOPATH=/go ENV PATH=/go/bin:$PATH diff --git a/vendor/github.com/openshift/api/config/v1/types_operatorhub.go b/vendor/github.com/openshift/api/config/v1/types_operatorhub.go index 1d998bf37..1b2b7f82e 100644 --- a/vendor/github.com/openshift/api/config/v1/types_operatorhub.go +++ b/vendor/github.com/openshift/api/config/v1/types_operatorhub.go @@ -37,6 +37,7 @@ type OperatorHubStatus struct { // the state of the default hub sources for OperatorHub on the cluster from // enabled to disabled and vice versa. // +kubebuilder:subresource:status +// +genclient // +genclient:nonNamespaced type OperatorHub struct { metav1.TypeMeta `json:",inline"` diff --git a/vendor/github.com/openshift/api/go.mod b/vendor/github.com/openshift/api/go.mod index c13219f1d..17212dd25 100644 --- a/vendor/github.com/openshift/api/go.mod +++ b/vendor/github.com/openshift/api/go.mod @@ -8,8 +8,8 @@ require ( github.com/spf13/pflag v1.0.5 golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect golang.org/x/tools v0.0.0-20200115044656-831fdb1e1868 // indirect - k8s.io/api v0.18.0-beta.2 - k8s.io/apimachinery v0.18.0-beta.2 - k8s.io/code-generator v0.18.0-beta.2 + k8s.io/api v0.18.0 + k8s.io/apimachinery v0.18.0 + k8s.io/code-generator v0.18.0 k8s.io/klog v1.0.0 ) diff --git a/vendor/github.com/openshift/api/go.sum b/vendor/github.com/openshift/api/go.sum index 1ac779c0d..023a7789a 100644 --- a/vendor/github.com/openshift/api/go.sum +++ b/vendor/github.com/openshift/api/go.sum @@ -116,6 +116,7 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 h1:HmbHVPwrPEKPGLAcHSrMe6+hqSUlvZU0rab6x5EXfGU= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -143,12 +144,12 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -k8s.io/api v0.18.0-beta.2 h1:SK0PKYvDWhLz32ayrfQ1OSmEgz3sH6RvCtXpaBrv2ao= -k8s.io/api v0.18.0-beta.2/go.mod h1:2oeNnWEqcSmaM/ibSh3t7xcIqbkGXhzZdn4ezV9T4m0= -k8s.io/apimachinery v0.18.0-beta.2 h1:KR/mjplxzpYK/3tYez9iE4j9vMWKLSN3E2cZQqd/3KQ= -k8s.io/apimachinery v0.18.0-beta.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= -k8s.io/code-generator v0.18.0-beta.2 h1:1kUhr7/6Qs+kBVKY5IORQzyP7VPWUqo7Ck3LpmA5YMU= -k8s.io/code-generator v0.18.0-beta.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/api v0.18.0 h1:lwYk8Vt7rsVTwjRU6pzEsa9YNhThbmbocQlKvNBB4EQ= +k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= +k8s.io/apimachinery v0.18.0 h1:fuPfYpk3cs1Okp/515pAf0dNhL66+8zk8RLbSX+EgAE= +k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/code-generator v0.18.0 h1:0xIRWzym+qMgVpGmLESDeMfz/orwgxwxFFAo1xfGNtQ= +k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-apiserver-operator_02_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_10_config-operator_01_config.crd.yaml similarity index 93% rename from vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-apiserver-operator_02_config.crd.yaml rename to vendor/github.com/openshift/api/operator/v1/0000_10_config-operator_01_config.crd.yaml index 98322e984..8ce9fe994 100644 --- a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-apiserver-operator_02_config.crd.yaml +++ b/vendor/github.com/openshift/api/operator/v1/0000_10_config-operator_01_config.crd.yaml @@ -1,24 +1,23 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: servicecatalogapiservers.operator.openshift.io + name: configs.operator.openshift.io spec: scope: Cluster preserveUnknownFields: false group: operator.openshift.io version: v1 names: - kind: ServiceCatalogAPIServer - plural: servicecatalogapiservers - singular: servicecatalogapiserver + kind: Config + plural: configs + singular: config categories: - coreoperators subresources: status: {} validation: openAPIV3Schema: - description: ServiceCatalogAPIServer provides information to configure an operator - to manage Service Catalog API Server + description: Config provides information to configure the config operator. type: object required: - spec @@ -36,6 +35,8 @@ spec: metadata: type: object spec: + description: spec is the specification of the desired behavior of the Config + Operator. type: object properties: logLevel: @@ -71,6 +72,7 @@ spec: nullable: true x-kubernetes-preserve-unknown-fields: true status: + description: status defines the observed status of the Config Operator. type: object properties: conditions: diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-authentication-operator_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-authentication-operator_01_config.crd.yaml index b983e32ad..87f910ff3 100644 --- a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-authentication-operator_01_config.crd.yaml +++ b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-authentication-operator_01_config.crd.yaml @@ -127,6 +127,17 @@ spec: releases, once https://github.com/openshift/enhancements/blob/master/enhancements/authentication/separate-oauth-resources.md is fully implemented type: boolean + oauthAPIServer: + description: OAuthAPIServer holds status specific only to oauth-apiserver + type: object + properties: + latestAvailableRevision: + description: LatestAvailableRevision is the latest revision used + as suffix of revisioned secrets like encryption-config. A new + revision causes a new deployment of pods. + type: integer + format: int32 + minimum: 0 observedGeneration: description: observedGeneration is the last generation change you've dealt with diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-controller-manager-operator_02_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-controller-manager-operator_02_config.crd.yaml deleted file mode 100644 index 53453298e..000000000 --- a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-controller-manager-operator_02_config.crd.yaml +++ /dev/null @@ -1,137 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: servicecatalogcontrollermanagers.operator.openshift.io -spec: - scope: Cluster - preserveUnknownFields: false - group: operator.openshift.io - version: v1 - names: - kind: ServiceCatalogControllerManager - plural: servicecatalogcontrollermanagers - singular: servicecatalogcontrollermanager - categories: - - coreoperators - subresources: - status: {} - validation: - openAPIV3Schema: - description: ServiceCatalogControllerManager provides information to configure - an operator to manage Service Catalog Controller Manager - type: object - required: - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - type: object - properties: - logLevel: - description: 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. - type: string - managementState: - description: managementState indicates whether and how the operator - should manage the component - type: string - pattern: ^(Managed|Unmanaged|Force|Removed)$ - observedConfig: - description: 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 - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - operatorLogLevel: - description: 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. - type: string - unsupportedConfigOverrides: - description: 'unsupportedConfigOverrides holds a sparse config that - will override any previously set options. It only needs to be the - fields to override it will end up overlaying in the following order: - 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides' - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - status: - type: object - properties: - conditions: - description: conditions is a list of conditions and their status - type: array - items: - description: OperatorCondition is just the standard condition fields. - type: object - properties: - lastTransitionTime: - type: string - format: date-time - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - generations: - description: generations are used to determine when an item needs to - be reconciled or has changed in a way that needs a reaction. - type: array - items: - description: GenerationStatus keeps track of the generation for a - given resource so that decisions about forced updates can be made. - type: object - properties: - group: - description: group is the group of the thing you're tracking - type: string - hash: - description: hash is an optional field set for resources without - generation that are content sensitive like secrets and configmaps - type: string - lastGeneration: - description: lastGeneration is the last generation of the workload - controller involved - type: integer - format: int64 - name: - description: name is the name of the thing you're tracking - type: string - namespace: - description: namespace is where the thing you're tracking is - type: string - resource: - description: resource is the resource type of the thing you're - tracking - type: string - observedGeneration: - description: observedGeneration is the last generation change you've - dealt with - type: integer - format: int64 - readyReplicas: - description: readyReplicas indicates how many replicas are ready and - at the desired state - type: integer - format: int32 - version: - description: version is the level this availability applies to - type: string diff --git a/vendor/github.com/openshift/api/operator/v1/types_authentication.go b/vendor/github.com/openshift/api/operator/v1/types_authentication.go index 403028dfd..cf60fb963 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/operator/v1/types_authentication.go @@ -29,7 +29,20 @@ type AuthenticationStatus struct { // Note that this field will be removed in the future releases, once https://github.com/openshift/enhancements/blob/master/enhancements/authentication/separate-oauth-resources.md is fully implemented // +optional ManagingOAuthAPIServer bool `json:"managingOAuthAPIServer,omitempty"` - OperatorStatus `json:",inline"` + + // 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"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/github.com/openshift/api/operator/v1/types_config.go b/vendor/github.com/openshift/api/operator/v1/types_config.go new file mode 100644 index 000000000..267f3682e --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1/types_config.go @@ -0,0 +1,43 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Config provides information to configure the config operator. +type Config struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` + + // spec is the specification of the desired behavior of the Config Operator. + // +kubebuilder:validation:Required + // +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 +type ConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + // Items contains the items + Items []Config `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 index 7c1a857bb..4dc98f4a4 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go @@ -9,6 +9,7 @@ import ( // +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 type ServiceCatalogAPIServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -31,6 +32,7 @@ type ServiceCatalogAPIServerStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ServiceCatalogAPIServerList is a collection of items +// DEPRECATED: will be removed in 4.6 type ServiceCatalogAPIServerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go index ac3bf5898..f4cc3f695 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go @@ -9,6 +9,7 @@ import ( // +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 type ServiceCatalogControllerManager struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` @@ -31,6 +32,7 @@ type ServiceCatalogControllerManagerStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ServiceCatalogControllerManagerList is a collection of items +// DEPRECATED: will be removed in 4.6 type ServiceCatalogControllerManagerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` 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 index 158308a3e..0b3042872 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go @@ -113,6 +113,7 @@ func (in *AuthenticationSpec) DeepCopy() *AuthenticationSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuthenticationStatus) DeepCopyInto(out *AuthenticationStatus) { *out = *in + out.OAuthAPIServer = in.OAuthAPIServer in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) return } @@ -238,6 +239,101 @@ func (in *ClusterNetworkEntry) DeepCopy() *ClusterNetworkEntry { 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 *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 @@ -1559,6 +1655,22 @@ func (in *NodeStatus) DeepCopy() *NodeStatus { 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 + 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 *OVNKubernetesConfig) DeepCopyInto(out *OVNKubernetesConfig) { *out = *in 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 index d20358c23..1456a1399 100644 --- 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 @@ -119,12 +119,40 @@ func (AuthenticationList) SwaggerDoc() map[string]string { var map_AuthenticationStatus = map[string]string{ "managingOAuthAPIServer": "ManagingOAuthAPIServer indicates whether this operator is managing OAuth related APIs. Setting this field to true will cause OAS-O to step down. Note that this field will be removed in the future releases, once https://github.com/openshift/enhancements/blob/master/enhancements/authentication/separate-oauth-resources.md is fully implemented", + "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.", +} + +func (OAuthAPIServerStatus) SwaggerDoc() map[string]string { + return map_OAuthAPIServerStatus +} + +var map_Config = map[string]string{ + "": "Config provides information to configure the config operator.", + "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", + "items": "Items contains the items", +} + +func (ConfigList) SwaggerDoc() map[string]string { + return map_ConfigList +} + var map_Console = map[string]string{ "": "Console provides a means to configure an operator to manage the console.", } @@ -738,7 +766,7 @@ func (ServiceCAList) SwaggerDoc() map[string]string { } var map_ServiceCatalogAPIServer = map[string]string{ - "": "ServiceCatalogAPIServer provides information to configure an operator to manage Service Catalog API Server", + "": "ServiceCatalogAPIServer provides information to configure an operator to manage Service Catalog API Server DEPRECATED: will be removed in 4.6", } func (ServiceCatalogAPIServer) SwaggerDoc() map[string]string { @@ -746,7 +774,7 @@ func (ServiceCatalogAPIServer) SwaggerDoc() map[string]string { } var map_ServiceCatalogAPIServerList = map[string]string{ - "": "ServiceCatalogAPIServerList is a collection of items", + "": "ServiceCatalogAPIServerList is a collection of items DEPRECATED: will be removed in 4.6", "items": "Items contains the items", } @@ -755,7 +783,7 @@ func (ServiceCatalogAPIServerList) SwaggerDoc() map[string]string { } var map_ServiceCatalogControllerManager = map[string]string{ - "": "ServiceCatalogControllerManager provides information to configure an operator to manage Service Catalog Controller Manager", + "": "ServiceCatalogControllerManager provides information to configure an operator to manage Service Catalog Controller Manager DEPRECATED: will be removed in 4.6", } func (ServiceCatalogControllerManager) SwaggerDoc() map[string]string { @@ -763,7 +791,7 @@ func (ServiceCatalogControllerManager) SwaggerDoc() map[string]string { } var map_ServiceCatalogControllerManagerList = map[string]string{ - "": "ServiceCatalogControllerManagerList is a collection of items", + "": "ServiceCatalogControllerManagerList is a collection of items DEPRECATED: will be removed in 4.6", "items": "Items contains the items", } diff --git a/vendor/github.com/openshift/api/route/v1/types.go b/vendor/github.com/openshift/api/route/v1/types.go index 9c59fd413..6c9d80b98 100644 --- a/vendor/github.com/openshift/api/route/v1/types.go +++ b/vendor/github.com/openshift/api/route/v1/types.go @@ -34,7 +34,7 @@ type Route struct { Spec RouteSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // status is the current state of the route // +optional - Status RouteStatus `json:"status" protobuf:"bytes,3,opt,name=status"` + Status RouteStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -69,7 +69,7 @@ type RouteSpec struct { // chosen. // Must follow DNS952 subdomain conventions. // +optional - Host string `json:"host" protobuf:"bytes,1,opt,name=host"` + 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 @@ -141,7 +141,7 @@ 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` - Ingress []RouteIngress `json:"ingress" protobuf:"bytes,1,rep,name=ingress"` + Ingress []RouteIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } // RouteIngress holds information about the places where a route is exposed. diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go index cbf05ec04..0f2182d2f 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go @@ -23,6 +23,7 @@ type ConfigV1Interface interface { IngressesGetter NetworksGetter OAuthsGetter + OperatorHubsGetter ProjectsGetter ProxiesGetter SchedulersGetter @@ -85,6 +86,10 @@ func (c *ConfigV1Client) OAuths() OAuthInterface { return newOAuths(c) } +func (c *ConfigV1Client) OperatorHubs() OperatorHubInterface { + return newOperatorHubs(c) +} + func (c *ConfigV1Client) Projects() ProjectInterface { return newProjects(c) } diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go index 45a6a4b91..d743f4679 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go @@ -64,6 +64,10 @@ func (c *FakeConfigV1) OAuths() v1.OAuthInterface { return &FakeOAuths{c} } +func (c *FakeConfigV1) OperatorHubs() v1.OperatorHubInterface { + return &FakeOperatorHubs{c} +} + func (c *FakeConfigV1) Projects() v1.ProjectInterface { return &FakeProjects{c} } diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/fake/fake_operatorhub.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/fake/fake_operatorhub.go new file mode 100644 index 000000000..9da8b9288 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/fake/fake_operatorhub.go @@ -0,0 +1,117 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + configv1 "github.com/openshift/api/config/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeOperatorHubs implements OperatorHubInterface +type FakeOperatorHubs struct { + Fake *FakeConfigV1 +} + +var operatorhubsResource = schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "operatorhubs"} + +var operatorhubsKind = schema.GroupVersionKind{Group: "config.openshift.io", Version: "v1", Kind: "OperatorHub"} + +// Get takes name of the operatorHub, and returns the corresponding operatorHub object, and an error if there is any. +func (c *FakeOperatorHubs) Get(ctx context.Context, name string, options v1.GetOptions) (result *configv1.OperatorHub, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(operatorhubsResource, name), &configv1.OperatorHub{}) + if obj == nil { + return nil, err + } + return obj.(*configv1.OperatorHub), err +} + +// List takes label and field selectors, and returns the list of OperatorHubs that match those selectors. +func (c *FakeOperatorHubs) List(ctx context.Context, opts v1.ListOptions) (result *configv1.OperatorHubList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(operatorhubsResource, operatorhubsKind, opts), &configv1.OperatorHubList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &configv1.OperatorHubList{ListMeta: obj.(*configv1.OperatorHubList).ListMeta} + for _, item := range obj.(*configv1.OperatorHubList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested operatorHubs. +func (c *FakeOperatorHubs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(operatorhubsResource, opts)) +} + +// Create takes the representation of a operatorHub and creates it. Returns the server's representation of the operatorHub, and an error, if there is any. +func (c *FakeOperatorHubs) Create(ctx context.Context, operatorHub *configv1.OperatorHub, opts v1.CreateOptions) (result *configv1.OperatorHub, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(operatorhubsResource, operatorHub), &configv1.OperatorHub{}) + if obj == nil { + return nil, err + } + return obj.(*configv1.OperatorHub), err +} + +// Update takes the representation of a operatorHub and updates it. Returns the server's representation of the operatorHub, and an error, if there is any. +func (c *FakeOperatorHubs) Update(ctx context.Context, operatorHub *configv1.OperatorHub, opts v1.UpdateOptions) (result *configv1.OperatorHub, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(operatorhubsResource, operatorHub), &configv1.OperatorHub{}) + if obj == nil { + return nil, err + } + return obj.(*configv1.OperatorHub), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeOperatorHubs) UpdateStatus(ctx context.Context, operatorHub *configv1.OperatorHub, opts v1.UpdateOptions) (*configv1.OperatorHub, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(operatorhubsResource, "status", operatorHub), &configv1.OperatorHub{}) + if obj == nil { + return nil, err + } + return obj.(*configv1.OperatorHub), err +} + +// Delete takes name of the operatorHub and deletes it. Returns an error if one occurs. +func (c *FakeOperatorHubs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(operatorhubsResource, name), &configv1.OperatorHub{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeOperatorHubs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(operatorhubsResource, listOpts) + + _, err := c.Fake.Invokes(action, &configv1.OperatorHubList{}) + return err +} + +// Patch applies the patch and returns the patched operatorHub. +func (c *FakeOperatorHubs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1.OperatorHub, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(operatorhubsResource, name, pt, data, subresources...), &configv1.OperatorHub{}) + if obj == nil { + return nil, err + } + return obj.(*configv1.OperatorHub), err +} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go index ad1005fb7..50a4ec7f8 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go @@ -28,6 +28,8 @@ type NetworkExpansion interface{} type OAuthExpansion interface{} +type OperatorHubExpansion interface{} + type ProjectExpansion interface{} type ProxyExpansion interface{} 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 new file mode 100644 index 000000000..06a2b1844 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/operatorhub.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/openshift/api/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" + rest "k8s.io/client-go/rest" +) + +// 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 *v1.OperatorHub, opts metav1.CreateOptions) (*v1.OperatorHub, error) + Update(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.UpdateOptions) (*v1.OperatorHub, error) + UpdateStatus(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.UpdateOptions) (*v1.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) (*v1.OperatorHub, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.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 *v1.OperatorHub, err error) + OperatorHubExpansion +} + +// operatorHubs implements OperatorHubInterface +type operatorHubs struct { + client rest.Interface +} + +// newOperatorHubs returns a OperatorHubs +func newOperatorHubs(c *ConfigV1Client) *operatorHubs { + return &operatorHubs{ + client: c.RESTClient(), + } +} + +// Get takes name of the operatorHub, and returns the corresponding operatorHub object, and an error if there is any. +func (c *operatorHubs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OperatorHub, err error) { + result = &v1.OperatorHub{} + err = c.client.Get(). + Resource("operatorhubs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of OperatorHubs that match those selectors. +func (c *operatorHubs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OperatorHubList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.OperatorHubList{} + err = c.client.Get(). + Resource("operatorhubs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested operatorHubs. +func (c *operatorHubs) Watch(ctx context.Context, opts metav1.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("operatorhubs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a operatorHub and creates it. Returns the server's representation of the operatorHub, and an error, if there is any. +func (c *operatorHubs) Create(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.CreateOptions) (result *v1.OperatorHub, err error) { + result = &v1.OperatorHub{} + err = c.client.Post(). + Resource("operatorhubs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(operatorHub). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a operatorHub and updates it. Returns the server's representation of the operatorHub, and an error, if there is any. +func (c *operatorHubs) Update(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.UpdateOptions) (result *v1.OperatorHub, err error) { + result = &v1.OperatorHub{} + err = c.client.Put(). + Resource("operatorhubs"). + Name(operatorHub.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(operatorHub). + 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 *operatorHubs) UpdateStatus(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.UpdateOptions) (result *v1.OperatorHub, err error) { + result = &v1.OperatorHub{} + err = c.client.Put(). + Resource("operatorhubs"). + Name(operatorHub.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(operatorHub). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the operatorHub and deletes it. Returns an error if one occurs. +func (c *operatorHubs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("operatorhubs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *operatorHubs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("operatorhubs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched operatorHub. +func (c *operatorHubs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OperatorHub, err error) { + result = &v1.OperatorHub{} + err = c.client.Patch(pt). + Resource("operatorhubs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} 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 index 3b6b8a38a..00054daf3 100644 --- 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 @@ -34,6 +34,8 @@ type Interface interface { Networks() NetworkInformer // OAuths returns a OAuthInformer. OAuths() OAuthInformer + // OperatorHubs returns a OperatorHubInformer. + OperatorHubs() OperatorHubInformer // Projects returns a ProjectInformer. Projects() ProjectInformer // Proxies returns a ProxyInformer. @@ -118,6 +120,11 @@ 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} 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 new file mode 100644 index 000000000..a2c8757fc --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/operatorhub.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + time "time" + + configv1 "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" + v1 "github.com/openshift/client-go/config/listers/config/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + 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() v1.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 NewFilteredOperatorHubInformer(client, resyncPeriod, indexers, nil) +} + +// 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 cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ConfigV1().OperatorHubs().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ConfigV1().OperatorHubs().Watch(context.TODO(), options) + }, + }, + &configv1.OperatorHub{}, + resyncPeriod, + indexers, + ) +} + +func (f *operatorHubInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredOperatorHubInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *operatorHubInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&configv1.OperatorHub{}, f.defaultInformer) +} + +func (f *operatorHubInformer) Lister() v1.OperatorHubLister { + return v1.NewOperatorHubLister(f.Informer().GetIndexer()) +} 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 index 248b39101..2795d10e9 100644 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go +++ b/vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go @@ -63,6 +63,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Networks().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"): 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 index 94d309605..56b41a044 100644 --- 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 @@ -54,6 +54,10 @@ type NetworkListerExpansion interface{} // 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{} 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 new file mode 100644 index 000000000..21acaf91e --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/listers/config/v1/operatorhub.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/config/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// OperatorHubLister helps list OperatorHubs. +type OperatorHubLister interface { + // List lists all OperatorHubs in the indexer. + List(selector labels.Selector) (ret []*v1.OperatorHub, err error) + // Get retrieves the OperatorHub from the index for a given name. + Get(name string) (*v1.OperatorHub, error) + OperatorHubListerExpansion +} + +// operatorHubLister implements the OperatorHubLister interface. +type operatorHubLister struct { + indexer cache.Indexer +} + +// NewOperatorHubLister returns a new OperatorHubLister. +func NewOperatorHubLister(indexer cache.Indexer) OperatorHubLister { + return &operatorHubLister{indexer: indexer} +} + +// List lists all OperatorHubs in the indexer. +func (s *operatorHubLister) List(selector labels.Selector) (ret []*v1.OperatorHub, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.OperatorHub)) + }) + return ret, err +} + +// Get retrieves the OperatorHub from the index for a given name. +func (s *operatorHubLister) Get(name string) (*v1.OperatorHub, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("operatorhub"), name) + } + return obj.(*v1.OperatorHub), nil +} 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 index e3aaab638..c40e12c6f 100644 --- 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 @@ -10,16 +10,22 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" "k8s.io/klog" + + operatorv1 "github.com/openshift/api/operator/v1" + + "github.com/openshift/library-go/pkg/operator/v1helpers" + operatorv1helpers "github.com/openshift/library-go/pkg/operator/v1helpers" ) // baseController represents generic Kubernetes controller boiler-plate type baseController struct { - name string - cachesToSync []cache.InformerSynced - sync func(ctx context.Context, controllerContext SyncContext) error - syncContext SyncContext - resyncEvery time.Duration - postStartHooks []PostStartHook + name string + cachesToSync []cache.InformerSynced + sync func(ctx context.Context, controllerContext SyncContext) error + syncContext SyncContext + syncDegradedClient operatorv1helpers.OperatorClient + resyncEvery time.Duration + postStartHooks []PostStartHook } var _ Controller = &baseController{} @@ -128,6 +134,33 @@ func (c *baseController) runWorker(queueCtx context.Context) { workerWaitGroup.Wait() } +// 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) + if c.syncDegradedClient == nil { + return err + } + if err != nil { + _, _, updateErr := v1helpers.UpdateStatus(c.syncDegradedClient, v1helpers.UpdateConditionFn(operatorv1.OperatorCondition{ + Type: c.name + "Degraded", + Status: operatorv1.ConditionTrue, + Reason: "SyncError", + Message: err.Error(), + })) + if updateErr != nil { + klog.Warningf("Updating status of %q failed: %w", c.Name(), updateErr) + } + return err + } + _, _, updateErr := v1helpers.UpdateStatus(c.syncDegradedClient, + v1helpers.UpdateConditionFn(operatorv1.OperatorCondition{ + Type: c.name + "Degraded", + Status: operatorv1.ConditionFalse, + Reason: "AsExpected", + })) + return updateErr +} + func (c *baseController) processNextWorkItem(queueCtx context.Context) { key, quit := c.syncContext.Queue().Get() if quit { @@ -143,7 +176,7 @@ func (c *baseController) processNextWorkItem(queueCtx context.Context) { return } - if err := c.sync(queueCtx, syncCtx); err != nil { + if err := c.reconcile(queueCtx, syncCtx); err != nil { utilruntime.HandleError(fmt.Errorf("%q controller failed to sync %q, err: %w", c.name, key, err)) c.syncContext.Queue().AddRateLimited(key) return 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 index 6206546c8..5f06fd071 100644 --- a/vendor/github.com/openshift/library-go/pkg/controller/factory/factory.go +++ b/vendor/github.com/openshift/library-go/pkg/controller/factory/factory.go @@ -9,6 +9,7 @@ import ( "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. @@ -19,6 +20,7 @@ const DefaultQueueKey = "key" type Factory struct { sync SyncFunc syncContext SyncContext + syncDegradedClient operatorv1helpers.OperatorClient resyncInterval time.Duration informers []Informer informerQueueKeys []informersWithQueueKey @@ -122,6 +124,13 @@ func (f *Factory) WithSyncContext(ctx SyncContext) *Factory { 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 +} + // Controller produce a runnable controller. func (f *Factory) ToController(name string, eventRecorder events.Recorder) Controller { if f.sync == nil { @@ -136,11 +145,12 @@ func (f *Factory) ToController(name string, eventRecorder events.Recorder) Contr } c := &baseController{ - name: name, - sync: f.sync, - resyncEvery: f.resyncInterval, - cachesToSync: append([]cache.InformerSynced{}, f.cachesToSync...), - syncContext: ctx, + name: name, + syncDegradedClient: f.syncDegradedClient, + sync: f.sync, + resyncEvery: f.resyncInterval, + cachesToSync: append([]cache.InformerSynced{}, f.cachesToSync...), + syncContext: ctx, } for i := range f.informerQueueKeys { diff --git a/vendor/github.com/openshift/library-go/pkg/operator/apiserver/controllerset/apiservercontrollerset.go b/vendor/github.com/openshift/library-go/pkg/operator/apiserver/controllerset/apiservercontrollerset.go index d3baed39c..6896df2cf 100644 --- a/vendor/github.com/openshift/library-go/pkg/operator/apiserver/controllerset/apiservercontrollerset.go +++ b/vendor/github.com/openshift/library-go/pkg/operator/apiserver/controllerset/apiservercontrollerset.go @@ -11,6 +11,9 @@ import ( "github.com/openshift/library-go/pkg/operator/apiserver/controller/apiservice" "github.com/openshift/library-go/pkg/operator/apiserver/controller/nsfinalizer" "github.com/openshift/library-go/pkg/operator/apiserver/controller/workload" + "github.com/openshift/library-go/pkg/operator/encryption" + "github.com/openshift/library-go/pkg/operator/encryption/controllers/migrators" + "github.com/openshift/library-go/pkg/operator/encryption/statemachine" "github.com/openshift/library-go/pkg/operator/events" "github.com/openshift/library-go/pkg/operator/loglevel" "github.com/openshift/library-go/pkg/operator/resource/resourceapply" @@ -21,9 +24,11 @@ import ( "github.com/openshift/library-go/pkg/operator/v1helpers" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/errors" kubeinformers "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" corev1client "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/cache" apiregistrationv1client "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" @@ -51,10 +56,7 @@ func (cw *controllerWrapper) prepare() (controller, error) { return cw.controller, nil } -// APIServerControllerSet is a set of controllers that maintain a deployment of -// an API server and the namespace it's running in -// -// TODO: add encryption controllers +// APIServerControllerSet is a set of controllers that maintain a deployment of an API server and the namespace it's running in type APIServerControllerSet struct { operatorClient v1helpers.OperatorClient eventRecorder events.Recorder @@ -67,6 +69,7 @@ type APIServerControllerSet struct { staticResourceController controllerWrapper workloadController controllerWrapper revisionController controllerWrapper + encryptionControllers controllerWrapper } func NewAPIServerControllerSet( @@ -276,6 +279,38 @@ func (cs *APIServerControllerSet) WithoutRevisionController() *APIServerControll return cs } +func (cs *APIServerControllerSet) WithEncryptionControllers( + component string, + deployer statemachine.Deployer, + migrator migrators.Migrator, + secretsClient corev1.SecretsGetter, + apiServerClient configv1client.APIServerInterface, + apiServerInformer configv1informers.APIServerInformer, + kubeInformersForNamespaces v1helpers.KubeInformersForNamespaces, + encryptedGRs ...schema.GroupResource, +) *APIServerControllerSet { + cs.encryptionControllers.controller = encryption.NewControllers( + component, + deployer, + migrator, + cs.operatorClient, + apiServerClient, + apiServerInformer, + kubeInformersForNamespaces, + secretsClient, + cs.eventRecorder, + encryptedGRs..., + ) + + return cs +} + +func (cs *APIServerControllerSet) WithoutEncryptionControllers() *APIServerControllerSet { + cs.encryptionControllers.controller = nil + cs.encryptionControllers.emptyAllowed = true + return cs +} + func (cs *APIServerControllerSet) PrepareRun() (preparedAPIServerControllerSet, error) { prepared := []controller{} errs := []error{} @@ -289,6 +324,7 @@ func (cs *APIServerControllerSet) PrepareRun() (preparedAPIServerControllerSet, "staticResourceController": cs.staticResourceController, "workloadController": cs.workloadController, "revisionController": cs.revisionController, + "encryptionControllers": cs.encryptionControllers, } { c, err := cw.prepare() if err != nil { diff --git a/vendor/github.com/openshift/library-go/pkg/operator/encryption/controllers.go b/vendor/github.com/openshift/library-go/pkg/operator/encryption/controllers.go index 53246bc98..090c2228d 100644 --- a/vendor/github.com/openshift/library-go/pkg/operator/encryption/controllers.go +++ b/vendor/github.com/openshift/library-go/pkg/operator/encryption/controllers.go @@ -35,7 +35,7 @@ func NewControllers( secretsClient corev1.SecretsGetter, eventRecorder events.Recorder, encryptedGRs ...schema.GroupResource, -) (*Controllers, error) { +) *Controllers { // avoid using the CachedSecretGetter as we need strong guarantees that our encryptionSecretSelector works // otherwise we could see secrets from a different component (which will break our keyID invariants) // this is fine in terms of performance since these controllers will be idle most of the time @@ -96,7 +96,7 @@ func NewControllers( encryptedGRs, ), }, - }, nil + } } type Controllers struct { 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 index 7e2ac261d..44042efb4 100644 --- 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 @@ -6,10 +6,12 @@ import ( "k8s.io/klog" storagev1 "k8s.io/api/storage/v1" + storagev1beta1 "k8s.io/api/storage/v1beta1" "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" + storageclientv1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" "github.com/openshift/library-go/pkg/operator/events" "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" @@ -50,3 +52,32 @@ func ApplyStorageClass(client storageclientv1.StorageClassesGetter, recorder eve reportUpdateEvent(recorder, required, err) return actual, true, err } + +// ApplyCSIDriverV1Beta1 merges objectmeta, does not worry about anything else +func ApplyCSIDriverV1Beta1(client storageclientv1beta1.CSIDriversGetter, recorder events.Recorder, required *storagev1beta1.CSIDriver) (*storagev1beta1.CSIDriver, bool, error) { + existing, err := client.CSIDrivers().Get(context.TODO(), required.Name, metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + actual, err := client.CSIDrivers().Create(context.TODO(), required, metav1.CreateOptions{}) + reportCreateEvent(recorder, required, err) + return actual, true, err + } + if err != nil { + return nil, false, err + } + + modified := resourcemerge.BoolPtr(false) + existingCopy := existing.DeepCopy() + + resourcemerge.EnsureObjectMeta(modified, &existingCopy.ObjectMeta, required.ObjectMeta) + if !*modified { + return existingCopy, false, nil + } + + if klog.V(4) { + klog.Infof("CSIDriver %q changes: %v", required.Name, JSONPatchNoError(existing, existingCopy)) + } + + actual, err := client.CSIDrivers().Update(context.TODO(), existingCopy, metav1.UpdateOptions{}) + reportUpdateEvent(recorder, required, err) + return actual, true, err +} 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 index 3a488870e..0a4c290e5 100644 --- 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 @@ -2,8 +2,10 @@ 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 ( @@ -12,9 +14,8 @@ var ( ) func init() { - if err := storagev1.AddToScheme(storageScheme); err != nil { - panic(err) - } + utilruntime.Must(storagev1.AddToScheme(storageScheme)) + utilruntime.Must(storagev1beta1.AddToScheme(storageScheme)) } func ReadStorageClassV1OrDie(objBytes []byte) *storagev1.StorageClass { @@ -24,3 +25,11 @@ func ReadStorageClassV1OrDie(objBytes []byte) *storagev1.StorageClass { } 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) +} diff --git a/vendor/k8s.io/api/networking/v1beta1/generated.proto b/vendor/k8s.io/api/networking/v1beta1/generated.proto index fc09fd8ab..68bede81f 100644 --- a/vendor/k8s.io/api/networking/v1beta1/generated.proto +++ b/vendor/k8s.io/api/networking/v1beta1/generated.proto @@ -148,10 +148,9 @@ message IngressClassSpec { // "acme.io/ingress-controller". This field is immutable. optional string controller = 1; - // Parameters is a link to a resource containing additional configuration - // for the controller. This is optional if the controller does not require - // extra parameters. Example configuration resources include - // `core.ConfigMap` or a controller specific Custom Resource. + // Parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. // +optional optional k8s.io.api.core.v1.TypedLocalObjectReference parameters = 2; } diff --git a/vendor/k8s.io/api/networking/v1beta1/types.go b/vendor/k8s.io/api/networking/v1beta1/types.go index 11b8dacb9..46f530bfa 100644 --- a/vendor/k8s.io/api/networking/v1beta1/types.go +++ b/vendor/k8s.io/api/networking/v1beta1/types.go @@ -298,10 +298,9 @@ type IngressClassSpec struct { // "acme.io/ingress-controller". This field is immutable. Controller string `json:"controller,omitempty" protobuf:"bytes,1,opt,name=controller"` - // Parameters is a link to a resource containing additional configuration - // for the controller. This is optional if the controller does not require - // extra parameters. Example configuration resources include - // `core.ConfigMap` or a controller specific Custom Resource. + // Parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. // +optional Parameters *v1.TypedLocalObjectReference `json:"parameters,omitempty" protobuf:"bytes,2,opt,name=parameters"` } diff --git a/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go index 3e24b1986..c774249d8 100644 --- a/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go @@ -92,7 +92,7 @@ func (IngressClassList) SwaggerDoc() map[string]string { var map_IngressClassSpec = map[string]string{ "": "IngressClassSpec provides information about the class of an Ingress.", "controller": "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", - "parameters": "Parameters is a link to a resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. Example configuration resources include `core.ConfigMap` or a controller specific Custom Resource.", + "parameters": "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", } func (IngressClassSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go index ec016fd3c..ad989ad75 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go @@ -252,7 +252,9 @@ func ResetObjectMetaForStatus(meta, existingMeta Object) { meta.SetAnnotations(existingMeta.GetAnnotations()) meta.SetFinalizers(existingMeta.GetFinalizers()) meta.SetOwnerReferences(existingMeta.GetOwnerReferences()) - meta.SetManagedFields(existingMeta.GetManagedFields()) + // managedFields must be preserved since it's been modified to + // track changed fields in the status update. + //meta.SetManagedFields(existingMeta.GetManagedFields()) } // MarshalJSON implements json.Marshaler diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go index a90675784..ac92a99a9 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -32,6 +32,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" @@ -394,6 +395,8 @@ func (s *store) GetToList(ctx context.Context, key string, resourceVersion strin return fmt.Errorf("need ptr to slice: %v", err) } + newItemFunc := getNewItemFunc(listObj, v) + key = path.Join(s.pathPrefix, key) startTime := time.Now() getResp, err := s.client.KV.Get(ctx, key, s.getOps...) @@ -410,7 +413,7 @@ func (s *store) GetToList(ctx context.Context, key string, resourceVersion strin if err != nil { return storage.NewInternalError(err.Error()) } - if err := appendListItem(v, data, uint64(getResp.Kvs[0].ModRevision), pred, s.codec, s.versioner); err != nil { + if err := appendListItem(v, data, uint64(getResp.Kvs[0].ModRevision), pred, s.codec, s.versioner, newItemFunc); err != nil { return err } } @@ -418,6 +421,23 @@ func (s *store) GetToList(ctx context.Context, key string, resourceVersion strin return s.versioner.UpdateList(listObj, uint64(getResp.Header.Revision), "", nil) } +func getNewItemFunc(listObj runtime.Object, v reflect.Value) func() runtime.Object { + // For unstructured lists with a target group/version, preserve the group/version in the instantiated list items + if unstructuredList, isUnstructured := listObj.(*unstructured.UnstructuredList); isUnstructured { + if apiVersion := unstructuredList.GetAPIVersion(); len(apiVersion) > 0 { + return func() runtime.Object { + return &unstructured.Unstructured{Object: map[string]interface{}{"apiVersion": apiVersion}} + } + } + } + + // Otherwise just instantiate an empty item + elem := v.Type().Elem() + return func() runtime.Object { + return reflect.New(elem).Interface().(runtime.Object) + } +} + func (s *store) Count(key string) (int64, error) { key = path.Join(s.pathPrefix, key) startTime := time.Now() @@ -525,6 +545,8 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor options = append(options, clientv3.WithLimit(pred.Limit)) } + newItemFunc := getNewItemFunc(listObj, v) + var returnedRV, continueRV int64 var continueKey string switch { @@ -609,7 +631,7 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor return storage.NewInternalErrorf("unable to transform key %q: %v", kv.Key, err) } - if err := appendListItem(v, data, uint64(kv.ModRevision), pred, s.codec, s.versioner); err != nil { + if err := appendListItem(v, data, uint64(kv.ModRevision), pred, s.codec, s.versioner, newItemFunc); err != nil { return err } } @@ -832,8 +854,8 @@ func decode(codec runtime.Codec, versioner storage.Versioner, value []byte, objP } // appendListItem decodes and appends the object (if it passes filter) to v, which must be a slice. -func appendListItem(v reflect.Value, data []byte, rev uint64, pred storage.SelectionPredicate, codec runtime.Codec, versioner storage.Versioner) error { - obj, _, err := codec.Decode(data, nil, reflect.New(v.Type().Elem()).Interface().(runtime.Object)) +func appendListItem(v reflect.Value, data []byte, rev uint64, pred storage.SelectionPredicate, codec runtime.Codec, versioner storage.Versioner, newItemFunc func() runtime.Object) error { + obj, _, err := codec.Decode(data, nil, newItemFunc()) if err != nil { return err } diff --git a/vendor/k8s.io/utils/net/net.go b/vendor/k8s.io/utils/net/net.go index 2690aa0c2..051dabfd6 100644 --- a/vendor/k8s.io/utils/net/net.go +++ b/vendor/k8s.io/utils/net/net.go @@ -152,17 +152,17 @@ func ParsePort(port string, allowZero bool) (int, error) { // BigForIP creates a big.Int based on the provided net.IP func BigForIP(ip net.IP) *big.Int { - b := ip.To4() - if b == nil { - b = ip.To16() - } - return big.NewInt(0).SetBytes(b) + // NOTE: Convert to 16-byte representation so we can + // handle v4 and v6 values the same way. + return big.NewInt(0).SetBytes(ip.To16()) } -// AddIPOffset adds the provided integer offset to a base big.Int representing a -// net.IP +// AddIPOffset adds the provided integer offset to a base big.Int representing a net.IP +// NOTE: If you started with a v4 address and overflow it, you get a v6 result. func AddIPOffset(base *big.Int, offset int) net.IP { - return net.IP(big.NewInt(0).Add(base, big.NewInt(int64(offset))).Bytes()) + r := big.NewInt(0).Add(base, big.NewInt(int64(offset))).Bytes() + r = append(make([]byte, 16), r...) + return net.IP(r[len(r)-16:]) } // RangeSize returns the size of a range in valid addresses. diff --git a/vendor/k8s.io/utils/net/port.go b/vendor/k8s.io/utils/net/port.go new file mode 100644 index 000000000..b4ff128e0 --- /dev/null +++ b/vendor/k8s.io/utils/net/port.go @@ -0,0 +1,137 @@ +/* +Copyright 2020 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 net + +import ( + "fmt" + "net" + "strconv" + "strings" +) + +// IPFamily refers to a specific family if not empty, i.e. "4" or "6". +type IPFamily string + +// Constants for valid IPFamilys: +const ( + IPv4 IPFamily = "4" + IPv6 = "6" +) + +// Protocol is a network protocol support by LocalPort. +type Protocol string + +// Constants for valid protocols: +const ( + TCP Protocol = "TCP" + UDP Protocol = "UDP" +) + +// LocalPort represents an IP address and port pair along with a protocol +// and potentially a specific IP family. +// A LocalPort can be opened and subsequently closed. +type LocalPort struct { + // Description is an arbitrary string. + Description string + // IP is the IP address part of a given local port. + // If this string is empty, the port binds to all local IP addresses. + IP string + // If IPFamily is not empty, the port binds only to addresses of this + // family. + // IF empty along with IP, bind to local addresses of any family. + IPFamily IPFamily + // Port is the port number. + // A value of 0 causes a port to be automatically chosen. + Port int + // Protocol is the protocol, e.g. TCP + Protocol Protocol +} + +// NewLocalPort returns a LocalPort instance and ensures IPFamily and IP are +// consistent and that the given protocol is valid. +func NewLocalPort(desc, ip string, ipFamily IPFamily, port int, protocol Protocol) (*LocalPort, error) { + if protocol != TCP && protocol != UDP { + return nil, fmt.Errorf("Unsupported protocol %s", protocol) + } + if ipFamily != "" && ipFamily != "4" && ipFamily != "6" { + return nil, fmt.Errorf("Invalid IP family %s", ipFamily) + } + if ip != "" { + parsedIP := net.ParseIP(ip) + if parsedIP == nil { + return nil, fmt.Errorf("invalid ip address %s", ip) + } + asIPv4 := parsedIP.To4() + if asIPv4 == nil && ipFamily == IPv4 || asIPv4 != nil && ipFamily == IPv6 { + return nil, fmt.Errorf("ip address and family mismatch %s, %s", ip, ipFamily) + } + } + return &LocalPort{Description: desc, IP: ip, IPFamily: ipFamily, Port: port, Protocol: protocol}, nil +} + +func (lp *LocalPort) String() string { + ipPort := net.JoinHostPort(lp.IP, strconv.Itoa(lp.Port)) + return fmt.Sprintf("%q (%s/%s%s)", lp.Description, ipPort, strings.ToLower(string(lp.Protocol)), lp.IPFamily) +} + +// Closeable closes an opened LocalPort. +type Closeable interface { + Close() error +} + +// PortOpener can open a LocalPort and allows later closing it. +type PortOpener interface { + OpenLocalPort(lp *LocalPort) (Closeable, error) +} + +type listenPortOpener struct{} + +// ListenPortOpener opens ports by calling bind() and listen(). +var ListenPortOpener listenPortOpener + +// OpenLocalPort holds the given local port open. +func (l *listenPortOpener) OpenLocalPort(lp *LocalPort) (Closeable, error) { + return openLocalPort(lp) +} + +func openLocalPort(lp *LocalPort) (Closeable, error) { + var socket Closeable + hostPort := net.JoinHostPort(lp.IP, strconv.Itoa(lp.Port)) + switch lp.Protocol { + case TCP: + network := "tcp" + string(lp.IPFamily) + listener, err := net.Listen(network, hostPort) + if err != nil { + return nil, err + } + socket = listener + case UDP: + network := "udp" + string(lp.IPFamily) + addr, err := net.ResolveUDPAddr(network, hostPort) + if err != nil { + return nil, err + } + conn, err := net.ListenUDP(network, addr) + if err != nil { + return nil, err + } + socket = conn + default: + return nil, fmt.Errorf("unknown protocol %q", lp.Protocol) + } + return socket, nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4e4250cd4..f9c83a5b1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -145,7 +145,7 @@ github.com/modern-go/concurrent github.com/modern-go/reflect2 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 github.com/munnerz/goautoneg -# github.com/openshift/api v0.0.0-20200320142426-0de0d539b0c3 +# github.com/openshift/api v0.0.0-20200326160804-ecb9283fe820 github.com/openshift/api github.com/openshift/api/apps github.com/openshift/api/apps/v1 @@ -201,7 +201,7 @@ github.com/openshift/build-machinery-go/make/targets/golang github.com/openshift/build-machinery-go/make/targets/openshift github.com/openshift/build-machinery-go/make/targets/openshift/operator github.com/openshift/build-machinery-go/scripts -# github.com/openshift/client-go v0.0.0-20200320150128-a906f3d8e723 +# github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0 github.com/openshift/client-go/config/clientset/versioned github.com/openshift/client-go/config/clientset/versioned/fake github.com/openshift/client-go/config/clientset/versioned/scheme @@ -228,7 +228,7 @@ github.com/openshift/client-go/operator/informers/externalversions/operator/v1 github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1 github.com/openshift/client-go/operator/listers/operator/v1 github.com/openshift/client-go/operator/listers/operator/v1alpha1 -# github.com/openshift/library-go v0.0.0-20200325084904-c4f5592456b1 +# github.com/openshift/library-go v0.0.0-20200327125526-163b2f0d6264 github.com/openshift/library-go/pkg/assets github.com/openshift/library-go/pkg/config/client github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers @@ -433,7 +433,7 @@ gopkg.in/inf.v0 gopkg.in/natefinch/lumberjack.v2 # gopkg.in/yaml.v2 v2.2.8 gopkg.in/yaml.v2 -# k8s.io/api v0.18.0-beta.2 +# k8s.io/api v0.18.0 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 k8s.io/api/admissionregistration/v1 @@ -477,7 +477,7 @@ k8s.io/api/settings/v1alpha1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apiextensions-apiserver v0.18.0-beta.2 +# k8s.io/apiextensions-apiserver v0.18.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1 @@ -485,7 +485,7 @@ 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.18.0-beta.2 +# k8s.io/apimachinery v0.18.0 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors k8s.io/apimachinery/pkg/api/meta @@ -537,7 +537,7 @@ 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.18.0-beta.2 +# k8s.io/apiserver v0.18.0 k8s.io/apiserver/pkg/admission k8s.io/apiserver/pkg/admission/configuration k8s.io/apiserver/pkg/admission/initializer @@ -658,7 +658,7 @@ k8s.io/apiserver/plugin/pkg/audit/truncate k8s.io/apiserver/plugin/pkg/audit/webhook k8s.io/apiserver/plugin/pkg/authenticator/token/webhook k8s.io/apiserver/plugin/pkg/authorizer/webhook -# k8s.io/client-go v0.18.0-beta.2 +# k8s.io/client-go v0.18.0 k8s.io/client-go/discovery k8s.io/client-go/discovery/fake k8s.io/client-go/dynamic @@ -870,7 +870,7 @@ k8s.io/client-go/util/homedir k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/workqueue -# k8s.io/component-base v0.18.0-beta.2 +# k8s.io/component-base v0.18.0 k8s.io/component-base/cli/flag k8s.io/component-base/featuregate k8s.io/component-base/logs @@ -880,7 +880,7 @@ k8s.io/component-base/metrics/testutil k8s.io/component-base/version # k8s.io/klog v1.0.0 k8s.io/klog -# k8s.io/kube-aggregator v0.18.0-beta.2 +# k8s.io/kube-aggregator v0.18.0 k8s.io/kube-aggregator/pkg/apis/apiregistration k8s.io/kube-aggregator/pkg/apis/apiregistration/v1 k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1 @@ -902,7 +902,7 @@ k8s.io/kube-openapi/pkg/handler k8s.io/kube-openapi/pkg/schemaconv k8s.io/kube-openapi/pkg/util k8s.io/kube-openapi/pkg/util/proto -# k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab +# k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/net