diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmsautokeyconfigs.kms.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmsautokeyconfigs.kms.cnrm.cloud.google.com.yaml index 9b30f7086b..8c77a12280 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmsautokeyconfigs.kms.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmsautokeyconfigs.kms.cnrm.cloud.google.com.yaml @@ -6,6 +6,7 @@ metadata: creationTimestamp: null labels: cnrm.cloud.google.com/managed-by-kcc: "true" + cnrm.cloud.google.com/stability-level: beta cnrm.cloud.google.com/system: "true" name: kmsautokeyconfigs.kms.cnrm.cloud.google.com spec: @@ -39,7 +40,7 @@ spec: jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime name: Status Age type: date - name: v1alpha1 + name: v1beta1 schema: openAPIV3Schema: description: KMSAutokeyConfig is the Schema for the KMSAutokeyConfig API diff --git a/pkg/clients/generated/apis/kms/v1alpha1/register.go b/pkg/clients/generated/apis/kms/v1alpha1/register.go index d4619eb31e..d7e6581e3f 100644 --- a/pkg/clients/generated/apis/kms/v1alpha1/register.go +++ b/pkg/clients/generated/apis/kms/v1alpha1/register.go @@ -53,12 +53,6 @@ var ( // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme - KMSAutokeyConfigGVK = schema.GroupVersionKind{ - Group: SchemeGroupVersion.Group, - Version: SchemeGroupVersion.Version, - Kind: reflect.TypeOf(KMSAutokeyConfig{}).Name(), - } - KMSCryptoKeyVersionGVK = schema.GroupVersionKind{ Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, diff --git a/pkg/clients/generated/apis/kms/v1alpha1/zz_generated.deepcopy.go b/pkg/clients/generated/apis/kms/v1alpha1/zz_generated.deepcopy.go index 1321ba4549..60b1a6aaaa 100644 --- a/pkg/clients/generated/apis/kms/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/clients/generated/apis/kms/v1alpha1/zz_generated.deepcopy.go @@ -29,63 +29,6 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AutokeyconfigKeyProject) DeepCopyInto(out *AutokeyconfigKeyProject) { - *out = *in - if in.External != nil { - in, out := &in.External, &out.External - *out = new(string) - **out = **in - } - if in.Kind != nil { - in, out := &in.Kind, &out.Kind - *out = new(string) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Namespace != nil { - in, out := &in.Namespace, &out.Namespace - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutokeyconfigKeyProject. -func (in *AutokeyconfigKeyProject) DeepCopy() *AutokeyconfigKeyProject { - if in == nil { - return nil - } - out := new(AutokeyconfigKeyProject) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AutokeyconfigObservedStateStatus) DeepCopyInto(out *AutokeyconfigObservedStateStatus) { - *out = *in - if in.State != nil { - in, out := &in.State, &out.State - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutokeyconfigObservedStateStatus. -func (in *AutokeyconfigObservedStateStatus) DeepCopy() *AutokeyconfigObservedStateStatus { - if in == nil { - return nil - } - out := new(AutokeyconfigObservedStateStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CryptokeyversionAttestationStatus) DeepCopyInto(out *CryptokeyversionAttestationStatus) { *out = *in @@ -179,125 +122,6 @@ func (in *CryptokeyversionExternalProtectionLevelOptionsStatus) DeepCopy() *Cryp return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KMSAutokeyConfig) DeepCopyInto(out *KMSAutokeyConfig) { - *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 KMSAutokeyConfig. -func (in *KMSAutokeyConfig) DeepCopy() *KMSAutokeyConfig { - if in == nil { - return nil - } - out := new(KMSAutokeyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KMSAutokeyConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KMSAutokeyConfigList) DeepCopyInto(out *KMSAutokeyConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KMSAutokeyConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSAutokeyConfigList. -func (in *KMSAutokeyConfigList) DeepCopy() *KMSAutokeyConfigList { - if in == nil { - return nil - } - out := new(KMSAutokeyConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KMSAutokeyConfigList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KMSAutokeyConfigSpec) DeepCopyInto(out *KMSAutokeyConfigSpec) { - *out = *in - out.FolderRef = in.FolderRef - if in.KeyProject != nil { - in, out := &in.KeyProject, &out.KeyProject - *out = new(AutokeyconfigKeyProject) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSAutokeyConfigSpec. -func (in *KMSAutokeyConfigSpec) DeepCopy() *KMSAutokeyConfigSpec { - if in == nil { - return nil - } - out := new(KMSAutokeyConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KMSAutokeyConfigStatus) DeepCopyInto(out *KMSAutokeyConfigStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]k8sv1alpha1.Condition, len(*in)) - copy(*out, *in) - } - if in.ExternalRef != nil { - in, out := &in.ExternalRef, &out.ExternalRef - *out = new(string) - **out = **in - } - if in.ObservedGeneration != nil { - in, out := &in.ObservedGeneration, &out.ObservedGeneration - *out = new(int64) - **out = **in - } - if in.ObservedState != nil { - in, out := &in.ObservedState, &out.ObservedState - *out = new(AutokeyconfigObservedStateStatus) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSAutokeyConfigStatus. -func (in *KMSAutokeyConfigStatus) DeepCopy() *KMSAutokeyConfigStatus { - if in == nil { - return nil - } - out := new(KMSAutokeyConfigStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KMSCryptoKeyVersion) DeepCopyInto(out *KMSCryptoKeyVersion) { *out = *in diff --git a/pkg/clients/generated/apis/kms/v1alpha1/kmsautokeyconfig_types.go b/pkg/clients/generated/apis/kms/v1beta1/kmsautokeyconfig_types.go similarity index 97% rename from pkg/clients/generated/apis/kms/v1alpha1/kmsautokeyconfig_types.go rename to pkg/clients/generated/apis/kms/v1beta1/kmsautokeyconfig_types.go index 18d15c09d7..c1edf29576 100644 --- a/pkg/clients/generated/apis/kms/v1alpha1/kmsautokeyconfig_types.go +++ b/pkg/clients/generated/apis/kms/v1beta1/kmsautokeyconfig_types.go @@ -28,7 +28,7 @@ // that future versions of the go-client may include breaking changes. // Please try it out and give us feedback! -package v1alpha1 +package v1beta1 import ( "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" @@ -89,7 +89,7 @@ type KMSAutokeyConfigStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:categories=gcp,shortName=gcpkmsautokeyconfig;gcpkmsautokeyconfigs // +kubebuilder:subresource:status -// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true" +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=beta";"cnrm.cloud.google.com/system=true" // +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" // +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" // +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" diff --git a/pkg/clients/generated/apis/kms/v1beta1/register.go b/pkg/clients/generated/apis/kms/v1beta1/register.go index f3500aaed7..2f83e9d3ee 100644 --- a/pkg/clients/generated/apis/kms/v1beta1/register.go +++ b/pkg/clients/generated/apis/kms/v1beta1/register.go @@ -53,6 +53,12 @@ var ( // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme + KMSAutokeyConfigGVK = schema.GroupVersionKind{ + Group: SchemeGroupVersion.Group, + Version: SchemeGroupVersion.Version, + Kind: reflect.TypeOf(KMSAutokeyConfig{}).Name(), + } + KMSCryptoKeyGVK = schema.GroupVersionKind{ Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, diff --git a/pkg/clients/generated/apis/kms/v1beta1/zz_generated.deepcopy.go b/pkg/clients/generated/apis/kms/v1beta1/zz_generated.deepcopy.go index 0c92229637..c5beb38186 100644 --- a/pkg/clients/generated/apis/kms/v1beta1/zz_generated.deepcopy.go +++ b/pkg/clients/generated/apis/kms/v1beta1/zz_generated.deepcopy.go @@ -29,6 +29,63 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AutokeyconfigKeyProject) DeepCopyInto(out *AutokeyconfigKeyProject) { + *out = *in + if in.External != nil { + in, out := &in.External, &out.External + *out = new(string) + **out = **in + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Namespace != nil { + in, out := &in.Namespace, &out.Namespace + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutokeyconfigKeyProject. +func (in *AutokeyconfigKeyProject) DeepCopy() *AutokeyconfigKeyProject { + if in == nil { + return nil + } + out := new(AutokeyconfigKeyProject) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AutokeyconfigObservedStateStatus) DeepCopyInto(out *AutokeyconfigObservedStateStatus) { + *out = *in + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutokeyconfigObservedStateStatus. +func (in *AutokeyconfigObservedStateStatus) DeepCopy() *AutokeyconfigObservedStateStatus { + if in == nil { + return nil + } + out := new(AutokeyconfigObservedStateStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CryptokeyVersionTemplate) DeepCopyInto(out *CryptokeyVersionTemplate) { *out = *in @@ -50,6 +107,125 @@ func (in *CryptokeyVersionTemplate) DeepCopy() *CryptokeyVersionTemplate { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KMSAutokeyConfig) DeepCopyInto(out *KMSAutokeyConfig) { + *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 KMSAutokeyConfig. +func (in *KMSAutokeyConfig) DeepCopy() *KMSAutokeyConfig { + if in == nil { + return nil + } + out := new(KMSAutokeyConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KMSAutokeyConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KMSAutokeyConfigList) DeepCopyInto(out *KMSAutokeyConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KMSAutokeyConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSAutokeyConfigList. +func (in *KMSAutokeyConfigList) DeepCopy() *KMSAutokeyConfigList { + if in == nil { + return nil + } + out := new(KMSAutokeyConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KMSAutokeyConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KMSAutokeyConfigSpec) DeepCopyInto(out *KMSAutokeyConfigSpec) { + *out = *in + out.FolderRef = in.FolderRef + if in.KeyProject != nil { + in, out := &in.KeyProject, &out.KeyProject + *out = new(AutokeyconfigKeyProject) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSAutokeyConfigSpec. +func (in *KMSAutokeyConfigSpec) DeepCopy() *KMSAutokeyConfigSpec { + if in == nil { + return nil + } + out := new(KMSAutokeyConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KMSAutokeyConfigStatus) DeepCopyInto(out *KMSAutokeyConfigStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1alpha1.Condition, len(*in)) + copy(*out, *in) + } + if in.ExternalRef != nil { + in, out := &in.ExternalRef, &out.ExternalRef + *out = new(string) + **out = **in + } + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.ObservedState != nil { + in, out := &in.ObservedState, &out.ObservedState + *out = new(AutokeyconfigObservedStateStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSAutokeyConfigStatus. +func (in *KMSAutokeyConfigStatus) DeepCopy() *KMSAutokeyConfigStatus { + if in == nil { + return nil + } + out := new(KMSAutokeyConfigStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KMSCryptoKey) DeepCopyInto(out *KMSCryptoKey) { *out = *in diff --git a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/fake/fake_kms_client.go b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/fake/fake_kms_client.go index ca9ae125c6..3996a10666 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/fake/fake_kms_client.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/fake/fake_kms_client.go @@ -31,10 +31,6 @@ type FakeKmsV1alpha1 struct { *testing.Fake } -func (c *FakeKmsV1alpha1) KMSAutokeyConfigs(namespace string) v1alpha1.KMSAutokeyConfigInterface { - return &FakeKMSAutokeyConfigs{c, namespace} -} - func (c *FakeKmsV1alpha1) KMSCryptoKeyVersions(namespace string) v1alpha1.KMSCryptoKeyVersionInterface { return &FakeKMSCryptoKeyVersions{c, namespace} } diff --git a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/generated_expansion.go b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/generated_expansion.go index 6557fa793e..d3a7efea94 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/generated_expansion.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/generated_expansion.go @@ -21,8 +21,6 @@ package v1alpha1 -type KMSAutokeyConfigExpansion interface{} - type KMSCryptoKeyVersionExpansion interface{} type KMSKeyHandleExpansion interface{} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/kms_client.go b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/kms_client.go index f53b56153e..e3df0ac571 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/kms_client.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1alpha1/kms_client.go @@ -31,7 +31,6 @@ import ( type KmsV1alpha1Interface interface { RESTClient() rest.Interface - KMSAutokeyConfigsGetter KMSCryptoKeyVersionsGetter KMSKeyHandlesGetter KMSKeyRingImportJobsGetter @@ -43,10 +42,6 @@ type KmsV1alpha1Client struct { restClient rest.Interface } -func (c *KmsV1alpha1Client) KMSAutokeyConfigs(namespace string) KMSAutokeyConfigInterface { - return newKMSAutokeyConfigs(c, namespace) -} - func (c *KmsV1alpha1Client) KMSCryptoKeyVersions(namespace string) KMSCryptoKeyVersionInterface { return newKMSCryptoKeyVersions(c, namespace) } diff --git a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/fake/fake_kms_client.go b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/fake/fake_kms_client.go index f50f61c1fa..8cabc713f7 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/fake/fake_kms_client.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/fake/fake_kms_client.go @@ -31,6 +31,10 @@ type FakeKmsV1beta1 struct { *testing.Fake } +func (c *FakeKmsV1beta1) KMSAutokeyConfigs(namespace string) v1beta1.KMSAutokeyConfigInterface { + return &FakeKMSAutokeyConfigs{c, namespace} +} + func (c *FakeKmsV1beta1) KMSCryptoKeys(namespace string) v1beta1.KMSCryptoKeyInterface { return &FakeKMSCryptoKeys{c, namespace} } diff --git a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/fake/fake_kmsautokeyconfig.go b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/fake/fake_kmsautokeyconfig.go new file mode 100644 index 0000000000..25a67aaf3c --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/fake/fake_kmsautokeyconfig.go @@ -0,0 +1,144 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/kms/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeKMSAutokeyConfigs implements KMSAutokeyConfigInterface +type FakeKMSAutokeyConfigs struct { + Fake *FakeKmsV1beta1 + ns string +} + +var kmsautokeyconfigsResource = v1beta1.SchemeGroupVersion.WithResource("kmsautokeyconfigs") + +var kmsautokeyconfigsKind = v1beta1.SchemeGroupVersion.WithKind("KMSAutokeyConfig") + +// Get takes name of the kMSAutokeyConfig, and returns the corresponding kMSAutokeyConfig object, and an error if there is any. +func (c *FakeKMSAutokeyConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.KMSAutokeyConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(kmsautokeyconfigsResource, c.ns, name), &v1beta1.KMSAutokeyConfig{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.KMSAutokeyConfig), err +} + +// List takes label and field selectors, and returns the list of KMSAutokeyConfigs that match those selectors. +func (c *FakeKMSAutokeyConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.KMSAutokeyConfigList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(kmsautokeyconfigsResource, kmsautokeyconfigsKind, c.ns, opts), &v1beta1.KMSAutokeyConfigList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.KMSAutokeyConfigList{ListMeta: obj.(*v1beta1.KMSAutokeyConfigList).ListMeta} + for _, item := range obj.(*v1beta1.KMSAutokeyConfigList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested kMSAutokeyConfigs. +func (c *FakeKMSAutokeyConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(kmsautokeyconfigsResource, c.ns, opts)) + +} + +// Create takes the representation of a kMSAutokeyConfig and creates it. Returns the server's representation of the kMSAutokeyConfig, and an error, if there is any. +func (c *FakeKMSAutokeyConfigs) Create(ctx context.Context, kMSAutokeyConfig *v1beta1.KMSAutokeyConfig, opts v1.CreateOptions) (result *v1beta1.KMSAutokeyConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(kmsautokeyconfigsResource, c.ns, kMSAutokeyConfig), &v1beta1.KMSAutokeyConfig{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.KMSAutokeyConfig), err +} + +// Update takes the representation of a kMSAutokeyConfig and updates it. Returns the server's representation of the kMSAutokeyConfig, and an error, if there is any. +func (c *FakeKMSAutokeyConfigs) Update(ctx context.Context, kMSAutokeyConfig *v1beta1.KMSAutokeyConfig, opts v1.UpdateOptions) (result *v1beta1.KMSAutokeyConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(kmsautokeyconfigsResource, c.ns, kMSAutokeyConfig), &v1beta1.KMSAutokeyConfig{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.KMSAutokeyConfig), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeKMSAutokeyConfigs) UpdateStatus(ctx context.Context, kMSAutokeyConfig *v1beta1.KMSAutokeyConfig, opts v1.UpdateOptions) (*v1beta1.KMSAutokeyConfig, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(kmsautokeyconfigsResource, "status", c.ns, kMSAutokeyConfig), &v1beta1.KMSAutokeyConfig{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.KMSAutokeyConfig), err +} + +// Delete takes name of the kMSAutokeyConfig and deletes it. Returns an error if one occurs. +func (c *FakeKMSAutokeyConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(kmsautokeyconfigsResource, c.ns, name, opts), &v1beta1.KMSAutokeyConfig{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeKMSAutokeyConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(kmsautokeyconfigsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.KMSAutokeyConfigList{}) + return err +} + +// Patch applies the patch and returns the patched kMSAutokeyConfig. +func (c *FakeKMSAutokeyConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KMSAutokeyConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(kmsautokeyconfigsResource, c.ns, name, pt, data, subresources...), &v1beta1.KMSAutokeyConfig{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.KMSAutokeyConfig), err +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/generated_expansion.go b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/generated_expansion.go index f8659a93e5..0e389333e9 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/generated_expansion.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/generated_expansion.go @@ -21,6 +21,8 @@ package v1beta1 +type KMSAutokeyConfigExpansion interface{} + type KMSCryptoKeyExpansion interface{} type KMSKeyRingExpansion interface{} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/kms_client.go b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/kms_client.go index be1b8121f0..d3f16cf480 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/kms_client.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/kms_client.go @@ -31,6 +31,7 @@ import ( type KmsV1beta1Interface interface { RESTClient() rest.Interface + KMSAutokeyConfigsGetter KMSCryptoKeysGetter KMSKeyRingsGetter } @@ -40,6 +41,10 @@ type KmsV1beta1Client struct { restClient rest.Interface } +func (c *KmsV1beta1Client) KMSAutokeyConfigs(namespace string) KMSAutokeyConfigInterface { + return newKMSAutokeyConfigs(c, namespace) +} + func (c *KmsV1beta1Client) KMSCryptoKeys(namespace string) KMSCryptoKeyInterface { return newKMSCryptoKeys(c, namespace) } diff --git a/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/kmsautokeyconfig.go b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/kmsautokeyconfig.go new file mode 100644 index 0000000000..71975a89eb --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/kms/v1beta1/kmsautokeyconfig.go @@ -0,0 +1,198 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + v1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/kms/v1beta1" + scheme "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// KMSAutokeyConfigsGetter has a method to return a KMSAutokeyConfigInterface. +// A group's client should implement this interface. +type KMSAutokeyConfigsGetter interface { + KMSAutokeyConfigs(namespace string) KMSAutokeyConfigInterface +} + +// KMSAutokeyConfigInterface has methods to work with KMSAutokeyConfig resources. +type KMSAutokeyConfigInterface interface { + Create(ctx context.Context, kMSAutokeyConfig *v1beta1.KMSAutokeyConfig, opts v1.CreateOptions) (*v1beta1.KMSAutokeyConfig, error) + Update(ctx context.Context, kMSAutokeyConfig *v1beta1.KMSAutokeyConfig, opts v1.UpdateOptions) (*v1beta1.KMSAutokeyConfig, error) + UpdateStatus(ctx context.Context, kMSAutokeyConfig *v1beta1.KMSAutokeyConfig, opts v1.UpdateOptions) (*v1beta1.KMSAutokeyConfig, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.KMSAutokeyConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.KMSAutokeyConfigList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KMSAutokeyConfig, err error) + KMSAutokeyConfigExpansion +} + +// kMSAutokeyConfigs implements KMSAutokeyConfigInterface +type kMSAutokeyConfigs struct { + client rest.Interface + ns string +} + +// newKMSAutokeyConfigs returns a KMSAutokeyConfigs +func newKMSAutokeyConfigs(c *KmsV1beta1Client, namespace string) *kMSAutokeyConfigs { + return &kMSAutokeyConfigs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the kMSAutokeyConfig, and returns the corresponding kMSAutokeyConfig object, and an error if there is any. +func (c *kMSAutokeyConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.KMSAutokeyConfig, err error) { + result = &v1beta1.KMSAutokeyConfig{} + err = c.client.Get(). + Namespace(c.ns). + Resource("kmsautokeyconfigs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of KMSAutokeyConfigs that match those selectors. +func (c *kMSAutokeyConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.KMSAutokeyConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.KMSAutokeyConfigList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("kmsautokeyconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested kMSAutokeyConfigs. +func (c *kMSAutokeyConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("kmsautokeyconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a kMSAutokeyConfig and creates it. Returns the server's representation of the kMSAutokeyConfig, and an error, if there is any. +func (c *kMSAutokeyConfigs) Create(ctx context.Context, kMSAutokeyConfig *v1beta1.KMSAutokeyConfig, opts v1.CreateOptions) (result *v1beta1.KMSAutokeyConfig, err error) { + result = &v1beta1.KMSAutokeyConfig{} + err = c.client.Post(). + Namespace(c.ns). + Resource("kmsautokeyconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(kMSAutokeyConfig). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a kMSAutokeyConfig and updates it. Returns the server's representation of the kMSAutokeyConfig, and an error, if there is any. +func (c *kMSAutokeyConfigs) Update(ctx context.Context, kMSAutokeyConfig *v1beta1.KMSAutokeyConfig, opts v1.UpdateOptions) (result *v1beta1.KMSAutokeyConfig, err error) { + result = &v1beta1.KMSAutokeyConfig{} + err = c.client.Put(). + Namespace(c.ns). + Resource("kmsautokeyconfigs"). + Name(kMSAutokeyConfig.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(kMSAutokeyConfig). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *kMSAutokeyConfigs) UpdateStatus(ctx context.Context, kMSAutokeyConfig *v1beta1.KMSAutokeyConfig, opts v1.UpdateOptions) (result *v1beta1.KMSAutokeyConfig, err error) { + result = &v1beta1.KMSAutokeyConfig{} + err = c.client.Put(). + Namespace(c.ns). + Resource("kmsautokeyconfigs"). + Name(kMSAutokeyConfig.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(kMSAutokeyConfig). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the kMSAutokeyConfig and deletes it. Returns an error if one occurs. +func (c *kMSAutokeyConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("kmsautokeyconfigs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *kMSAutokeyConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("kmsautokeyconfigs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched kMSAutokeyConfig. +func (c *kMSAutokeyConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KMSAutokeyConfig, err error) { + result = &v1beta1.KMSAutokeyConfig{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("kmsautokeyconfigs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmsautokeyconfig.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmsautokeyconfig.md index 9460f9d492..f35b519123 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmsautokeyconfig.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmsautokeyconfig.md @@ -73,6 +73,7 @@ keyProject: name: string namespace: string ``` + @@ -296,6 +297,7 @@ observedState: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + apiVersion: kms.cnrm.cloud.google.com/v1beta1 kind: KMSAutokeyConfig metadata: