diff --git a/Makefile b/Makefile index 7d24eedae0..167905067f 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,6 @@ all: build include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \ golang.mk \ targets/openshift/bindata.mk \ - targets/openshift/crd-schema-gen.mk \ targets/openshift/deps.mk \ ) @@ -68,24 +67,14 @@ $(call add-bindata,v4.1.0,./bindata/v4.1.0/...,bindata,v410_00_assets,pkg/assets # $4 - context directory for image build $(call build-image,ocp-cloud-credential-operator,$(IMAGE_REGISTRY)/ocp/4.5:cloud-credential-operator, ./Dockerfile,.) -# This will call a macro called "add-crd-gen" will will generate crd manifests based on the parameters: -# $1 - target name -# $2 - apis -# $3 - manifests -# $4 - output -$(call add-crd-gen,cloudcredential-manifests,./pkg/apis/cloudcredential/v1,./manifests,./manifests) -$(call add-crd-gen,cloudcredential-bindata,./pkg/apis/cloudcredential/v1,./bindata/bootstrap,./bindata/bootstrap) - update: update-codegen -update-codegen: update-codegen-crds - ./hack/update-codegen.sh +update-codegen: .PHONY: update-codegen verify: verify-codegen -verify-codegen: verify-codegen-crds - ./hack/verify-codegen.sh +verify-codegen: .PHONY: verify-codegen clean: diff --git a/go.mod b/go.mod index 35628e4107..346eda0400 100644 --- a/go.mod +++ b/go.mod @@ -39,3 +39,5 @@ require ( k8s.io/code-generator v0.18.3 sigs.k8s.io/controller-runtime v0.6.0 ) + +replace github.com/openshift/api => github.com/joelddiaz/api v0.0.0-20200709114332-a68340a89e61 diff --git a/go.sum b/go.sum index 674d018367..5dbdd67665 100644 --- a/go.sum +++ b/go.sum @@ -306,6 +306,8 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/joelddiaz/api v0.0.0-20200709114332-a68340a89e61 h1:B693pYVuSdnyy8Q1toofJwkpa4QMuAmMeRxa4meFOyU= +github.com/joelddiaz/api v0.0.0-20200709114332-a68340a89e61/go.mod h1:l6TGeqJ92DrZBuWMNKcot1iZUHfbYSJyBWHGgg6Dn6s= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -368,9 +370,6 @@ github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.0.0-20191031171055-b133feaeeb2e/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/openshift/api v0.0.0-20200521101457-60c476765272/go.mod h1:TkhafijfTiRi1Q3120/ZSE4oIWKQ4DGRh3byPywv4Mw= -github.com/openshift/api v0.0.0-20200609191024-dca637550e8c h1:bKFV0gBWD+jg/xbR4jrf4jBFQE/c/jXj3bzDw8nZghU= -github.com/openshift/api v0.0.0-20200609191024-dca637550e8c/go.mod h1:l6TGeqJ92DrZBuWMNKcot1iZUHfbYSJyBWHGgg6Dn6s= github.com/openshift/build-machinery-go v0.0.0-20200424080330-082bf86082cc h1:Bu1p7+ItPqhJhmMve7sVluKCYV+o+x1Ede0WY2/BI8Q= github.com/openshift/build-machinery-go v0.0.0-20200424080330-082bf86082cc/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc= github.com/openshift/client-go v0.0.0-20200521150516-05eb9880269c h1:l7CmbzzkyWl4Y6qHmy6m4FvbH4iLnIXGrXqOfE5IFNA= diff --git a/hack/boilerplate.go.txt b/hack/boilerplate.go.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh deleted file mode 100755 index 3615c1c8a9..0000000000 --- a/hack/update-codegen.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -e - -set -x - -# set the passed in directory as a usable GOPATH -# that deepcopy-gen can operate in -ensure-temp-gopath() { - fake_gopath=$1 - - # set up symlink pointing to our repo root - fake_repopath=$fake_gopath/src/github.com/openshift/cloud-credential-operator - mkdir -p "$(dirname "${fake_repopath}")" - ln -s "$REPO_FULL_PATH" "${fake_repopath}" -} - -SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/.. -REPO_FULL_PATH=$(realpath ${SCRIPT_ROOT}) -cd ${REPO_FULL_PATH} - -CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../../../k8s.io/code-generator)} - -verify="${VERIFY:-}" - -valid_gopath=$(realpath $REPO_FULL_PATH/../../../..) -if [[ "$(realpath ${valid_gopath}/src/github.com/openshift/cloud-credential-operator)" == "${REPO_FULL_PATH}" ]]; then - temp_gopath=${valid_gopath} -else - TMP_DIR=$(mktemp -d -t cloud-credential-operator-codegen.XXXX) - function finish { - chmod -R +w ${TMP_DIR} - # ok b/c we will symlink to the original repo - rm -r ${TMP_DIR} - } - trap finish EXIT - - ensure-temp-gopath ${TMP_DIR} - - temp_gopath=${TMP_DIR} -fi - -GOPATH="${temp_gopath}" GOFLAGS="" bash ${CODEGEN_PKG}/generate-groups.sh "deepcopy" \ - github.com/openshift/cloud-credential-operator/pkg/client \ - github.com/openshift/cloud-credential-operator/pkg/apis \ - "cloudcredential:v1" \ - --go-header-file ${REPO_FULL_PATH}/hack/boilerplate.go.txt \ - ${verify} diff --git a/hack/verify-codegen.sh b/hack/verify-codegen.sh deleted file mode 100755 index a2d178d062..0000000000 --- a/hack/verify-codegen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/.. -VERIFY=--verify-only ${SCRIPT_ROOT}/hack/update-codegen.sh diff --git a/pkg/apis/addtoscheme_cloudcreds_v1.go b/pkg/apis/addtoscheme_cloudcreds_v1.go deleted file mode 100644 index c167e350d2..0000000000 --- a/pkg/apis/addtoscheme_cloudcreds_v1.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2018 The OpenShift Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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 apis - -import ( - "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" -) - -func init() { - // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back - AddToSchemes = append(AddToSchemes, v1.SchemeBuilder.AddToScheme) -} diff --git a/pkg/apis/apis.go b/pkg/apis/apis.go deleted file mode 100644 index 7d7ab48b19..0000000000 --- a/pkg/apis/apis.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2018 The OpenShift Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Generate deepcopy for apis -//go:generate go run -mod vendor ../../vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./... -h ../../hack/boilerplate.go.txt - -// Package apis contains Kubernetes API groups. -package apis - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// AddToSchemes may be used to add all resources defined in the project to a Scheme -var AddToSchemes runtime.SchemeBuilder - -// AddToScheme adds all Resources to the Scheme -func AddToScheme(s *runtime.Scheme) error { - return AddToSchemes.AddToScheme(s) -} diff --git a/pkg/apis/cloudcredential/group.go b/pkg/apis/cloudcredential/group.go deleted file mode 100644 index 7a282e30fe..0000000000 --- a/pkg/apis/cloudcredential/group.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2018 The OpenShift Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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 cloudcredential contains cloudcredential API versions -package cloudcredential diff --git a/pkg/apis/cloudcredential/v1/aws_manual.deepcopy_test.go b/pkg/apis/cloudcredential/v1/aws_manual.deepcopy_test.go deleted file mode 100644 index c515f370c1..0000000000 --- a/pkg/apis/cloudcredential/v1/aws_manual.deepcopy_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package v1 - -import ( - "testing" - - "k8s.io/apimachinery/pkg/runtime" - - "github.com/stretchr/testify/assert" -) - -func TestAWSProviderSpecDeepCopy(t *testing.T) { - - tests := []struct { - name string - providerSpec *AWSProviderSpec - }{ - { - name: "basic provider spec", - providerSpec: &AWSProviderSpec{ - StatementEntries: []StatementEntry{ - { - Effect: "Allow", - Action: []string{ - "iam:Action1", - "iam:Action2", - }, - Resource: "*", - }, - }, - }, - }, - { - name: "with conditions", - providerSpec: &AWSProviderSpec{ - StatementEntries: []StatementEntry{ - { - Effect: "Allow", - Action: []string{ - "iam:Action1", - "iam:Action2", - }, - Resource: "*", - PolicyCondition: IAMPolicyCondition{ - "StringEquals": IAMPolicyConditionKeyValue{ - "aws:userid": "testuser", - }, - "StringNotEquals": IAMPolicyConditionKeyValue{ - "aws:SourceVpc": "vpc-12345", - }, - }, - }, - }, - }, - }, - { - name: "nil provider spec", - providerSpec: nil, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - dCopy := test.providerSpec.DeepCopy() - assert.Equal(t, test.providerSpec, dCopy, "expected the DeepCopy() results to be deeply equal") - - if test.providerSpec != nil { - newAWSProviderSpec := &AWSProviderSpec{} - test.providerSpec.DeepCopyInto(newAWSProviderSpec) - assert.Equal(t, test.providerSpec, newAWSProviderSpec, "expected the DeepCopyInto() results to be deeply equal") - - dCopyObject := test.providerSpec.DeepCopyObject() - testProviderSpecObject := runtime.Object(test.providerSpec) - assert.Equal(t, testProviderSpecObject, dCopyObject, "expected the DeepCopyObject() results to be equal") - } - }) - } -} diff --git a/pkg/apis/cloudcredential/v1/doc.go b/pkg/apis/cloudcredential/v1/doc.go deleted file mode 100644 index 9b77a72e6f..0000000000 --- a/pkg/apis/cloudcredential/v1/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2018 The OpenShift Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1 contains API Schema definitions for the cloudcredential v1 API group -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential -// +k8s:defaulter-gen=TypeMeta -// +groupName=cloudcredential.openshift.io -package v1 diff --git a/pkg/aws/actuator/actuator.go b/pkg/aws/actuator/actuator.go index ad1699b5bd..53de6b75eb 100644 --- a/pkg/aws/actuator/actuator.go +++ b/pkg/aws/actuator/actuator.go @@ -24,7 +24,6 @@ import ( log "github.com/sirupsen/logrus" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" ccaws "github.com/openshift/cloud-credential-operator/pkg/aws" minteraws "github.com/openshift/cloud-credential-operator/pkg/aws" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" @@ -33,6 +32,7 @@ import ( "github.com/openshift/cloud-credential-operator/pkg/operator/utils" awsutils "github.com/openshift/cloud-credential-operator/pkg/operator/utils/aws" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" "github.com/aws/aws-sdk-go/aws" diff --git a/pkg/aws/actuator/actuator_test.go b/pkg/aws/actuator/actuator_test.go index 7ec15e7683..55cd946740 100644 --- a/pkg/aws/actuator/actuator_test.go +++ b/pkg/aws/actuator/actuator_test.go @@ -32,8 +32,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - "github.com/openshift/cloud-credential-operator/pkg/apis" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + "github.com/openshift/api/cloudcredential" + minterv1 "github.com/openshift/api/cloudcredential/v1" + ccaws "github.com/openshift/cloud-credential-operator/pkg/aws" mockaws "github.com/openshift/cloud-credential-operator/pkg/aws/mock" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" @@ -63,7 +64,7 @@ func (a *awsClientBuilderRecorder) ClientBuilder(accessKeyID, secretAccessKey [] } func TestCredentialsFetching(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) codec, err := minterv1.NewCodec() if err != nil { diff --git a/pkg/aws/utils.go b/pkg/aws/utils.go index 2d9ec5dd4d..0528a36da3 100644 --- a/pkg/aws/utils.go +++ b/pkg/aws/utils.go @@ -5,7 +5,7 @@ import ( log "github.com/sirupsen/logrus" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" diff --git a/pkg/azure/actuator.go b/pkg/azure/actuator.go index ef431e700f..313b0016e5 100644 --- a/pkg/azure/actuator.go +++ b/pkg/azure/actuator.go @@ -23,8 +23,6 @@ import ( "reflect" "time" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" - corev1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -39,6 +37,7 @@ import ( log "github.com/sirupsen/logrus" "sigs.k8s.io/controller-runtime/pkg/client" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" ) diff --git a/pkg/azure/actuator_test.go b/pkg/azure/actuator_test.go index 55b781f1f0..c3f2ecc32f 100644 --- a/pkg/azure/actuator_test.go +++ b/pkg/azure/actuator_test.go @@ -27,8 +27,10 @@ import ( "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources" "github.com/Azure/go-autorest/autorest/to" "github.com/golang/mock/gomock" + + minterv1 "github.com/openshift/api/cloudcredential/v1" openshiftapiv1 "github.com/openshift/api/config/v1" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + "github.com/openshift/cloud-credential-operator/pkg/azure" azuremock "github.com/openshift/cloud-credential-operator/pkg/azure/mock" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" diff --git a/pkg/azure/base.go b/pkg/azure/base.go index a7e559fa9f..db5271dce2 100644 --- a/pkg/azure/base.go +++ b/pkg/azure/base.go @@ -19,10 +19,11 @@ package azure import ( "context" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" + + minterv1 "github.com/openshift/api/cloudcredential/v1" ) type base struct { diff --git a/pkg/azure/client.go b/pkg/azure/client.go index 59b1212deb..ae36c3b961 100644 --- a/pkg/azure/client.go +++ b/pkg/azure/client.go @@ -20,7 +20,8 @@ import ( "context" "fmt" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" + "github.com/openshift/cloud-credential-operator/pkg/operator/constants" "github.com/openshift/cloud-credential-operator/pkg/operator/credentialsrequest/actuator" diff --git a/pkg/azure/passthrough.go b/pkg/azure/passthrough.go index fee530e73a..8d8fa8eeca 100644 --- a/pkg/azure/passthrough.go +++ b/pkg/azure/passthrough.go @@ -21,7 +21,8 @@ import ( "fmt" "reflect" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" + "github.com/openshift/cloud-credential-operator/pkg/operator/constants" "github.com/openshift/cloud-credential-operator/pkg/operator/credentialsrequest/actuator" actuatoriface "github.com/openshift/cloud-credential-operator/pkg/operator/credentialsrequest/actuator" diff --git a/pkg/azure/passthrough_test.go b/pkg/azure/passthrough_test.go index b4b67ff5ab..47f51417c7 100644 --- a/pkg/azure/passthrough_test.go +++ b/pkg/azure/passthrough_test.go @@ -20,8 +20,9 @@ import ( "context" "testing" + minterv1 "github.com/openshift/api/cloudcredential/v1" openshiftapiv1 "github.com/openshift/api/config/v1" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + "github.com/openshift/cloud-credential-operator/pkg/azure" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" "github.com/stretchr/testify/assert" diff --git a/pkg/azure/request.go b/pkg/azure/request.go index 54f73f1df1..010795a2fd 100644 --- a/pkg/azure/request.go +++ b/pkg/azure/request.go @@ -16,7 +16,7 @@ limitations under the License. package azure -import minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" +import minterv1 "github.com/openshift/api/cloudcredential/v1" type request struct { *minterv1.CredentialsRequest diff --git a/pkg/cmd/operator/cmd.go b/pkg/cmd/operator/cmd.go index 7fc90491e0..533aed42fb 100644 --- a/pkg/cmd/operator/cmd.go +++ b/pkg/cmd/operator/cmd.go @@ -26,8 +26,9 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "github.com/openshift/cloud-credential-operator/pkg/apis" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + "github.com/openshift/api/cloudcredential" + minterv1 "github.com/openshift/api/cloudcredential/v1" + controller "github.com/openshift/cloud-credential-operator/pkg/operator" openshiftapiv1 "github.com/openshift/api/config/v1" @@ -85,7 +86,7 @@ func NewOperator() *cobra.Command { // Setup Scheme for all resources log.Info("setting up scheme") - if err := apis.AddToScheme(mgr.GetScheme()); err != nil { + if err := cloudcredential.Install(mgr.GetScheme()); err != nil { log.WithError(err).Fatal("unable to add APIs to scheme") } diff --git a/pkg/cmd/render/render.go b/pkg/cmd/render/render.go index 2074803010..0e4f16fb35 100644 --- a/pkg/cmd/render/render.go +++ b/pkg/cmd/render/render.go @@ -28,7 +28,8 @@ import ( corev1 "k8s.io/api/core/v1" yaml "k8s.io/apimachinery/pkg/util/yaml" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" + assets "github.com/openshift/cloud-credential-operator/pkg/assets/bootstrap" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" "github.com/openshift/cloud-credential-operator/pkg/operator/utils" diff --git a/pkg/gcp/actuator/actuator.go b/pkg/gcp/actuator/actuator.go index 6976147012..37926a63cc 100644 --- a/pkg/gcp/actuator/actuator.go +++ b/pkg/gcp/actuator/actuator.go @@ -25,7 +25,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" + ccgcp "github.com/openshift/cloud-credential-operator/pkg/gcp" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" actuatoriface "github.com/openshift/cloud-credential-operator/pkg/operator/credentialsrequest/actuator" diff --git a/pkg/gcp/actuator/utils.go b/pkg/gcp/actuator/utils.go index 4d003f2660..9ad02f8ec5 100644 --- a/pkg/gcp/actuator/utils.go +++ b/pkg/gcp/actuator/utils.go @@ -26,7 +26,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" ) type gcpAuthJSON struct { diff --git a/pkg/openstack/actuator.go b/pkg/openstack/actuator.go index e5ccaeda68..6380ef9f4b 100644 --- a/pkg/openstack/actuator.go +++ b/pkg/openstack/actuator.go @@ -29,7 +29,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" + "github.com/openshift/cloud-credential-operator/pkg/operator/constants" actuatoriface "github.com/openshift/cloud-credential-operator/pkg/operator/credentialsrequest/actuator" ) diff --git a/pkg/operator/credentialsrequest/actuator/actuator.go b/pkg/operator/credentialsrequest/actuator/actuator.go index e130d7ccdb..de377c4247 100644 --- a/pkg/operator/credentialsrequest/actuator/actuator.go +++ b/pkg/operator/credentialsrequest/actuator/actuator.go @@ -20,7 +20,8 @@ import ( "k8s.io/apimachinery/pkg/types" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" + "github.com/openshift/cloud-credential-operator/pkg/operator/constants" ) diff --git a/pkg/operator/credentialsrequest/credentialsrequest_controller.go b/pkg/operator/credentialsrequest/credentialsrequest_controller.go index 333b30cb2d..8c6f0aff03 100644 --- a/pkg/operator/credentialsrequest/credentialsrequest_controller.go +++ b/pkg/operator/credentialsrequest/credentialsrequest_controller.go @@ -25,7 +25,6 @@ import ( log "github.com/sirupsen/logrus" "golang.org/x/time/rate" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" "github.com/openshift/cloud-credential-operator/pkg/operator/credentialsrequest/actuator" "github.com/openshift/cloud-credential-operator/pkg/operator/internalcontroller" @@ -33,6 +32,7 @@ import ( "github.com/openshift/cloud-credential-operator/pkg/operator/utils" "github.com/openshift/cloud-credential-operator/pkg/util/clusteroperator" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" corev1 "k8s.io/api/core/v1" diff --git a/pkg/operator/credentialsrequest/credentialsrequest_controller_gcp_test.go b/pkg/operator/credentialsrequest/credentialsrequest_controller_gcp_test.go index 7ee0d9a1e6..61d477a1f5 100644 --- a/pkg/operator/credentialsrequest/credentialsrequest_controller_gcp_test.go +++ b/pkg/operator/credentialsrequest/credentialsrequest_controller_gcp_test.go @@ -32,14 +32,14 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" + "github.com/openshift/api/cloudcredential" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/openshift/cloud-credential-operator/pkg/apis" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" mintergcp "github.com/openshift/cloud-credential-operator/pkg/gcp" "github.com/openshift/cloud-credential-operator/pkg/gcp/actuator" mockgcp "github.com/openshift/cloud-credential-operator/pkg/gcp/mock" @@ -85,7 +85,7 @@ func init() { } func TestCredentialsRequestGCPReconcile(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) configv1.Install(scheme.Scheme) codec, err := minterv1.NewCodec() diff --git a/pkg/operator/credentialsrequest/credentialsrequest_controller_test.go b/pkg/operator/credentialsrequest/credentialsrequest_controller_test.go index 801bcecc56..ef331979a5 100644 --- a/pkg/operator/credentialsrequest/credentialsrequest_controller_test.go +++ b/pkg/operator/credentialsrequest/credentialsrequest_controller_test.go @@ -34,14 +34,14 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" + "github.com/openshift/api/cloudcredential" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/openshift/cloud-credential-operator/pkg/apis" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" minteraws "github.com/openshift/cloud-credential-operator/pkg/aws" "github.com/openshift/cloud-credential-operator/pkg/aws/actuator" mockaws "github.com/openshift/cloud-credential-operator/pkg/aws/mock" @@ -77,7 +77,7 @@ type ExpectedCOCondition struct { } func TestCredentialsRequestReconcile(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) configv1.Install(scheme.Scheme) // Utility function to get the test credentials request from the fake client diff --git a/pkg/operator/credentialsrequest/credentialsrequest_controller_vsphere_test.go b/pkg/operator/credentialsrequest/credentialsrequest_controller_vsphere_test.go index 4a8c8173e4..5155f3ce5e 100644 --- a/pkg/operator/credentialsrequest/credentialsrequest_controller_vsphere_test.go +++ b/pkg/operator/credentialsrequest/credentialsrequest_controller_vsphere_test.go @@ -30,14 +30,14 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" + "github.com/openshift/api/cloudcredential" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/openshift/cloud-credential-operator/pkg/apis" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" "github.com/openshift/cloud-credential-operator/pkg/operator/utils" "github.com/openshift/cloud-credential-operator/pkg/util/clusteroperator" @@ -56,7 +56,7 @@ func init() { } func TestCredentialsRequestVSphereReconcile(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) configv1.Install(scheme.Scheme) codec, err := minterv1.NewCodec() diff --git a/pkg/operator/credentialsrequest/status.go b/pkg/operator/credentialsrequest/status.go index 807ce665cf..799eca9de1 100644 --- a/pkg/operator/credentialsrequest/status.go +++ b/pkg/operator/credentialsrequest/status.go @@ -8,9 +8,9 @@ import ( "github.com/pkg/errors" log "github.com/sirupsen/logrus" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" "github.com/openshift/cloud-credential-operator/pkg/operator/utils" "github.com/openshift/cloud-credential-operator/pkg/util/clusteroperator" diff --git a/pkg/operator/credentialsrequest/status_test.go b/pkg/operator/credentialsrequest/status_test.go index 4c0d10d080..e59be76e18 100644 --- a/pkg/operator/credentialsrequest/status_test.go +++ b/pkg/operator/credentialsrequest/status_test.go @@ -34,10 +34,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" + "github.com/openshift/api/cloudcredential" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" - "github.com/openshift/cloud-credential-operator/pkg/apis" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" "github.com/openshift/cloud-credential-operator/pkg/operator/credentialsrequest/actuator" ) @@ -49,7 +49,7 @@ var ( ) func TestClusterOperatorStatus(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) configv1.Install(scheme.Scheme) codec, err := minterv1.NewCodec() @@ -231,7 +231,7 @@ func TestClusterOperatorStatus(t *testing.T) { } func TestClusterOperatorVersion(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) configv1.Install(scheme.Scheme) twentyHoursAgo := metav1.Time{ diff --git a/pkg/operator/metrics/metrics.go b/pkg/operator/metrics/metrics.go index 20708f0e38..cce80e3a2b 100644 --- a/pkg/operator/metrics/metrics.go +++ b/pkg/operator/metrics/metrics.go @@ -16,9 +16,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/metrics" + credreqv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" - credreqv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" "github.com/openshift/cloud-credential-operator/pkg/operator/platform" "github.com/openshift/cloud-credential-operator/pkg/operator/utils" diff --git a/pkg/operator/metrics/metrics_test.go b/pkg/operator/metrics/metrics_test.go index 4f8467f6fa..fc1e152200 100644 --- a/pkg/operator/metrics/metrics_test.go +++ b/pkg/operator/metrics/metrics_test.go @@ -13,9 +13,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" + credreqv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" - credreqv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" ) diff --git a/pkg/operator/secretannotator/aws/reconciler_test.go b/pkg/operator/secretannotator/aws/reconciler_test.go index 44f1282309..f12d354c50 100644 --- a/pkg/operator/secretannotator/aws/reconciler_test.go +++ b/pkg/operator/secretannotator/aws/reconciler_test.go @@ -30,6 +30,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" + "github.com/openshift/api/cloudcredential" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" "sigs.k8s.io/controller-runtime/pkg/client" @@ -39,8 +41,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" - "github.com/openshift/cloud-credential-operator/pkg/apis" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" ccaws "github.com/openshift/cloud-credential-operator/pkg/aws" mockaws "github.com/openshift/cloud-credential-operator/pkg/aws/mock" @@ -83,7 +83,7 @@ func init() { } func TestSecretAnnotatorReconcile(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) configv1.Install(scheme.Scheme) tests := []struct { diff --git a/pkg/operator/secretannotator/azure/reconciler_test.go b/pkg/operator/secretannotator/azure/reconciler_test.go index 5dc273870d..5c3b8be07f 100644 --- a/pkg/operator/secretannotator/azure/reconciler_test.go +++ b/pkg/operator/secretannotator/azure/reconciler_test.go @@ -17,14 +17,13 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" + "github.com/openshift/api/cloudcredential" configv1 "github.com/openshift/api/config/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/openshift/cloud-credential-operator/pkg/apis" - ccazure "github.com/openshift/cloud-credential-operator/pkg/azure" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" . "github.com/openshift/cloud-credential-operator/pkg/operator/secretannotator/azure" @@ -51,7 +50,7 @@ var ( ) func TestAzureSecretAnnotatorReconcile(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) configv1.Install(scheme.Scheme) tests := []struct { diff --git a/pkg/operator/secretannotator/gcp/reconciler_test.go b/pkg/operator/secretannotator/gcp/reconciler_test.go index a6f8609f8d..7d37c54543 100644 --- a/pkg/operator/secretannotator/gcp/reconciler_test.go +++ b/pkg/operator/secretannotator/gcp/reconciler_test.go @@ -30,14 +30,14 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" + "github.com/openshift/api/cloudcredential" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/openshift/cloud-credential-operator/pkg/apis" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" ccgcp "github.com/openshift/cloud-credential-operator/pkg/gcp" mockgcp "github.com/openshift/cloud-credential-operator/pkg/gcp/mock" @@ -74,7 +74,7 @@ func init() { } func TestSecretAnnotatorReconcile(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) configv1.Install(scheme.Scheme) tests := []struct { diff --git a/pkg/operator/secretannotator/vsphere/reconciler_test.go b/pkg/operator/secretannotator/vsphere/reconciler_test.go index ddbaebbf72..095362437a 100644 --- a/pkg/operator/secretannotator/vsphere/reconciler_test.go +++ b/pkg/operator/secretannotator/vsphere/reconciler_test.go @@ -30,14 +30,14 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" + "github.com/openshift/api/cloudcredential" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/openshift/cloud-credential-operator/pkg/apis" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" ) @@ -52,7 +52,7 @@ func init() { } func TestSecretAnnotatorReconcile(t *testing.T) { - apis.AddToScheme(scheme.Scheme) + cloudcredential.Install(scheme.Scheme) configv1.Install(scheme.Scheme) tests := []struct { diff --git a/pkg/operator/utils/condition_utils.go b/pkg/operator/utils/condition_utils.go index fed97445d4..9733af7813 100644 --- a/pkg/operator/utils/condition_utils.go +++ b/pkg/operator/utils/condition_utils.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" ) // UpdateConditionCheck tests whether a condition should be updated from the diff --git a/pkg/operator/utils/gcp/utils.go b/pkg/operator/utils/gcp/utils.go index 3397c21a05..4dd117fd7a 100644 --- a/pkg/operator/utils/gcp/utils.go +++ b/pkg/operator/utils/gcp/utils.go @@ -22,7 +22,8 @@ import ( log "github.com/sirupsen/logrus" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" + ccgcp "github.com/openshift/cloud-credential-operator/pkg/gcp" cloudresourcemanager "google.golang.org/api/cloudresourcemanager/v1" diff --git a/pkg/operator/utils/utils.go b/pkg/operator/utils/utils.go index 2877f8a7e6..893e5e3d50 100644 --- a/pkg/operator/utils/utils.go +++ b/pkg/operator/utils/utils.go @@ -15,9 +15,9 @@ import ( log "github.com/sirupsen/logrus" + minterv1 "github.com/openshift/api/cloudcredential/v1" configv1 "github.com/openshift/api/config/v1" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" ) diff --git a/pkg/ovirt/actuator.go b/pkg/ovirt/actuator.go index 02276ddde3..0df9a1d026 100644 --- a/pkg/ovirt/actuator.go +++ b/pkg/ovirt/actuator.go @@ -29,7 +29,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" + minterv1 "github.com/openshift/api/cloudcredential/v1" + "github.com/openshift/cloud-credential-operator/pkg/operator/constants" actuatoriface "github.com/openshift/cloud-credential-operator/pkg/operator/credentialsrequest/actuator" ) diff --git a/pkg/vsphere/actuator/actuator.go b/pkg/vsphere/actuator/actuator.go index 72ae8ff3a2..5b1d6b3b19 100644 --- a/pkg/vsphere/actuator/actuator.go +++ b/pkg/vsphere/actuator/actuator.go @@ -22,7 +22,6 @@ import ( log "github.com/sirupsen/logrus" - minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" "github.com/openshift/cloud-credential-operator/pkg/operator/constants" actuatoriface "github.com/openshift/cloud-credential-operator/pkg/operator/credentialsrequest/actuator" @@ -32,6 +31,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" + + minterv1 "github.com/openshift/api/cloudcredential/v1" ) var _ actuatoriface.Actuator = (*VSphereActuator)(nil) diff --git a/vendor/github.com/openshift/api/Makefile b/vendor/github.com/openshift/api/Makefile index 4043bf04fd..6aa6a3d605 100644 --- a/vendor/github.com/openshift/api/Makefile +++ b/vendor/github.com/openshift/api/Makefile @@ -19,6 +19,7 @@ GO_LD_FLAGS:= # $3 - manifests # $4 - output $(call add-crd-gen,authorization,./authorization/v1,./authorization/v1,./authorization/v1) +$(call add-crd-gen,cloudcredential,./cloudcredential/v1,./cloudcredential/v1,./cloudcredential/v1) $(call add-crd-gen,config,./config/v1,./config/v1,./config/v1) $(call add-crd-gen,console,./console/v1,./console/v1,./console/v1) $(call add-crd-gen,imageregistry,./imageregistry/v1,./imageregistry/v1,./imageregistry/v1) diff --git a/vendor/github.com/openshift/api/cloudcredential/install.go b/vendor/github.com/openshift/api/cloudcredential/install.go new file mode 100644 index 0000000000..2f5e6ac3ac --- /dev/null +++ b/vendor/github.com/openshift/api/cloudcredential/install.go @@ -0,0 +1,26 @@ +package cloudcredential + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + ccv1 "github.com/openshift/api/cloudcredential/v1" +) + +const ( + GroupName = "cloudcredentials.openshift.io" +) + +var ( + schemeBuilder = runtime.NewSchemeBuilder(ccv1.Install) + // Install is a function which adds every version of this group to a scheme + Install = schemeBuilder.AddToScheme +) + +func Resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: GroupName, Resource: resource} +} + +func Kind(kind string) schema.GroupKind { + return schema.GroupKind{Group: GroupName, Kind: kind} +} diff --git a/vendor/github.com/openshift/api/cloudcredential/v1/0000_10_config-operator_01_credentialsrequest.crd.yaml b/vendor/github.com/openshift/api/cloudcredential/v1/0000_10_config-operator_01_credentialsrequest.crd.yaml new file mode 100644 index 0000000000..9e7daba24a --- /dev/null +++ b/vendor/github.com/openshift/api/cloudcredential/v1/0000_10_config-operator_01_credentialsrequest.crd.yaml @@ -0,0 +1,146 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: credentialsrequests.cloudcredential.openshift.io +spec: + group: cloudcredential.openshift.io + names: + kind: CredentialsRequest + listKind: CredentialsRequestList + plural: credentialsrequests + singular: credentialsrequest + scope: Namespaced + subresources: + status: {} + version: v1 + validation: + openAPIV3Schema: + description: CredentialsRequest is the Schema for the credentialsrequests API + 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: + description: CredentialsRequestSpec defines the desired state of CredentialsRequest + type: object + required: + - secretRef + properties: + providerSpec: + description: ProviderSpec contains the cloud provider specific credentials + specification. + type: object + secretRef: + description: SecretRef points to the secret where the credentials should + be stored once generated. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an + entire object, this string should contain a valid JSON/Go field + access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen only + to have some well-defined way of referencing a part of an object. + TODO: this design is not final and this field is subject to change + in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is + made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + status: + description: CredentialsRequestStatus defines the observed state of CredentialsRequest + type: object + required: + - lastSyncGeneration + - provisioned + properties: + conditions: + description: Conditions includes detailed status for the CredentialsRequest + type: array + items: + description: CredentialsRequestCondition contains details for any + of the conditions on a CredentialsRequest object + type: object + required: + - status + - type + properties: + lastProbeTime: + description: LastProbeTime is the last time we probed the condition + type: string + format: date-time + lastTransitionTime: + description: LastTransitionTime is the last time the condition + transitioned from one status to another. + type: string + format: date-time + message: + description: Message is a human-readable message indicating details + about the last transition + type: string + reason: + description: Reason is a unique, one-word, CamelCase reason for + the condition's last transition + type: string + status: + description: Status is the status of the condition + type: string + type: + description: Type is the specific type of the condition + type: string + lastSyncGeneration: + description: LastSyncGeneration is the generation of the credentials + request resource that was last synced. Used to determine if the object + has changed and requires a sync. + type: integer + format: int64 + lastSyncTimestamp: + description: LastSyncTimestamp is the time that the credentials were + last synced. + type: string + format: date-time + providerStatus: + description: ProviderStatus contains cloud provider specific status. + type: object + provisioned: + description: Provisioned is true once the credentials have been initially + provisioned. + type: boolean +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/pkg/apis/cloudcredential/v1/aws_manual.deepcopy.go b/vendor/github.com/openshift/api/cloudcredential/v1/aws_manual.deepcopy.go similarity index 100% rename from pkg/apis/cloudcredential/v1/aws_manual.deepcopy.go rename to vendor/github.com/openshift/api/cloudcredential/v1/aws_manual.deepcopy.go diff --git a/pkg/apis/cloudcredential/v1/codec.go b/vendor/github.com/openshift/api/cloudcredential/v1/codec.go similarity index 90% rename from pkg/apis/cloudcredential/v1/codec.go rename to vendor/github.com/openshift/api/cloudcredential/v1/codec.go index 3c96b0b5d7..9c8eadd31e 100644 --- a/pkg/apis/cloudcredential/v1/codec.go +++ b/vendor/github.com/openshift/api/cloudcredential/v1/codec.go @@ -40,9 +40,17 @@ type ProviderCodec struct { // NewCodec creates a serializer/deserializer for the provider configuration func NewCodec() (*ProviderCodec, error) { scheme, err := NewScheme() + //scheme := runtime.NewScheme() if err != nil { return nil, err } + // scheme.AddKnownTypes(SchemeGroupVersion, + // &CredentialsRequest{}, &CredentialsRequestList{}, + // &AWSProviderStatus{}, &AWSProviderSpec{}, + // &AzureProviderStatus{}, &AzureProviderSpec{}, + // &GCPProviderStatus{}, &GCPProviderSpec{}, + // &VSphereProviderStatus{}, &VSphereProviderSpec{}, + // ) codecFactory := serializer.NewCodecFactory(scheme) encoder, err := newEncoder(&codecFactory) if err != nil { diff --git a/vendor/github.com/openshift/api/cloudcredential/v1/doc.go b/vendor/github.com/openshift/api/cloudcredential/v1/doc.go new file mode 100644 index 0000000000..8109b11d37 --- /dev/null +++ b/vendor/github.com/openshift/api/cloudcredential/v1/doc.go @@ -0,0 +1,7 @@ +// +k8s:deepcopy-gen=package,register +// +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-gen=true + +// +kubebuilder:validation:Optional +// +groupName=cloudcredential.openshift.io +package v1 diff --git a/pkg/apis/cloudcredential/v1/register.go b/vendor/github.com/openshift/api/cloudcredential/v1/register.go similarity index 95% rename from pkg/apis/cloudcredential/v1/register.go rename to vendor/github.com/openshift/api/cloudcredential/v1/register.go index 53a8cb1010..510958d07e 100644 --- a/pkg/apis/cloudcredential/v1/register.go +++ b/vendor/github.com/openshift/api/cloudcredential/v1/register.go @@ -17,7 +17,7 @@ limitations under the License. // Package v1 contains API Schema definitions for the cloudcredential v1 API group // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential +// +k8s:conversion-gen=github.com/openshift/api/cloudcredential // +k8s:defaulter-gen=TypeMeta // +groupName=cloudcredential.openshift.io package v1 diff --git a/pkg/apis/cloudcredential/v1/types_aws.go b/vendor/github.com/openshift/api/cloudcredential/v1/types_aws.go similarity index 100% rename from pkg/apis/cloudcredential/v1/types_aws.go rename to vendor/github.com/openshift/api/cloudcredential/v1/types_aws.go diff --git a/pkg/apis/cloudcredential/v1/types_azure.go b/vendor/github.com/openshift/api/cloudcredential/v1/types_azure.go similarity index 100% rename from pkg/apis/cloudcredential/v1/types_azure.go rename to vendor/github.com/openshift/api/cloudcredential/v1/types_azure.go diff --git a/pkg/apis/cloudcredential/v1/types_credentialsrequest.go b/vendor/github.com/openshift/api/cloudcredential/v1/types_credentialsrequest.go similarity index 100% rename from pkg/apis/cloudcredential/v1/types_credentialsrequest.go rename to vendor/github.com/openshift/api/cloudcredential/v1/types_credentialsrequest.go diff --git a/pkg/apis/cloudcredential/v1/types_gcp.go b/vendor/github.com/openshift/api/cloudcredential/v1/types_gcp.go similarity index 100% rename from pkg/apis/cloudcredential/v1/types_gcp.go rename to vendor/github.com/openshift/api/cloudcredential/v1/types_gcp.go diff --git a/pkg/apis/cloudcredential/v1/types_openstack.go b/vendor/github.com/openshift/api/cloudcredential/v1/types_openstack.go similarity index 100% rename from pkg/apis/cloudcredential/v1/types_openstack.go rename to vendor/github.com/openshift/api/cloudcredential/v1/types_openstack.go diff --git a/pkg/apis/cloudcredential/v1/types_ovirt.go b/vendor/github.com/openshift/api/cloudcredential/v1/types_ovirt.go similarity index 100% rename from pkg/apis/cloudcredential/v1/types_ovirt.go rename to vendor/github.com/openshift/api/cloudcredential/v1/types_ovirt.go diff --git a/pkg/apis/cloudcredential/v1/types_vsphere.go b/vendor/github.com/openshift/api/cloudcredential/v1/types_vsphere.go similarity index 100% rename from pkg/apis/cloudcredential/v1/types_vsphere.go rename to vendor/github.com/openshift/api/cloudcredential/v1/types_vsphere.go diff --git a/pkg/apis/cloudcredential/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/cloudcredential/v1/zz_generated.deepcopy.go similarity index 100% rename from pkg/apis/cloudcredential/v1/zz_generated.deepcopy.go rename to vendor/github.com/openshift/api/cloudcredential/v1/zz_generated.deepcopy.go diff --git a/vendor/github.com/openshift/api/cloudcredential/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/cloudcredential/v1/zz_generated.swagger_doc_generated.go new file mode 100644 index 0000000000..dfcff65fdb --- /dev/null +++ b/vendor/github.com/openshift/api/cloudcredential/v1/zz_generated.swagger_doc_generated.go @@ -0,0 +1,205 @@ +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_AWSProviderSpec = map[string]string{ + "": "AWSProviderSpec contains the required information to create a user policy in AWS.", + "statementEntries": "StatementEntries contains a list of policy statements that should be associated with this credentials access key.", +} + +func (AWSProviderSpec) SwaggerDoc() map[string]string { + return map_AWSProviderSpec +} + +var map_AWSProviderStatus = map[string]string{ + "": "AWSProviderStatus containes the status of the credentials request in AWS.", + "user": "User is the name of the User created in AWS for these credentials.", + "policy": "Policy is the name of the policy attached to the user in AWS.", +} + +func (AWSProviderStatus) SwaggerDoc() map[string]string { + return map_AWSProviderStatus +} + +var map_StatementEntry = map[string]string{ + "": "StatementEntry models an AWS policy statement entry.", + "effect": "Effect indicates if this policy statement is to Allow or Deny.", + "action": "Action describes the particular AWS service actions that should be allowed or denied. (i.e. ec2:StartInstances, iam:ChangePassword)", + "resource": "Resource specifies the object(s) this statement should apply to. (or \"*\" for all)", + "policyCondition": "PolicyCondition specifies under which condition StatementEntry will apply", +} + +func (StatementEntry) SwaggerDoc() map[string]string { + return map_StatementEntry +} + +var map_AzureProviderSpec = map[string]string{ + "": "AzureProviderSpec contains the required information to create RBAC role bindings for Azure.", + "roleBindings": "RoleBindings contains a list of roles that should be associated with the minted credential.", +} + +func (AzureProviderSpec) SwaggerDoc() map[string]string { + return map_AzureProviderSpec +} + +var map_AzureProviderStatus = map[string]string{ + "": "AzureProviderStatus contains the status of the credentials request in Azure.", + "name": "ServicePrincipalName is the name of the service principal created in Azure for these credentials.", + "appID": "AppID is the application id of the service principal created in Azure for these credentials.", + "secretLastResourceVersion": "SecretLastResourceVersion is the resource version of the secret resource that was last synced. Used to determine if the object has changed and requires a sync.", +} + +func (AzureProviderStatus) SwaggerDoc() map[string]string { + return map_AzureProviderStatus +} + +var map_RoleBinding = map[string]string{ + "": "RoleBinding models part of the Azure RBAC Role Binding", + "role": "Role defines a set of permissions that should be associated with the minted credential.", +} + +func (RoleBinding) SwaggerDoc() map[string]string { + return map_RoleBinding +} + +var map_CredentialsRequest = map[string]string{ + "": "CredentialsRequest is the Schema for the credentialsrequests API", +} + +func (CredentialsRequest) SwaggerDoc() map[string]string { + return map_CredentialsRequest +} + +var map_CredentialsRequestCondition = map[string]string{ + "": "CredentialsRequestCondition contains details for any of the conditions on a CredentialsRequest object", + "type": "Type is the specific type of the condition", + "status": "Status is the status of the condition", + "lastProbeTime": "LastProbeTime is the last time we probed the condition", + "lastTransitionTime": "LastTransitionTime is the last time the condition transitioned from one status to another.", + "reason": "Reason is a unique, one-word, CamelCase reason for the condition's last transition", + "message": "Message is a human-readable message indicating details about the last transition", +} + +func (CredentialsRequestCondition) SwaggerDoc() map[string]string { + return map_CredentialsRequestCondition +} + +var map_CredentialsRequestList = map[string]string{ + "": "CredentialsRequestList contains a list of CredentialsRequest", +} + +func (CredentialsRequestList) SwaggerDoc() map[string]string { + return map_CredentialsRequestList +} + +var map_CredentialsRequestSpec = map[string]string{ + "": "CredentialsRequestSpec defines the desired state of CredentialsRequest", + "secretRef": "SecretRef points to the secret where the credentials should be stored once generated.", + "providerSpec": "ProviderSpec contains the cloud provider specific credentials specification.", +} + +func (CredentialsRequestSpec) SwaggerDoc() map[string]string { + return map_CredentialsRequestSpec +} + +var map_CredentialsRequestStatus = map[string]string{ + "": "CredentialsRequestStatus defines the observed state of CredentialsRequest", + "provisioned": "Provisioned is true once the credentials have been initially provisioned.", + "lastSyncTimestamp": "LastSyncTimestamp is the time that the credentials were last synced.", + "lastSyncGeneration": "LastSyncGeneration is the generation of the credentials request resource that was last synced. Used to determine if the object has changed and requires a sync.", + "providerStatus": "ProviderStatus contains cloud provider specific status.", + "conditions": "Conditions includes detailed status for the CredentialsRequest", +} + +func (CredentialsRequestStatus) SwaggerDoc() map[string]string { + return map_CredentialsRequestStatus +} + +var map_GCPProviderSpec = map[string]string{ + "": "GCPProviderSpec contains the required information to create a service account with policy bindings in GCP.", + "predefinedRoles": "PredefinedRoles is the list of GCP pre-defined roles that the CredentialsRequest requires.", + "skipServiceCheck": "SkipServiceCheck can be set to true to skip the check whether the requested roles have the necessary services enabled", +} + +func (GCPProviderSpec) SwaggerDoc() map[string]string { + return map_GCPProviderSpec +} + +var map_GCPProviderStatus = map[string]string{ + "": "GCPProviderStatus contains the status of the GCP credentials request.", + "serviceAccountID": "ServiceAccountID is the ID of the service account created in GCP for the requested credentials.", +} + +func (GCPProviderStatus) SwaggerDoc() map[string]string { + return map_GCPProviderStatus +} + +var map_OpenStackProviderSpec = map[string]string{ + "": "OpenStackProviderSpec the specification of the credentials request in OpenStack.", +} + +func (OpenStackProviderSpec) SwaggerDoc() map[string]string { + return map_OpenStackProviderSpec +} + +var map_OpenStackProviderStatus = map[string]string{ + "": "OpenStackProviderStatus contains the status of the credentials request in OpenStack.", +} + +func (OpenStackProviderStatus) SwaggerDoc() map[string]string { + return map_OpenStackProviderStatus +} + +var map_OvirtProviderSpec = map[string]string{ + "": "OvirtProviderSpec the specification of the credentials request in Ovirt.", +} + +func (OvirtProviderSpec) SwaggerDoc() map[string]string { + return map_OvirtProviderSpec +} + +var map_OvirtProviderStatus = map[string]string{ + "": "OvirtProviderStatus contains the status of the credentials request in Ovirt.", +} + +func (OvirtProviderStatus) SwaggerDoc() map[string]string { + return map_OvirtProviderStatus +} + +var map_VSpherePermission = map[string]string{ + "": "VSpherePermission captures the details of the privileges being requested for the list of entities.", + "privileges": "Privileges is the list of access being requested.", +} + +func (VSpherePermission) SwaggerDoc() map[string]string { + return map_VSpherePermission +} + +var map_VSphereProviderSpec = map[string]string{ + "": "VSphereProviderSpec contains the required information to create RBAC role bindings for VSphere.", + "permissions": "Permissions contains a list of groups of privileges that are being requested.", +} + +func (VSphereProviderSpec) SwaggerDoc() map[string]string { + return map_VSphereProviderSpec +} + +var map_VSphereProviderStatus = map[string]string{ + "": "VSphereProviderStatus contains the status of the credentials request in VSphere.", + "secretLastResourceVersion": "SecretLastResourceVersion is the resource version of the secret resource that was last synced. Used to determine if the object has changed and requires a sync.", +} + +func (VSphereProviderStatus) SwaggerDoc() map[string]string { + return map_VSphereProviderStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml index 0fbf020bd8..08aacfeef9 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml @@ -71,16 +71,40 @@ spec: mode in use. Specifically, it manages the component that responds to login attempts. The default is IntegratedOAuth. type: string - webhookTokenAuthenticators: - description: webhookTokenAuthenticators configures remote token reviewers. + webhookTokenAuthenticator: + description: webhookTokenAuthenticator configures a remote token reviewer. These remote authentication webhooks can be used to verify bearer - tokens via the tokenreviews.authentication.k8s.io REST API. This - is required to honor bearer tokens that are provisioned by an external - authentication service. The namespace for these secrets is openshift-config. + tokens via the tokenreviews.authentication.k8s.io REST API. This is + required to honor bearer tokens that are provisioned by an external + authentication service. + type: object + required: + - kubeConfig + properties: + kubeConfig: + description: "kubeConfig references a secret that contains kube + config file data which describes how to access the remote webhook + service. The namespace for the referenced secret is openshift-config. + \n For further details, see: \n https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication + \n The key \"kubeConfig\" is used to locate the data. If the secret + or expected key is not found, the webhook is not honored. If the + specified kube config data is not valid, the webhook is not honored." + type: object + required: + - name + properties: + name: + description: name is the metadata.name of the referenced secret + type: string + webhookTokenAuthenticators: + description: webhookTokenAuthenticators is DEPRECATED, setting it has + no effect. type: array items: - description: webhookTokenAuthenticator holds the necessary configuration - options for a remote token authenticator + description: deprecatedWebhookTokenAuthenticator holds the necessary + configuration options for a remote token authenticator. It's the + same as WebhookTokenAuthenticator but it's missing the 'required' + validation on KubeConfig field. type: object properties: kubeConfig: diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml index f3957ce34a..e6bffc88c2 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml @@ -305,6 +305,12 @@ spec: description: BuildOverrides controls override settings for builds type: object properties: + forcePull: + description: ForcePull overrides, if set, the equivalent value in + the builds, i.e. false disables force pull for all builds, true + enables force pull for all builds, independently of what each + build specifies itself + type: boolean imageLabels: description: ImageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml index bc3b62a871..958f3b7e24 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml @@ -106,6 +106,14 @@ spec: type: array items: type: string + serviceNodePortRange: + description: The port range allowed for Services of type NodePort. If + not specified, the default of 30000-32767 will be used. Such Services + without a NodePort specified will have one automatically allocated + from this range. This parameter can be updated after the cluster is + installed. + type: string + pattern: ^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])-([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ status: description: status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml index 3bca0f60c5..27872cd854 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml @@ -636,6 +636,16 @@ spec: tokens type: object properties: + accessTokenInactivityTimeout: + description: accessTokenInactivityTimeout defines the token inactivity + timeout for tokens granted by any client. The value represents + the maximum amount of time that can occur between consecutive + uses of the token. Tokens become invalid if they are not used + within this temporal window. The user will need to acquire a new + token to regain access once a token times out. If this value is + not set, then tokens are valid until their expiry. Takes valid + time duration string such as "5m", "1.5h" or "2h45m". + type: string accessTokenInactivityTimeoutSeconds: description: 'accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.' diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml index 6f5336c8f6..7c1ebc34b0 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml @@ -45,13 +45,14 @@ spec: defaultNodeSelector: description: 'defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is - applied to the pods created in all namespaces without a specified - nodeSelector value. For example, defaultNodeSelector: "type=user-node,region=east" - would set nodeSelector field in pod spec to "type=user-node,region=east" - to all pods created in all namespaces. Namespaces having project-wide - node selectors won''t be impacted even if this field is set. This - adds an annotation section to the namespace. For example, if a new - namespace is created with node-selector=''type=user-node,region=east'', + applied to the pods created in all namespaces and creates an intersection + with any existing nodeSelectors already set on a pod, additionally + constraining that pod''s selector. For example, defaultNodeSelector: + "type=user-node,region=east" would set nodeSelector field in pod spec + to "type=user-node,region=east" to all pods created in all namespaces. + Namespaces having project-wide node selectors won''t be impacted even + if this field is set. This adds an annotation section to the namespace. + For example, if a new namespace is created with node-selector=''type=user-node,region=east'', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value diff --git a/vendor/github.com/openshift/api/config/v1/types_authentication.go b/vendor/github.com/openshift/api/config/v1/types_authentication.go index 4f87bd5219..131af5a0ca 100644 --- a/vendor/github.com/openshift/api/config/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/config/v1/types_authentication.go @@ -43,13 +43,15 @@ type AuthenticationSpec struct { // +optional OAuthMetadata ConfigMapNameReference `json:"oauthMetadata"` - // webhookTokenAuthenticators configures remote token reviewers. + // webhookTokenAuthenticators is DEPRECATED, setting it has no effect. + WebhookTokenAuthenticators []DeprecatedWebhookTokenAuthenticator `json:"webhookTokenAuthenticators,omitempty"` + + // webhookTokenAuthenticator configures a remote token reviewer. // These remote authentication webhooks can be used to verify bearer tokens - // via the tokenreviews.authentication.k8s.io REST API. This is required to + // via the tokenreviews.authentication.k8s.io REST API. This is required to // honor bearer tokens that are provisioned by an external authentication service. - // The namespace for these secrets is openshift-config. // +optional - WebhookTokenAuthenticators []WebhookTokenAuthenticator `json:"webhookTokenAuthenticators,omitempty"` + WebhookTokenAuthenticator *WebhookTokenAuthenticator `json:"webhookTokenAuthenticator,omitempty"` // serviceAccountIssuer is the identifier of the bound service account token // issuer. @@ -103,8 +105,9 @@ const ( // AuthenticationTypeKeycloak AuthenticationType = "Keycloak" ) -// webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator -type WebhookTokenAuthenticator struct { +// deprecatedWebhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator. +// It's the same as WebhookTokenAuthenticator but it's missing the 'required' validation on KubeConfig field. +type DeprecatedWebhookTokenAuthenticator struct { // kubeConfig contains kube config file data which describes how to access the remote webhook service. // For further details, see: // https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication @@ -115,6 +118,24 @@ type WebhookTokenAuthenticator struct { KubeConfig SecretNameReference `json:"kubeConfig"` } +// webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator +type WebhookTokenAuthenticator struct { + // kubeConfig references a secret that contains kube config file data which + // describes how to access the remote webhook service. + // The namespace for the referenced secret is openshift-config. + // + // For further details, see: + // + // https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication + // + // The key "kubeConfig" is used to locate the data. + // If the secret or expected key is not found, the webhook is not honored. + // If the specified kube config data is not valid, the webhook is not honored. + // +kubebuilder:validation:Required + // +required + KubeConfig SecretNameReference `json:"kubeConfig"` +} + const ( // OAuthMetadataKey is the key for the oauth authorization server metadata OAuthMetadataKey = "oauthMetadata" diff --git a/vendor/github.com/openshift/api/config/v1/types_build.go b/vendor/github.com/openshift/api/config/v1/types_build.go index ef4512aa17..16882e1caf 100644 --- a/vendor/github.com/openshift/api/config/v1/types_build.go +++ b/vendor/github.com/openshift/api/config/v1/types_build.go @@ -97,6 +97,13 @@ type BuildOverrides struct { // tolerations set on a build pod. // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` + + // ForcePull overrides, if set, the equivalent value in the builds, + // i.e. false disables force pull for all builds, + // true enables force pull for all builds, + // independently of what each build specifies itself + // +optional + ForcePull *bool `json:"forcePull,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/github.com/openshift/api/config/v1/types_network.go b/vendor/github.com/openshift/api/config/v1/types_network.go index a09c5fe8ed..029ac04910 100644 --- a/vendor/github.com/openshift/api/config/v1/types_network.go +++ b/vendor/github.com/openshift/api/config/v1/types_network.go @@ -51,6 +51,15 @@ type NetworkSpec struct { // not allowed to be set. // +optional ExternalIP *ExternalIPConfig `json:"externalIP,omitempty"` + + // The port range allowed for Services of type NodePort. + // If not specified, the default of 30000-32767 will be used. + // Such Services without a NodePort specified will have one + // automatically allocated from this range. + // This parameter can be updated after the cluster is + // installed. + // +kubebuilder:validation:Pattern=`^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])-([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$` + ServiceNodePortRange string `json:"serviceNodePortRange,omitempty"` } // NetworkStatus is the current network configuration. diff --git a/vendor/github.com/openshift/api/config/v1/types_oauth.go b/vendor/github.com/openshift/api/config/v1/types_oauth.go index a3fb7ac87e..7b61f92796 100644 --- a/vendor/github.com/openshift/api/config/v1/types_oauth.go +++ b/vendor/github.com/openshift/api/config/v1/types_oauth.go @@ -51,6 +51,17 @@ type TokenConfig struct { // accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect. // +optional AccessTokenInactivityTimeoutSeconds int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"` + + // accessTokenInactivityTimeout defines the token inactivity timeout + // for tokens granted by any client. + // The value represents the maximum amount of time that can occur between + // consecutive uses of the token. Tokens become invalid if they are not + // used within this temporal window. The user will need to acquire a new + // token to regain access once a token times out. + // If this value is not set, then tokens are valid until their expiry. + // Takes valid time duration string such as "5m", "1.5h" or "2h45m". + // +optional + AccessTokenInactivityTimeout metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"` } const ( diff --git a/vendor/github.com/openshift/api/config/v1/types_scheduling.go b/vendor/github.com/openshift/api/config/v1/types_scheduling.go index d5bf0c3627..c54bb49e98 100644 --- a/vendor/github.com/openshift/api/config/v1/types_scheduling.go +++ b/vendor/github.com/openshift/api/config/v1/types_scheduling.go @@ -30,7 +30,8 @@ type SchedulerSpec struct { Policy ConfigMapNameReference `json:"policy"` // defaultNodeSelector helps set the cluster-wide default node selector to // restrict pod placement to specific nodes. This is applied to the pods - // created in all namespaces without a specified nodeSelector value. + // created in all namespaces and creates an intersection with any existing + // nodeSelectors already set on a pod, additionally constraining that pod's selector. // For example, // defaultNodeSelector: "type=user-node,region=east" would set nodeSelector // field in pod spec to "type=user-node,region=east" to all pods created diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go index 1403ca3b26..cf6163d9d9 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go @@ -368,9 +368,14 @@ func (in *AuthenticationSpec) DeepCopyInto(out *AuthenticationSpec) { out.OAuthMetadata = in.OAuthMetadata if in.WebhookTokenAuthenticators != nil { in, out := &in.WebhookTokenAuthenticators, &out.WebhookTokenAuthenticators - *out = make([]WebhookTokenAuthenticator, len(*in)) + *out = make([]DeprecatedWebhookTokenAuthenticator, len(*in)) copy(*out, *in) } + if in.WebhookTokenAuthenticator != nil { + in, out := &in.WebhookTokenAuthenticator, &out.WebhookTokenAuthenticator + *out = new(WebhookTokenAuthenticator) + **out = **in + } return } @@ -603,6 +608,11 @@ func (in *BuildOverrides) DeepCopyInto(out *BuildOverrides) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.ForcePull != nil { + in, out := &in.ForcePull, &out.ForcePull + *out = new(bool) + **out = **in + } return } @@ -1293,6 +1303,23 @@ func (in *DelegatedAuthorization) DeepCopy() *DelegatedAuthorization { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeprecatedWebhookTokenAuthenticator) DeepCopyInto(out *DeprecatedWebhookTokenAuthenticator) { + *out = *in + out.KubeConfig = in.KubeConfig + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeprecatedWebhookTokenAuthenticator. +func (in *DeprecatedWebhookTokenAuthenticator) DeepCopy() *DeprecatedWebhookTokenAuthenticator { + if in == nil { + return nil + } + out := new(DeprecatedWebhookTokenAuthenticator) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EtcdConnectionInfo) DeepCopyInto(out *EtcdConnectionInfo) { *out = *in @@ -3518,6 +3545,7 @@ func (in *TemplateReference) DeepCopy() *TemplateReference { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TokenConfig) DeepCopyInto(out *TokenConfig) { *out = *in + out.AccessTokenInactivityTimeout = in.AccessTokenInactivityTimeout return } diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index bc7ee9e906..7844e1ba24 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -304,7 +304,8 @@ func (Authentication) SwaggerDoc() map[string]string { var map_AuthenticationSpec = map[string]string{ "type": "type identifies the cluster managed, user facing authentication mode in use. Specifically, it manages the component that responds to login attempts. The default is IntegratedOAuth.", "oauthMetadata": "oauthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for an external OAuth server. This discovery document can be viewed from its served location: oc get --raw '/.well-known/oauth-authorization-server' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 If oauthMetadata.name is non-empty, this value has precedence over any metadata reference stored in status. The key \"oauthMetadata\" is used to locate the data. If specified and the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config.", - "webhookTokenAuthenticators": "webhookTokenAuthenticators configures remote token reviewers. These remote authentication webhooks can be used to verify bearer tokens via the tokenreviews.authentication.k8s.io REST API. This is required to honor bearer tokens that are provisioned by an external authentication service. The namespace for these secrets is openshift-config.", + "webhookTokenAuthenticators": "webhookTokenAuthenticators is DEPRECATED, setting it has no effect.", + "webhookTokenAuthenticator": "webhookTokenAuthenticator configures a remote token reviewer. These remote authentication webhooks can be used to verify bearer tokens via the tokenreviews.authentication.k8s.io REST API. This is required to honor bearer tokens that are provisioned by an external authentication service.", "serviceAccountIssuer": "serviceAccountIssuer is the identifier of the bound service account token issuer. The default is https://kubernetes.default.svc", } @@ -320,9 +321,18 @@ func (AuthenticationStatus) SwaggerDoc() map[string]string { return map_AuthenticationStatus } +var map_DeprecatedWebhookTokenAuthenticator = map[string]string{ + "": "deprecatedWebhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator. It's the same as WebhookTokenAuthenticator but it's missing the 'required' validation on KubeConfig field.", + "kubeConfig": "kubeConfig contains kube config file data which describes how to access the remote webhook service. For further details, see: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication The key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored. The namespace for this secret is determined by the point of use.", +} + +func (DeprecatedWebhookTokenAuthenticator) SwaggerDoc() map[string]string { + return map_DeprecatedWebhookTokenAuthenticator +} + var map_WebhookTokenAuthenticator = map[string]string{ "": "webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator", - "kubeConfig": "kubeConfig contains kube config file data which describes how to access the remote webhook service. For further details, see: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication The key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored. The namespace for this secret is determined by the point of use.", + "kubeConfig": "kubeConfig references a secret that contains kube config file data which describes how to access the remote webhook service. The namespace for the referenced secret is openshift-config.\n\nFor further details, see:\n\nhttps://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication\n\nThe key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored.", } func (WebhookTokenAuthenticator) SwaggerDoc() map[string]string { @@ -354,6 +364,7 @@ var map_BuildOverrides = map[string]string{ "imageLabels": "ImageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user's label will be overwritten.", "nodeSelector": "NodeSelector is a selector which must be true for the build pod to fit on a node", "tolerations": "Tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.", + "forcePull": "ForcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself", } func (BuildOverrides) SwaggerDoc() map[string]string { @@ -976,11 +987,12 @@ func (Network) SwaggerDoc() map[string]string { } var map_NetworkSpec = map[string]string{ - "": "NetworkSpec is the desired network configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.", - "clusterNetwork": "IP address pool to use for pod IPs. This field is immutable after installation.", - "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here. This field is immutable after installation.", - "networkType": "NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OpenShiftSDN This field is immutable after installation.", - "externalIP": "externalIP defines configuration for controllers that affect Service.ExternalIP. If nil, then ExternalIP is not allowed to be set.", + "": "NetworkSpec is the desired network configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.", + "clusterNetwork": "IP address pool to use for pod IPs. This field is immutable after installation.", + "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here. This field is immutable after installation.", + "networkType": "NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OpenShiftSDN This field is immutable after installation.", + "externalIP": "externalIP defines configuration for controllers that affect Service.ExternalIP. If nil, then ExternalIP is not allowed to be set.", + "serviceNodePortRange": "The port range allowed for Services of type NodePort. If not specified, the default of 30000-32767 will be used. Such Services without a NodePort specified will have one automatically allocated from this range. This parameter can be updated after the cluster is installed.", } func (NetworkSpec) SwaggerDoc() map[string]string { @@ -1214,6 +1226,7 @@ var map_TokenConfig = map[string]string{ "": "TokenConfig holds the necessary configuration options for authorization and access tokens", "accessTokenMaxAgeSeconds": "accessTokenMaxAgeSeconds defines the maximum age of access tokens", "accessTokenInactivityTimeoutSeconds": "accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.", + "accessTokenInactivityTimeout": "accessTokenInactivityTimeout defines the token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. If this value is not set, then tokens are valid until their expiry. Takes valid time duration string such as \"5m\", \"1.5h\" or \"2h45m\".", } func (TokenConfig) SwaggerDoc() map[string]string { @@ -1350,7 +1363,7 @@ func (Scheduler) SwaggerDoc() map[string]string { var map_SchedulerSpec = map[string]string{ "policy": "policy is a reference to a ConfigMap containing scheduler policy which has user specified predicates and priorities. If this ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider. The namespace for this configmap is openshift-config.", - "defaultNodeSelector": "defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces without a specified nodeSelector value. For example, defaultNodeSelector: \"type=user-node,region=east\" would set nodeSelector field in pod spec to \"type=user-node,region=east\" to all pods created in all namespaces. Namespaces having project-wide node selectors won't be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector='type=user-node,region=east', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: \"type=user-node,region=west\" means that the default of \"type=user-node,region=east\" set in defaultNodeSelector would not be applied.", + "defaultNodeSelector": "defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces and creates an intersection with any existing nodeSelectors already set on a pod, additionally constraining that pod's selector. For example, defaultNodeSelector: \"type=user-node,region=east\" would set nodeSelector field in pod spec to \"type=user-node,region=east\" to all pods created in all namespaces. Namespaces having project-wide node selectors won't be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector='type=user-node,region=east', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: \"type=user-node,region=west\" means that the default of \"type=user-node,region=east\" set in defaultNodeSelector would not be applied.", "mastersSchedulable": "MastersSchedulable allows masters nodes to be schedulable. When this flag is turned on, all the master nodes in the cluster will be made schedulable, so that workload pods can run on them. The default value for this field is false, meaning none of the master nodes are schedulable. Important Note: Once the workload pods start running on the master nodes, extreme care must be taken to ensure that cluster-critical control plane components are not impacted. Please turn on this field after doing due diligence.", } diff --git a/vendor/github.com/openshift/api/imageregistry/v1/00-crd.yaml b/vendor/github.com/openshift/api/imageregistry/v1/00-crd.yaml index ca464a6ddb..5e578c10a0 100644 --- a/vendor/github.com/openshift/api/imageregistry/v1/00-crd.yaml +++ b/vendor/github.com/openshift/api/imageregistry/v1/00-crd.yaml @@ -692,6 +692,7 @@ spec: description: maxWaitInQueue sets the maximum time a request can wait in the queue before being rejected. type: string + format: duration write: description: write defines limits for image registry's writes. type: object @@ -708,6 +709,7 @@ spec: description: maxWaitInQueue sets the maximum time a request can wait in the queue before being rejected. type: string + format: duration resources: description: resources defines the resource requests+limits for the registry pod. @@ -767,6 +769,11 @@ spec: description: accountName defines the account to be used by the registry. type: string + cloudName: + description: cloudName is the name of the Azure cloud environment + to be used by the registry. If empty, the operator will set + it based on the infrastructure object. + type: string container: description: container defines Azure's container to be used by registry. @@ -839,6 +846,7 @@ spec: description: duration is the duration of the Cloudfront session. type: string + format: duration keypairID: description: keypairID is key pair ID provided by AWS. type: string @@ -1039,6 +1047,11 @@ spec: description: accountName defines the account to be used by the registry. type: string + cloudName: + description: cloudName is the name of the Azure cloud environment + to be used by the registry. If empty, the operator will set + it based on the infrastructure object. + type: string container: description: container defines Azure's container to be used by registry. @@ -1111,6 +1124,7 @@ spec: description: duration is the duration of the Cloudfront session. type: string + format: duration keypairID: description: keypairID is key pair ID provided by AWS. type: string diff --git a/vendor/github.com/openshift/api/imageregistry/v1/01-crd.yaml b/vendor/github.com/openshift/api/imageregistry/v1/01-crd.yaml index a8fe782f20..8cf042d362 100644 --- a/vendor/github.com/openshift/api/imageregistry/v1/01-crd.yaml +++ b/vendor/github.com/openshift/api/imageregistry/v1/01-crd.yaml @@ -634,6 +634,7 @@ spec: image and its referrers for it to be considered a candidate for pruning. Defaults to 60m (60 minutes). type: string + format: duration nodeSelector: description: nodeSelector defines the node selection constraints for the image pruner pod. diff --git a/vendor/github.com/openshift/api/imageregistry/v1/types.go b/vendor/github.com/openshift/api/imageregistry/v1/types.go index cad0b735c1..6e84b13be4 100644 --- a/vendor/github.com/openshift/api/imageregistry/v1/types.go +++ b/vendor/github.com/openshift/api/imageregistry/v1/types.go @@ -12,8 +12,8 @@ import ( // ConfigList is a slice of Config objects. type ConfigList struct { metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - Items []Config `json:"items" protobuf:"bytes,2,rep,name=items"` + metav1.ListMeta `json:"metadata"` + Items []Config `json:"items"` } // +genclient @@ -24,11 +24,11 @@ type ConfigList struct { // the registry operator type Config struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata"` - Spec ImageRegistrySpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + Spec ImageRegistrySpec `json:"spec"` // +optional - Status ImageRegistryStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` + Status ImageRegistryStatus `json:"status,omitempty"` } // ImageRegistrySpec defines the specs for the running registry. @@ -36,73 +36,73 @@ type ImageRegistrySpec struct { // managementState indicates whether the registry instance represented // by this config instance is under operator management or not. Valid // values are Managed, Unmanaged, and Removed. - ManagementState operatorv1.ManagementState `json:"managementState" protobuf:"bytes,1,opt,name=managementState,casttype=github.com/openshift/api/operator/v1.ManagementState"` + ManagementState operatorv1.ManagementState `json:"managementState"` // httpSecret is the value needed by the registry to secure uploads, generated by default. // +optional - HTTPSecret string `json:"httpSecret,omitempty" protobuf:"bytes,2,opt,name=httpSecret"` + HTTPSecret string `json:"httpSecret,omitempty"` // proxy defines the proxy to be used when calling master api, upstream // registries, etc. // +optional - Proxy ImageRegistryConfigProxy `json:"proxy,omitempty" protobuf:"bytes,3,opt,name=proxy"` + Proxy ImageRegistryConfigProxy `json:"proxy,omitempty"` // storage details for configuring registry storage, e.g. S3 bucket // coordinates. // +optional - Storage ImageRegistryConfigStorage `json:"storage,omitempty" protobuf:"bytes,4,opt,name=storage"` + Storage ImageRegistryConfigStorage `json:"storage,omitempty"` // readOnly indicates whether the registry instance should reject attempts // to push new images or delete existing ones. // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"` + ReadOnly bool `json:"readOnly,omitempty"` // disableRedirect controls whether to route all data through the Registry, // rather than redirecting to the backend. // +optional - DisableRedirect bool `json:"disableRedirect,omitempty" protobuf:"varint,6,opt,name=disableRedirect"` + DisableRedirect bool `json:"disableRedirect,omitempty"` // requests controls how many parallel requests a given registry instance // will handle before queuing additional requests. // +optional - Requests ImageRegistryConfigRequests `json:"requests,omitempty" protobuf:"bytes,7,opt,name=requests"` + Requests ImageRegistryConfigRequests `json:"requests,omitempty"` // defaultRoute indicates whether an external facing route for the registry // should be created using the default generated hostname. // +optional - DefaultRoute bool `json:"defaultRoute,omitempty" protobuf:"varint,8,opt,name=defaultRoute"` + DefaultRoute bool `json:"defaultRoute,omitempty"` // routes defines additional external facing routes which should be // created for the registry. // +optional - Routes []ImageRegistryConfigRoute `json:"routes,omitempty" protobuf:"bytes,9,rep,name=routes"` + Routes []ImageRegistryConfigRoute `json:"routes,omitempty"` // replicas determines the number of registry instances to run. - Replicas int32 `json:"replicas" protobuf:"varint,10,opt,name=replicas"` + Replicas int32 `json:"replicas"` // logging determines the level of logging enabled in the registry. - LogLevel int64 `json:"logging" protobuf:"varint,11,opt,name=logging"` + LogLevel int64 `json:"logging"` // resources defines the resource requests+limits for the registry pod. // +optional - Resources *corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,12,opt,name=resources"` + Resources *corev1.ResourceRequirements `json:"resources,omitempty"` // nodeSelector defines the node selection constraints for the registry // pod. // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,13,rep,name=nodeSelector"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` // tolerations defines the tolerations for the registry pod. // +optional - Tolerations []corev1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,14,rep,name=tolerations"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // rolloutStrategy defines rollout strategy for the image registry // deployment. // +optional // +kubebuilder:validation:Pattern=`^(RollingUpdate|Recreate)$` - RolloutStrategy string `json:"rolloutStrategy,omitempty" protobuf:"bytes,15,opt,name=rolloutStrategy"` + RolloutStrategy string `json:"rolloutStrategy,omitempty"` // affinity is a group of node affinity scheduling rules for the image registry pod(s). // +optional - Affinity *corev1.Affinity `json:"affinity,omitempty" protobuf:"bytes,16,opt,name=affinity"` + Affinity *corev1.Affinity `json:"affinity,omitempty"` } // ImageRegistryStatus reports image registry operational status. type ImageRegistryStatus struct { - operatorv1.OperatorStatus `json:",inline" protobuf:"bytes,1,opt,name=operatorStatus"` + operatorv1.OperatorStatus `json:",inline"` // storageManaged is a boolean which denotes whether or not // we created the registry storage medium (such as an // S3 bucket). - StorageManaged bool `json:"storageManaged" protobuf:"varint,2,opt,name=storageManaged"` + StorageManaged bool `json:"storageManaged"` // storage indicates the current applied storage configuration of the // registry. - Storage ImageRegistryConfigStorage `json:"storage" protobuf:"bytes,3,opt,name=storage"` + Storage ImageRegistryConfigStorage `json:"storage"` } // ImageRegistryConfigProxy defines proxy configuration to be used by registry. @@ -110,15 +110,15 @@ type ImageRegistryConfigProxy struct { // http defines the proxy to be used by the image registry when // accessing HTTP endpoints. // +optional - HTTP string `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"` + HTTP string `json:"http,omitempty"` // https defines the proxy to be used by the image registry when // accessing HTTPS endpoints. // +optional - HTTPS string `json:"https,omitempty" protobuf:"bytes,2,opt,name=https"` + HTTPS string `json:"https,omitempty"` // noProxy defines a comma-separated list of host names that shouldn't // go through any proxy. // +optional - NoProxy string `json:"noProxy,omitempty" protobuf:"bytes,3,opt,name=noProxy"` + NoProxy string `json:"noProxy,omitempty"` } // ImageRegistryConfigStorageS3CloudFront holds the configuration @@ -126,14 +126,15 @@ type ImageRegistryConfigProxy struct { // https://docs.docker.com/registry/configuration/#cloudfront type ImageRegistryConfigStorageS3CloudFront struct { // baseURL contains the SCHEME://HOST[/PATH] at which Cloudfront is served. - BaseURL string `json:"baseURL" protobuf:"bytes,1,opt,name=baseURL"` + BaseURL string `json:"baseURL"` // privateKey points to secret containing the private key, provided by AWS. - PrivateKey corev1.SecretKeySelector `json:"privateKey" protobuf:"bytes,2,opt,name=privateKey"` + PrivateKey corev1.SecretKeySelector `json:"privateKey"` // keypairID is key pair ID provided by AWS. - KeypairID string `json:"keypairID" protobuf:"bytes,3,opt,name=keypairID"` + KeypairID string `json:"keypairID"` // duration is the duration of the Cloudfront session. // +optional - Duration metav1.Duration `json:"duration,omitempty" protobuf:"bytes,4,opt,name=duration"` + // +kubebuilder:validation:Format=duration + Duration metav1.Duration `json:"duration,omitempty"` } // ImageRegistryConfigStorageEmptyDir is an place holder to be used when @@ -149,33 +150,33 @@ type ImageRegistryConfigStorageS3 struct { // data. // Optional, will be generated if not provided. // +optional - Bucket string `json:"bucket,omitempty" protobuf:"bytes,1,opt,name=bucket"` + Bucket string `json:"bucket,omitempty"` // region is the AWS region in which your bucket exists. // Optional, will be set based on the installed AWS Region. // +optional - Region string `json:"region,omitempty" protobuf:"bytes,2,opt,name=region"` + Region string `json:"region,omitempty"` // regionEndpoint is the endpoint for S3 compatible storage services. // Optional, defaults based on the Region that is provided. // +optional - RegionEndpoint string `json:"regionEndpoint,omitempty" protobuf:"bytes,3,opt,name=regionEndpoint"` + RegionEndpoint string `json:"regionEndpoint,omitempty"` // encrypt specifies whether the registry stores the image in encrypted // format or not. // Optional, defaults to false. // +optional - Encrypt bool `json:"encrypt,omitempty" protobuf:"varint,4,opt,name=encrypt"` + Encrypt bool `json:"encrypt,omitempty"` // keyID is the KMS key ID to use for encryption. // Optional, Encrypt must be true, or this parameter is ignored. // +optional - KeyID string `json:"keyID,omitempty" protobuf:"bytes,5,opt,name=keyID"` + KeyID string `json:"keyID,omitempty"` // cloudFront configures Amazon Cloudfront as the storage middleware in a // registry. // +optional - CloudFront *ImageRegistryConfigStorageS3CloudFront `json:"cloudFront,omitempty" protobuf:"bytes,6,opt,name=cloudFront"` + CloudFront *ImageRegistryConfigStorageS3CloudFront `json:"cloudFront,omitempty"` // virtualHostedStyle enables using S3 virtual hosted style bucket paths with // a custom RegionEndpoint // Optional, defaults to false. // +optional - VirtualHostedStyle bool `json:"virtualHostedStyle" protobuf:"varint,7,opt,name=virtualHostedStyle"` + VirtualHostedStyle bool `json:"virtualHostedStyle"` } // ImageRegistryConfigStorageGCS holds GCS configuration. @@ -184,20 +185,20 @@ type ImageRegistryConfigStorageGCS struct { // data. // Optional, will be generated if not provided. // +optional - Bucket string `json:"bucket,omitempty" protobuf:"bytes,1,opt,name=bucket"` + Bucket string `json:"bucket,omitempty"` // region is the GCS location in which your bucket exists. // Optional, will be set based on the installed GCS Region. // +optional - Region string `json:"region,omitempty" protobuf:"bytes,2,opt,name=region"` + Region string `json:"region,omitempty"` // projectID is the Project ID of the GCP project that this bucket should // be associated with. // +optional - ProjectID string `json:"projectID,omitempty" protobuf:"bytes,3,opt,name=projectID"` + ProjectID string `json:"projectID,omitempty"` // keyID is the KMS key ID to use for encryption. // Optional, buckets are encrypted by default on GCP. // This allows for the use of a custom encryption key. // +optional - KeyID string `json:"keyID,omitempty" protobuf:"bytes,4,opt,name=keyID"` + KeyID string `json:"keyID,omitempty"` } // ImageRegistryConfigStorageSwift holds the information to configure @@ -206,29 +207,29 @@ type ImageRegistryConfigStorageGCS struct { type ImageRegistryConfigStorageSwift struct { // authURL defines the URL for obtaining an authentication token. // +optional - AuthURL string `json:"authURL,omitempty" protobuf:"bytes,1,opt,name=authURL"` + AuthURL string `json:"authURL,omitempty"` // authVersion specifies the OpenStack Auth's version. // +optional - AuthVersion string `json:"authVersion,omitempty" protobuf:"bytes,2,opt,name=authVersion"` + AuthVersion string `json:"authVersion,omitempty"` // container defines the name of Swift container where to store the // registry's data. // +optional - Container string `json:"container,omitempty" protobuf:"bytes,3,opt,name=container"` + Container string `json:"container,omitempty"` // domain specifies Openstack's domain name for Identity v3 API. // +optional - Domain string `json:"domain,omitempty" protobuf:"bytes,4,opt,name=domain"` + Domain string `json:"domain,omitempty"` // domainID specifies Openstack's domain id for Identity v3 API. // +optional - DomainID string `json:"domainID,omitempty" protobuf:"bytes,5,opt,name=domainID"` + DomainID string `json:"domainID,omitempty"` // tenant defines Openstack tenant name to be used by registry. // +optional - Tenant string `json:"tenant,omitempty" protobuf:"bytes,6,opt,name=tenant"` + Tenant string `json:"tenant,omitempty"` // tenant defines Openstack tenant id to be used by registry. // +optional - TenantID string `json:"tenantID,omitempty" protobuf:"bytes,7,opt,name=tenantID"` + TenantID string `json:"tenantID,omitempty"` // regionName defines Openstack's region in which container exists. // +optional - RegionName string `json:"regionName,omitempty" protobuf:"bytes,8,opt,name=regionName"` + RegionName string `json:"regionName,omitempty"` } // ImageRegistryConfigStoragePVC holds Persistent Volume Claims data to @@ -236,7 +237,7 @@ type ImageRegistryConfigStorageSwift struct { type ImageRegistryConfigStoragePVC struct { // claim defines the Persisent Volume Claim's name to be used. // +optional - Claim string `json:"claim,omitempty" protobuf:"bytes,1,opt,name=claim"` + Claim string `json:"claim,omitempty"` } // ImageRegistryConfigStorageAzure holds the information to configure @@ -244,13 +245,18 @@ type ImageRegistryConfigStoragePVC struct { type ImageRegistryConfigStorageAzure struct { // accountName defines the account to be used by the registry. // +optional - AccountName string `json:"accountName,omitempty" protobuf:"bytes,1,opt,name=accountName"` + AccountName string `json:"accountName,omitempty"` // container defines Azure's container to be used by registry. // +optional // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:MinLength=3 // +kubebuilder:validation:Pattern=`^[0-9a-z]+(-[0-9a-z]+)*$` - Container string `json:"container,omitempty" protobuf:"bytes,2,opt,name=container"` + Container string `json:"container,omitempty"` + // cloudName is the name of the Azure cloud environment to be used by the + // registry. If empty, the operator will set it based on the infrastructure + // object. + // +optional + CloudName string `json:"cloudName,omitempty"` } // ImageRegistryConfigStorage describes how the storage should be configured @@ -261,32 +267,32 @@ type ImageRegistryConfigStorage struct { // is not suitable for production use. When the pod is removed from a // node for any reason, the data in the emptyDir is deleted forever. // +optional - EmptyDir *ImageRegistryConfigStorageEmptyDir `json:"emptyDir,omitempty" protobuf:"bytes,1,opt,name=emptyDir"` + EmptyDir *ImageRegistryConfigStorageEmptyDir `json:"emptyDir,omitempty"` // s3 represents configuration that uses Amazon Simple Storage Service. // +optional - S3 *ImageRegistryConfigStorageS3 `json:"s3,omitempty" protobuf:"bytes,2,opt,name=s3"` + S3 *ImageRegistryConfigStorageS3 `json:"s3,omitempty"` // gcs represents configuration that uses Google Cloud Storage. // +optional - GCS *ImageRegistryConfigStorageGCS `json:"gcs,omitempty" protobuf:"bytes,3,opt,name=gcs"` + GCS *ImageRegistryConfigStorageGCS `json:"gcs,omitempty"` // swift represents configuration that uses OpenStack Object Storage. // +optional - Swift *ImageRegistryConfigStorageSwift `json:"swift,omitempty" protobuf:"bytes,4,opt,name=swift"` + Swift *ImageRegistryConfigStorageSwift `json:"swift,omitempty"` // pvc represents configuration that uses a PersistentVolumeClaim. // +optional - PVC *ImageRegistryConfigStoragePVC `json:"pvc,omitempty" protobuf:"bytes,5,opt,name=pvc"` + PVC *ImageRegistryConfigStoragePVC `json:"pvc,omitempty"` // azure represents configuration that uses Azure Blob Storage. // +optional - Azure *ImageRegistryConfigStorageAzure `json:"azure,omitempty" protobuf:"bytes,6,opt,name=azure"` + Azure *ImageRegistryConfigStorageAzure `json:"azure,omitempty"` } // ImageRegistryConfigRequests defines registry limits on requests read and write. type ImageRegistryConfigRequests struct { // read defines limits for image registry's reads. // +optional - Read ImageRegistryConfigRequestsLimits `json:"read,omitempty" protobuf:"bytes,1,opt,name=read"` + Read ImageRegistryConfigRequestsLimits `json:"read,omitempty"` // write defines limits for image registry's writes. // +optional - Write ImageRegistryConfigRequestsLimits `json:"write,omitempty" protobuf:"bytes,2,opt,name=write"` + Write ImageRegistryConfigRequestsLimits `json:"write,omitempty"` } // ImageRegistryConfigRequestsLimits holds configuration on the max, enqueued @@ -294,26 +300,27 @@ type ImageRegistryConfigRequests struct { type ImageRegistryConfigRequestsLimits struct { // maxRunning sets the maximum in flight api requests to the registry. // +optional - MaxRunning int `json:"maxRunning,omitempty" protobuf:"varint,1,opt,name=maxRunning"` + MaxRunning int `json:"maxRunning,omitempty"` // maxInQueue sets the maximum queued api requests to the registry. // +optional - MaxInQueue int `json:"maxInQueue,omitempty" protobuf:"varint,2,opt,name=maxInQueue"` + MaxInQueue int `json:"maxInQueue,omitempty"` // maxWaitInQueue sets the maximum time a request can wait in the queue // before being rejected. // +optional - MaxWaitInQueue metav1.Duration `json:"maxWaitInQueue,omitempty" protobuf:"bytes,3,opt,name=maxWaitInQueue"` + // +kubebuilder:validation:Format=duration + MaxWaitInQueue metav1.Duration `json:"maxWaitInQueue,omitempty"` } // ImageRegistryConfigRoute holds information on external route access to image // registry. type ImageRegistryConfigRoute struct { // name of the route to be created. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + Name string `json:"name"` // hostname for the route. // +optional - Hostname string `json:"hostname,omitempty" protobuf:"bytes,2,opt,name=hostname"` + Hostname string `json:"hostname,omitempty"` // secretName points to secret containing the certificates to be used // by the route. // +optional - SecretName string `json:"secretName,omitempty" protobuf:"bytes,3,opt,name=secretName"` + SecretName string `json:"secretName,omitempty"` } diff --git a/vendor/github.com/openshift/api/imageregistry/v1/types_imagepruner.go b/vendor/github.com/openshift/api/imageregistry/v1/types_imagepruner.go index b496ae0128..55360dc6a4 100644 --- a/vendor/github.com/openshift/api/imageregistry/v1/types_imagepruner.go +++ b/vendor/github.com/openshift/api/imageregistry/v1/types_imagepruner.go @@ -14,8 +14,8 @@ import ( // ImagePrunerList is a slice of ImagePruner objects. type ImagePrunerList struct { metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - Items []ImagePruner `json:"items" protobuf:"bytes,2,rep,name=items"` + metav1.ListMeta `json:"metadata"` + Items []ImagePruner `json:"items"` } // +genclient @@ -26,11 +26,11 @@ type ImagePrunerList struct { // managed by the registry operator. type ImagePruner struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata"` - Spec ImagePrunerSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + Spec ImagePrunerSpec `json:"spec"` // +optional - Status ImagePrunerStatus `json:"status" protobuf:"bytes,3,opt,name=status"` + Status ImagePrunerStatus `json:"status"` } // ImagePrunerSpec defines the specs for the running image pruner. @@ -38,51 +38,52 @@ type ImagePrunerSpec struct { // schedule specifies when to execute the job using standard cronjob syntax: https://wikipedia.org/wiki/Cron. // Defaults to `0 0 * * *`. // +optional - Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"` + Schedule string `json:"schedule"` // suspend specifies whether or not to suspend subsequent executions of this cronjob. // Defaults to false. // +optional - Suspend *bool `json:"suspend,omitempty" protobuf:"bytes,2,opt,name=suspend"` + Suspend *bool `json:"suspend,omitempty"` // keepTagRevisions specifies the number of image revisions for a tag in an image stream that will be preserved. // Defaults to 3. // +optional - KeepTagRevisions *int `json:"keepTagRevisions,omitempty" protobuf:"bytes,3,opt,name=keepTagRevisions"` + KeepTagRevisions *int `json:"keepTagRevisions,omitempty"` // keepYoungerThan specifies the minimum age in nanoseconds of an image and its referrers for it to be considered a candidate for pruning. // DEPRECATED: This field is deprecated in favor of keepYoungerThanDuration. If both are set, this field is ignored and keepYoungerThanDuration takes precedence. // +optional - KeepYoungerThan *time.Duration `json:"keepYoungerThan,omitempty" protobuf:"varint,4,opt,name=keepYoungerThan,casttype=time.Duration"` + KeepYoungerThan *time.Duration `json:"keepYoungerThan,omitempty"` // keepYoungerThanDuration specifies the minimum age of an image and its referrers for it to be considered a candidate for pruning. // Defaults to 60m (60 minutes). // +optional + // +kubebuilder:validation:Format=duration KeepYoungerThanDuration *metav1.Duration `json:"keepYoungerThanDuration,omitempty"` // resources defines the resource requests and limits for the image pruner pod. // +optional - Resources *corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,5,opt,name=resources"` + Resources *corev1.ResourceRequirements `json:"resources,omitempty"` // affinity is a group of node affinity scheduling rules for the image pruner pod. // +optional - Affinity *corev1.Affinity `json:"affinity,omitempty" protobuf:"bytes,6,opt,name=affinity"` + Affinity *corev1.Affinity `json:"affinity,omitempty"` // nodeSelector defines the node selection constraints for the image pruner pod. // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` // tolerations defines the node tolerations for the image pruner pod. // +optional - Tolerations []corev1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,8,rep,name=tolerations"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // successfulJobsHistoryLimit specifies how many successful image pruner jobs to retain. // Defaults to 3 if not set. // +optional - SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"bytes,1,opt,name=successfulJobsHistoryLimit"` + SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` // failedJobsHistoryLimit specifies how many failed image pruner jobs to retain. // Defaults to 3 if not set. // +optional - FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"bytes,2,opt,name=failedJobsHistoryLimit"` + FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` } // ImagePrunerStatus reports image pruner operational status. type ImagePrunerStatus struct { // observedGeneration is the last generation change that has been applied. // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"bytes,1,opt,name=observedGeneration"` + ObservedGeneration int64 `json:"observedGeneration,omitempty"` // conditions is a list of conditions and their status. // +optional - Conditions []operatorv1.OperatorCondition `json:"conditions,omitempty" protobuf:"bytes,2,rep,name=conditions"` + Conditions []operatorv1.OperatorCondition `json:"conditions,omitempty"` } diff --git a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.swagger_doc_generated.go index bb23f1eddb..fae71a443f 100644 --- a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.swagger_doc_generated.go @@ -88,6 +88,7 @@ var map_ImageRegistryConfigStorageAzure = map[string]string{ "": "ImageRegistryConfigStorageAzure holds the information to configure the registry to use Azure Blob Storage for backend storage.", "accountName": "accountName defines the account to be used by the registry.", "container": "container defines Azure's container to be used by registry.", + "cloudName": "cloudName is the name of the Azure cloud environment to be used by the registry. If empty, the operator will set it based on the infrastructure object.", } func (ImageRegistryConfigStorageAzure) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go index dddb4cfb89..1326942be4 100644 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go +++ b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go @@ -303,8 +303,12 @@ type SourceStrategyDefaultsConfig struct { type BuildOverridesConfig struct { metav1.TypeMeta `json:",inline"` - // forcePull indicates whether the build strategy should always be set to ForcePull=true - ForcePull bool `json:"forcePull"` + // forcePull overrides, if set, the equivalent value in the builds, + // i.e. false disables force pull for all builds, + // true enables force pull for all builds, + // independently of what each build specifies itself + // +optional + ForcePull *bool `json:"forcePull,omitempty"` // imageLabels is a list of labels that are applied to the resulting image. // If user provided a label in their Build/BuildConfig with the same name as one in this diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.deepcopy.go index 9e8e2011e5..43e1c1e4e5 100644 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.deepcopy.go @@ -119,6 +119,11 @@ func (in *BuildDefaultsConfig) DeepCopyObject() runtime.Object { func (in *BuildOverridesConfig) DeepCopyInto(out *BuildOverridesConfig) { *out = *in out.TypeMeta = in.TypeMeta + if in.ForcePull != nil { + in, out := &in.ForcePull, &out.ForcePull + *out = new(bool) + **out = **in + } if in.ImageLabels != nil { in, out := &in.ImageLabels, &out.ImageLabels *out = make([]buildv1.ImageLabel, len(*in)) diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go index 9547ae2bea..26572e1a77 100644 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go @@ -38,7 +38,7 @@ func (BuildDefaultsConfig) SwaggerDoc() map[string]string { var map_BuildOverridesConfig = map[string]string{ "": "BuildOverridesConfig controls override settings for builds", - "forcePull": "forcePull indicates whether the build strategy should always be set to ForcePull=true", + "forcePull": "forcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself", "imageLabels": "imageLabels is a list of labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user's label will be overwritten.", "nodeSelector": "nodeSelector is a selector which must be true for the build pod to fit on a node", "annotations": "annotations are annotations that will be added to the build pod", diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster_storage_operator_01_crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster_storage_operator_01_crd.yaml new file mode 100644 index 0000000000..28d7c88373 --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster_storage_operator_01_crd.yaml @@ -0,0 +1,142 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: storages.operator.openshift.io +spec: + group: operator.openshift.io + names: + kind: Storage + plural: storages + singular: storage + preserveUnknownFields: false + scope: Cluster + subresources: + status: {} + version: v1 + versions: + - name: v1 + served: true + storage: true + validation: + openAPIV3Schema: + description: Storage provides a means to configure an operator to manage the + cluster storage operator. `cluster` is the canonical name. + 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: + description: spec holds user settable values for configuration + 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: + description: status holds observed values from the cluster. They may not + be overridden. + 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/register.go b/vendor/github.com/openshift/api/operator/v1/register.go index f5ceba6554..140cb5854d 100644 --- a/vendor/github.com/openshift/api/operator/v1/register.go +++ b/vendor/github.com/openshift/api/operator/v1/register.go @@ -64,6 +64,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ServiceCatalogControllerManagerList{}, &IngressController{}, &IngressControllerList{}, + &Storage{}, + &StorageList{}, ) return nil diff --git a/vendor/github.com/openshift/api/operator/v1/types_storage.go b/vendor/github.com/openshift/api/operator/v1/types_storage.go new file mode 100644 index 0000000000..d5d3bd407e --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1/types_storage.go @@ -0,0 +1,44 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Storage provides a means to configure an operator to manage the cluster storage operator. `cluster` is the canonical name. +type Storage struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec holds user settable values for configuration + // +kubebuilder:validation:Required + // +required + Spec StorageSpec `json:"spec"` + + // status holds observed values from the cluster. They may not be overridden. + // +optional + Status StorageStatus `json:"status"` +} + +// StorageSpec is the specification of the desired behavior of the cluster storage operator. +type StorageSpec struct { + OperatorSpec `json:",inline"` +} + +// StorageStatus defines the observed status of the cluster storage operator. +type StorageStatus struct { + OperatorStatus `json:",inline"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true + +// StorageList contains a list of Storages. +type StorageList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Storage `json:"items"` +} diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go index e27bc5158b..6361150460 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 @@ -2651,6 +2651,101 @@ func (in *StatuspageProvider) DeepCopy() *StatuspageProvider { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Storage) DeepCopyInto(out *Storage) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage. +func (in *Storage) DeepCopy() *Storage { + if in == nil { + return nil + } + out := new(Storage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Storage) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageList) DeepCopyInto(out *StorageList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Storage, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageList. +func (in *StorageList) DeepCopy() *StorageList { + if in == nil { + return nil + } + out := new(StorageList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageSpec) DeepCopyInto(out *StorageSpec) { + *out = *in + in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec. +func (in *StorageSpec) DeepCopy() *StorageSpec { + if in == nil { + return nil + } + out := new(StorageSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageStatus) DeepCopyInto(out *StorageStatus) { + *out = *in + in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageStatus. +func (in *StorageStatus) DeepCopy() *StorageStatus { + if in == nil { + return nil + } + out := new(StorageStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SyslogLoggingDestinationParameters) DeepCopyInto(out *SyslogLoggingDestinationParameters) { *out = *in 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 6e70887c22..e35de1d623 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 @@ -861,4 +861,38 @@ func (ServiceCatalogControllerManagerList) SwaggerDoc() map[string]string { return map_ServiceCatalogControllerManagerList } +var map_Storage = map[string]string{ + "": "Storage provides a means to configure an operator to manage the cluster storage operator. `cluster` is the canonical name.", + "spec": "spec holds user settable values for configuration", + "status": "status holds observed values from the cluster. They may not be overridden.", +} + +func (Storage) SwaggerDoc() map[string]string { + return map_Storage +} + +var map_StorageList = map[string]string{ + "": "StorageList contains a list of Storages.", +} + +func (StorageList) SwaggerDoc() map[string]string { + return map_StorageList +} + +var map_StorageSpec = map[string]string{ + "": "StorageSpec is the specification of the desired behavior of the cluster storage operator.", +} + +func (StorageSpec) SwaggerDoc() map[string]string { + return map_StorageSpec +} + +var map_StorageStatus = map[string]string{ + "": "StorageStatus defines the observed status of the cluster storage operator.", +} + +func (StorageStatus) SwaggerDoc() map[string]string { + return map_StorageStatus +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/modules.txt b/vendor/modules.txt index 85d4411813..095b1e21de 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -168,7 +168,7 @@ github.com/mitchellh/go-homedir github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.1 github.com/modern-go/reflect2 -# github.com/openshift/api v0.0.0-20200609191024-dca637550e8c +# github.com/openshift/api v0.0.0-20200609191024-dca637550e8c => github.com/joelddiaz/api v0.0.0-20200709114332-a68340a89e61 github.com/openshift/api github.com/openshift/api/apps github.com/openshift/api/apps/v1 @@ -176,6 +176,8 @@ github.com/openshift/api/authorization github.com/openshift/api/authorization/v1 github.com/openshift/api/build github.com/openshift/api/build/v1 +github.com/openshift/api/cloudcredential +github.com/openshift/api/cloudcredential/v1 github.com/openshift/api/config github.com/openshift/api/config/v1 github.com/openshift/api/image