diff --git a/apis/pinniped/doc.go.tmpl b/apis/pinniped/doc.go.tmpl deleted file mode 100644 index fea6e743..00000000 --- a/apis/pinniped/doc.go.tmpl +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=pinniped.dev - -// Package pinniped is the internal version of the Pinniped aggregated API. -package pinniped diff --git a/apis/pinniped/register.go.tmpl b/apis/pinniped/register.go.tmpl deleted file mode 100644 index 73e69e17..00000000 --- a/apis/pinniped/register.go.tmpl +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package pinniped - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind. -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CredentialRequest{}, - &CredentialRequestList{}, - ) - return nil -} diff --git a/apis/pinniped/types.go.tmpl b/apis/pinniped/types.go.tmpl deleted file mode 100644 index 8f46e2a4..00000000 --- a/apis/pinniped/types.go.tmpl +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package pinniped - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type CredentialType string - -const ( - TokenCredentialType = CredentialType("token") -) - -type CredentialRequestTokenCredential struct { - // Value of the bearer token supplied with the credential request. - Value string -} - -type CredentialRequestSpec struct { - // Type of credential. - Type CredentialType - - // Token credential (when Type == TokenCredentialType). - Token *CredentialRequestTokenCredential -} - -type CredentialRequestCredential struct { - // ExpirationTimestamp indicates a time when the provided credentials expire. - ExpirationTimestamp metav1.Time - - // Token is a bearer token used by the client for request authentication. - Token string - - // PEM-encoded client TLS certificates (including intermediates, if any). - ClientCertificateData string - - // PEM-encoded private key for the above certificate. - ClientKeyData string -} - -type CredentialRequestStatus struct { - // A Credential will be returned for a successful credential request. - // +optional - Credential *CredentialRequestCredential - - // An error message will be returned for an unsuccessful credential request. - // +optional - Message *string -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type CredentialRequest struct { - metav1.TypeMeta - metav1.ObjectMeta - - Spec CredentialRequestSpec - Status CredentialRequestStatus -} - -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CredentialRequestList is a list of CredentialRequest objects. -type CredentialRequestList struct { - metav1.TypeMeta - metav1.ListMeta - - // Items is a list of CredentialRequests - Items []CredentialRequest -} diff --git a/apis/pinniped/v1alpha1/conversion.go.tmpl b/apis/pinniped/v1alpha1/conversion.go.tmpl deleted file mode 100644 index 226f6135..00000000 --- a/apis/pinniped/v1alpha1/conversion.go.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 diff --git a/apis/pinniped/v1alpha1/defaults.go.tmpl b/apis/pinniped/v1alpha1/defaults.go.tmpl deleted file mode 100644 index 830aa010..00000000 --- a/apis/pinniped/v1alpha1/defaults.go.tmpl +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/apis/pinniped/v1alpha1/doc.go.tmpl b/apis/pinniped/v1alpha1/doc.go.tmpl deleted file mode 100644 index f269e827..00000000 --- a/apis/pinniped/v1alpha1/doc.go.tmpl +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/GENERATED_PKG/apis/pinniped -// +k8s:defaulter-gen=TypeMeta -// +groupName=pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped aggregated API. -package v1alpha1 diff --git a/apis/pinniped/v1alpha1/register.go.tmpl b/apis/pinniped/v1alpha1/register.go.tmpl deleted file mode 100644 index 04a72c6f..00000000 --- a/apis/pinniped/v1alpha1/register.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CredentialRequest{}, - &CredentialRequestList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/apis/pinniped/v1alpha1/types.go.tmpl b/apis/pinniped/v1alpha1/types.go.tmpl deleted file mode 100644 index ac077576..00000000 --- a/apis/pinniped/v1alpha1/types.go.tmpl +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type CredentialType string - -const ( - TokenCredentialType = CredentialType("token") -) - -// CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider. -type CredentialRequestTokenCredential struct { - // Value of the bearer token supplied with the credential request. - Value string `json:"value,omitempty"` -} - -// CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API -type CredentialRequestSpec struct { - // Type of credential. - Type CredentialType `json:"type,omitempty"` - - // Token credential (when Type == TokenCredentialType). - Token *CredentialRequestTokenCredential `json:"token,omitempty"` -} - -// CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It -// contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster. -type CredentialRequestCredential struct { - // ExpirationTimestamp indicates a time when the provided credentials expire. - ExpirationTimestamp metav1.Time `json:"expirationTimestamp,omitempty"` - - // Token is a bearer token used by the client for request authentication. - Token string `json:"token,omitempty"` - - // PEM-encoded client TLS certificates (including intermediates, if any). - ClientCertificateData string `json:"clientCertificateData,omitempty"` - - // PEM-encoded private key for the above certificate. - ClientKeyData string `json:"clientKeyData,omitempty"` -} - -// CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API. -type CredentialRequestStatus struct { - // A Credential will be returned for a successful credential request. - // +optional - Credential *CredentialRequestCredential `json:"credential,omitempty"` - - // An error message will be returned for an unsuccessful credential request. - // +optional - Message *string `json:"message,omitempty"` -} - -// CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential. -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type CredentialRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec CredentialRequestSpec `json:"spec,omitempty"` - Status CredentialRequestStatus `json:"status,omitempty"` -} - - -// CredentialRequestList is a list of CredentialRequest objects. -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type CredentialRequestList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - - Items []CredentialRequest `json:"items"` -} diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index c1dcd8d9..13d79c6b 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -159,23 +159,6 @@ spec: --- apiVersion: apiregistration.k8s.io/v1 kind: APIService -metadata: - name: v1alpha1.pinniped.dev - labels: - app: #@ data.values.app_name -spec: - version: v1alpha1 - group: pinniped.dev - groupPriorityMinimum: 2500 #! TODO what is the right value? https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#apiservicespec-v1beta1-apiregistration-k8s-io - versionPriority: 10 #! TODO what is the right value? https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#apiservicespec-v1beta1-apiregistration-k8s-io - #! caBundle: Do not include this key here. Starts out null, will be updated/owned by the golang code. - service: - name: pinniped-api - namespace: #@ data.values.namespace - port: 443 ---- -apiVersion: apiregistration.k8s.io/v1 -kind: APIService metadata: name: v1alpha1.login.pinniped.dev labels: diff --git a/deploy/rbac.yaml b/deploy/rbac.yaml index db45e07c..462b91f8 100644 --- a/deploy/rbac.yaml +++ b/deploy/rbac.yaml @@ -101,9 +101,6 @@ kind: ClusterRole metadata: name: #@ data.values.app_name + "-credentialrequests-cluster-role" rules: - - apiGroups: [pinniped.dev] - resources: [credentialrequests] - verbs: [create] - apiGroups: [login.pinniped.dev] resources: [tokencredentialrequests] verbs: [create] diff --git a/generated/1.17/README.adoc b/generated/1.17/README.adoc index 5e298c80..f9849700 100644 --- a/generated/1.17/README.adoc +++ b/generated/1.17/README.adoc @@ -8,7 +8,6 @@ - xref:{anchor_prefix}-config-pinniped-dev-v1alpha1[$$config.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-pinniped-dev-v1alpha1[$$idp.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-pinniped-dev-v1alpha1[$$login.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-pinniped-dev-v1alpha1[$$pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-config-pinniped-dev-v1alpha1"] @@ -285,106 +284,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-pinniped-dev-v1alpha1"] -=== pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped aggregated API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequest"] -==== CredentialRequest - -CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequestlist[$$CredentialRequestList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequestspec[$$CredentialRequestSpec$$]__ | -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequeststatus[$$CredentialRequestStatus$$]__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequestcredential"] -==== CredentialRequestCredential - -CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequeststatus[$$CredentialRequestStatus$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`expirationTimestamp`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#time-v1-meta[$$Time$$]__ | ExpirationTimestamp indicates a time when the provided credentials expire. -| *`token`* __string__ | Token is a bearer token used by the client for request authentication. -| *`clientCertificateData`* __string__ | PEM-encoded client TLS certificates (including intermediates, if any). -| *`clientKeyData`* __string__ | PEM-encoded private key for the above certificate. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequestspec"] -==== CredentialRequestSpec - -CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequest[$$CredentialRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`type`* __CredentialType__ | Type of credential. -| *`token`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequesttokencredential[$$CredentialRequestTokenCredential$$]__ | Token credential (when Type == TokenCredentialType). -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequeststatus"] -==== CredentialRequestStatus - -CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequest[$$CredentialRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`credential`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequestcredential[$$CredentialRequestCredential$$]__ | A Credential will be returned for a successful credential request. -| *`message`* __string__ | An error message will be returned for an unsuccessful credential request. -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequesttokencredential"] -==== CredentialRequestTokenCredential - -CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-pinniped-v1alpha1-credentialrequestspec[$$CredentialRequestSpec$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`value`* __string__ | Value of the bearer token supplied with the credential request. -|=== - - diff --git a/generated/1.17/apis/pinniped/doc.go b/generated/1.17/apis/pinniped/doc.go deleted file mode 100644 index fea6e743..00000000 --- a/generated/1.17/apis/pinniped/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=pinniped.dev - -// Package pinniped is the internal version of the Pinniped aggregated API. -package pinniped diff --git a/generated/1.17/apis/pinniped/register.go b/generated/1.17/apis/pinniped/register.go deleted file mode 100644 index 73e69e17..00000000 --- a/generated/1.17/apis/pinniped/register.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package pinniped - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind. -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CredentialRequest{}, - &CredentialRequestList{}, - ) - return nil -} diff --git a/generated/1.17/apis/pinniped/types.go b/generated/1.17/apis/pinniped/types.go deleted file mode 100644 index 8f46e2a4..00000000 --- a/generated/1.17/apis/pinniped/types.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package pinniped - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type CredentialType string - -const ( - TokenCredentialType = CredentialType("token") -) - -type CredentialRequestTokenCredential struct { - // Value of the bearer token supplied with the credential request. - Value string -} - -type CredentialRequestSpec struct { - // Type of credential. - Type CredentialType - - // Token credential (when Type == TokenCredentialType). - Token *CredentialRequestTokenCredential -} - -type CredentialRequestCredential struct { - // ExpirationTimestamp indicates a time when the provided credentials expire. - ExpirationTimestamp metav1.Time - - // Token is a bearer token used by the client for request authentication. - Token string - - // PEM-encoded client TLS certificates (including intermediates, if any). - ClientCertificateData string - - // PEM-encoded private key for the above certificate. - ClientKeyData string -} - -type CredentialRequestStatus struct { - // A Credential will be returned for a successful credential request. - // +optional - Credential *CredentialRequestCredential - - // An error message will be returned for an unsuccessful credential request. - // +optional - Message *string -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type CredentialRequest struct { - metav1.TypeMeta - metav1.ObjectMeta - - Spec CredentialRequestSpec - Status CredentialRequestStatus -} - -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CredentialRequestList is a list of CredentialRequest objects. -type CredentialRequestList struct { - metav1.TypeMeta - metav1.ListMeta - - // Items is a list of CredentialRequests - Items []CredentialRequest -} diff --git a/generated/1.17/apis/pinniped/v1alpha1/conversion.go b/generated/1.17/apis/pinniped/v1alpha1/conversion.go deleted file mode 100644 index 226f6135..00000000 --- a/generated/1.17/apis/pinniped/v1alpha1/conversion.go +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 diff --git a/generated/1.17/apis/pinniped/v1alpha1/defaults.go b/generated/1.17/apis/pinniped/v1alpha1/defaults.go deleted file mode 100644 index 830aa010..00000000 --- a/generated/1.17/apis/pinniped/v1alpha1/defaults.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/generated/1.17/apis/pinniped/v1alpha1/doc.go b/generated/1.17/apis/pinniped/v1alpha1/doc.go deleted file mode 100644 index 26651cba..00000000 --- a/generated/1.17/apis/pinniped/v1alpha1/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.17/apis/pinniped -// +k8s:defaulter-gen=TypeMeta -// +groupName=pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped aggregated API. -package v1alpha1 diff --git a/generated/1.17/apis/pinniped/v1alpha1/register.go b/generated/1.17/apis/pinniped/v1alpha1/register.go deleted file mode 100644 index 04a72c6f..00000000 --- a/generated/1.17/apis/pinniped/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CredentialRequest{}, - &CredentialRequestList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.17/apis/pinniped/v1alpha1/types.go b/generated/1.17/apis/pinniped/v1alpha1/types.go deleted file mode 100644 index ac077576..00000000 --- a/generated/1.17/apis/pinniped/v1alpha1/types.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type CredentialType string - -const ( - TokenCredentialType = CredentialType("token") -) - -// CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider. -type CredentialRequestTokenCredential struct { - // Value of the bearer token supplied with the credential request. - Value string `json:"value,omitempty"` -} - -// CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API -type CredentialRequestSpec struct { - // Type of credential. - Type CredentialType `json:"type,omitempty"` - - // Token credential (when Type == TokenCredentialType). - Token *CredentialRequestTokenCredential `json:"token,omitempty"` -} - -// CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It -// contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster. -type CredentialRequestCredential struct { - // ExpirationTimestamp indicates a time when the provided credentials expire. - ExpirationTimestamp metav1.Time `json:"expirationTimestamp,omitempty"` - - // Token is a bearer token used by the client for request authentication. - Token string `json:"token,omitempty"` - - // PEM-encoded client TLS certificates (including intermediates, if any). - ClientCertificateData string `json:"clientCertificateData,omitempty"` - - // PEM-encoded private key for the above certificate. - ClientKeyData string `json:"clientKeyData,omitempty"` -} - -// CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API. -type CredentialRequestStatus struct { - // A Credential will be returned for a successful credential request. - // +optional - Credential *CredentialRequestCredential `json:"credential,omitempty"` - - // An error message will be returned for an unsuccessful credential request. - // +optional - Message *string `json:"message,omitempty"` -} - -// CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential. -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type CredentialRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec CredentialRequestSpec `json:"spec,omitempty"` - Status CredentialRequestStatus `json:"status,omitempty"` -} - - -// CredentialRequestList is a list of CredentialRequest objects. -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type CredentialRequestList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - - Items []CredentialRequest `json:"items"` -} diff --git a/generated/1.17/apis/pinniped/v1alpha1/zz_generated.conversion.go b/generated/1.17/apis/pinniped/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 5cd0016a..00000000 --- a/generated/1.17/apis/pinniped/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,230 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - pinniped "go.pinniped.dev/generated/1.17/apis/pinniped" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CredentialRequest)(nil), (*pinniped.CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(a.(*CredentialRequest), b.(*pinniped.CredentialRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequest)(nil), (*CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(a.(*pinniped.CredentialRequest), b.(*CredentialRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestCredential)(nil), (*pinniped.CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(a.(*CredentialRequestCredential), b.(*pinniped.CredentialRequestCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestCredential)(nil), (*CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(a.(*pinniped.CredentialRequestCredential), b.(*CredentialRequestCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestList)(nil), (*pinniped.CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(a.(*CredentialRequestList), b.(*pinniped.CredentialRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestList)(nil), (*CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(a.(*pinniped.CredentialRequestList), b.(*CredentialRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestSpec)(nil), (*pinniped.CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(a.(*CredentialRequestSpec), b.(*pinniped.CredentialRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestSpec)(nil), (*CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(a.(*pinniped.CredentialRequestSpec), b.(*CredentialRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestStatus)(nil), (*pinniped.CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(a.(*CredentialRequestStatus), b.(*pinniped.CredentialRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestStatus)(nil), (*CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(a.(*pinniped.CredentialRequestStatus), b.(*CredentialRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestTokenCredential)(nil), (*pinniped.CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(a.(*CredentialRequestTokenCredential), b.(*pinniped.CredentialRequestTokenCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestTokenCredential)(nil), (*CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(a.(*pinniped.CredentialRequestTokenCredential), b.(*CredentialRequestTokenCredential), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in *CredentialRequest, out *pinniped.CredentialRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in *CredentialRequest, out *pinniped.CredentialRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in, out, s) -} - -func autoConvert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in *pinniped.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest is an autogenerated conversion function. -func Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in *pinniped.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in *CredentialRequestCredential, out *pinniped.CredentialRequestCredential, s conversion.Scope) error { - out.ExpirationTimestamp = in.ExpirationTimestamp - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in *CredentialRequestCredential, out *pinniped.CredentialRequestCredential, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *pinniped.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { - out.ExpirationTimestamp = in.ExpirationTimestamp - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *pinniped.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in *CredentialRequestList, out *pinniped.CredentialRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]pinniped.CredentialRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in *CredentialRequestList, out *pinniped.CredentialRequestList, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *pinniped.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]CredentialRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *pinniped.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in *CredentialRequestSpec, out *pinniped.CredentialRequestSpec, s conversion.Scope) error { - out.Type = pinniped.CredentialType(in.Type) - out.Token = (*pinniped.CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) - return nil -} - -// Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in *CredentialRequestSpec, out *pinniped.CredentialRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *pinniped.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { - out.Type = CredentialType(in.Type) - out.Token = (*CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) - return nil -} - -// Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *pinniped.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in *CredentialRequestStatus, out *pinniped.CredentialRequestStatus, s conversion.Scope) error { - out.Credential = (*pinniped.CredentialRequestCredential)(unsafe.Pointer(in.Credential)) - out.Message = (*string)(unsafe.Pointer(in.Message)) - return nil -} - -// Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in *CredentialRequestStatus, out *pinniped.CredentialRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *pinniped.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { - out.Credential = (*CredentialRequestCredential)(unsafe.Pointer(in.Credential)) - out.Message = (*string)(unsafe.Pointer(in.Message)) - return nil -} - -// Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *pinniped.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *pinniped.CredentialRequestTokenCredential, s conversion.Scope) error { - out.Value = in.Value - return nil -} - -// Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *pinniped.CredentialRequestTokenCredential, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *pinniped.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { - out.Value = in.Value - return nil -} - -// Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *pinniped.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in, out, s) -} diff --git a/generated/1.17/apis/pinniped/v1alpha1/zz_generated.deepcopy.go b/generated/1.17/apis/pinniped/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index c44aa5a5..00000000 --- a/generated/1.17/apis/pinniped/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,153 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequest) DeepCopyInto(out *CredentialRequest) { - *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 CredentialRequest. -func (in *CredentialRequest) DeepCopy() *CredentialRequest { - if in == nil { - return nil - } - out := new(CredentialRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestCredential) DeepCopyInto(out *CredentialRequestCredential) { - *out = *in - in.ExpirationTimestamp.DeepCopyInto(&out.ExpirationTimestamp) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestCredential. -func (in *CredentialRequestCredential) DeepCopy() *CredentialRequestCredential { - if in == nil { - return nil - } - out := new(CredentialRequestCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestList) DeepCopyInto(out *CredentialRequestList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CredentialRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestList. -func (in *CredentialRequestList) DeepCopy() *CredentialRequestList { - if in == nil { - return nil - } - out := new(CredentialRequestList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequestList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestSpec) DeepCopyInto(out *CredentialRequestSpec) { - *out = *in - if in.Token != nil { - in, out := &in.Token, &out.Token - *out = new(CredentialRequestTokenCredential) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestSpec. -func (in *CredentialRequestSpec) DeepCopy() *CredentialRequestSpec { - if in == nil { - return nil - } - out := new(CredentialRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestStatus) DeepCopyInto(out *CredentialRequestStatus) { - *out = *in - if in.Credential != nil { - in, out := &in.Credential, &out.Credential - *out = new(CredentialRequestCredential) - (*in).DeepCopyInto(*out) - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestStatus. -func (in *CredentialRequestStatus) DeepCopy() *CredentialRequestStatus { - if in == nil { - return nil - } - out := new(CredentialRequestStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestTokenCredential) DeepCopyInto(out *CredentialRequestTokenCredential) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestTokenCredential. -func (in *CredentialRequestTokenCredential) DeepCopy() *CredentialRequestTokenCredential { - if in == nil { - return nil - } - out := new(CredentialRequestTokenCredential) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.17/apis/pinniped/v1alpha1/zz_generated.defaults.go b/generated/1.17/apis/pinniped/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index 427b2e2e..00000000 --- a/generated/1.17/apis/pinniped/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/generated/1.17/apis/pinniped/zz_generated.deepcopy.go b/generated/1.17/apis/pinniped/zz_generated.deepcopy.go deleted file mode 100644 index 29f35918..00000000 --- a/generated/1.17/apis/pinniped/zz_generated.deepcopy.go +++ /dev/null @@ -1,153 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package pinniped - -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 *CredentialRequest) DeepCopyInto(out *CredentialRequest) { - *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 CredentialRequest. -func (in *CredentialRequest) DeepCopy() *CredentialRequest { - if in == nil { - return nil - } - out := new(CredentialRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestCredential) DeepCopyInto(out *CredentialRequestCredential) { - *out = *in - in.ExpirationTimestamp.DeepCopyInto(&out.ExpirationTimestamp) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestCredential. -func (in *CredentialRequestCredential) DeepCopy() *CredentialRequestCredential { - if in == nil { - return nil - } - out := new(CredentialRequestCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestList) DeepCopyInto(out *CredentialRequestList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CredentialRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestList. -func (in *CredentialRequestList) DeepCopy() *CredentialRequestList { - if in == nil { - return nil - } - out := new(CredentialRequestList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequestList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestSpec) DeepCopyInto(out *CredentialRequestSpec) { - *out = *in - if in.Token != nil { - in, out := &in.Token, &out.Token - *out = new(CredentialRequestTokenCredential) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestSpec. -func (in *CredentialRequestSpec) DeepCopy() *CredentialRequestSpec { - if in == nil { - return nil - } - out := new(CredentialRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestStatus) DeepCopyInto(out *CredentialRequestStatus) { - *out = *in - if in.Credential != nil { - in, out := &in.Credential, &out.Credential - *out = new(CredentialRequestCredential) - (*in).DeepCopyInto(*out) - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestStatus. -func (in *CredentialRequestStatus) DeepCopy() *CredentialRequestStatus { - if in == nil { - return nil - } - out := new(CredentialRequestStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestTokenCredential) DeepCopyInto(out *CredentialRequestTokenCredential) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestTokenCredential. -func (in *CredentialRequestTokenCredential) DeepCopy() *CredentialRequestTokenCredential { - if in == nil { - return nil - } - out := new(CredentialRequestTokenCredential) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.17/client/clientset/versioned/clientset.go b/generated/1.17/client/clientset/versioned/clientset.go index 0ce2c889..9fdf9233 100644 --- a/generated/1.17/client/clientset/versioned/clientset.go +++ b/generated/1.17/client/clientset/versioned/clientset.go @@ -11,7 +11,6 @@ import ( configv1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -22,17 +21,15 @@ type Interface interface { ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface LoginV1alpha1() loginv1alpha1.LoginV1alpha1Interface - PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - loginV1alpha1 *loginv1alpha1.LoginV1alpha1Client - pinnipedV1alpha1 *pinnipedv1alpha1.PinnipedV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client + loginV1alpha1 *loginv1alpha1.LoginV1alpha1Client } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -50,11 +47,6 @@ func (c *Clientset) LoginV1alpha1() loginv1alpha1.LoginV1alpha1Interface { return c.loginV1alpha1 } -// PinnipedV1alpha1 retrieves the PinnipedV1alpha1Client -func (c *Clientset) PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface { - return c.pinnipedV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -88,10 +80,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.pinnipedV1alpha1, err = pinnipedv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -107,7 +95,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.configV1alpha1 = configv1alpha1.NewForConfigOrDie(c) cs.iDPV1alpha1 = idpv1alpha1.NewForConfigOrDie(c) cs.loginV1alpha1 = loginv1alpha1.NewForConfigOrDie(c) - cs.pinnipedV1alpha1 = pinnipedv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -119,7 +106,6 @@ func New(c rest.Interface) *Clientset { cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) cs.loginV1alpha1 = loginv1alpha1.New(c) - cs.pinnipedV1alpha1 = pinnipedv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.17/client/clientset/versioned/fake/clientset_generated.go b/generated/1.17/client/clientset/versioned/fake/clientset_generated.go index ec10ba26..5ce3436b 100644 --- a/generated/1.17/client/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.17/client/clientset/versioned/fake/clientset_generated.go @@ -13,8 +13,6 @@ import ( fakeidpv1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/idp/v1alpha1/fake" loginv1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/login/v1alpha1" fakeloginv1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/login/v1alpha1/fake" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1" - fakepinnipedv1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -83,8 +81,3 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { func (c *Clientset) LoginV1alpha1() loginv1alpha1.LoginV1alpha1Interface { return &fakeloginv1alpha1.FakeLoginV1alpha1{Fake: &c.Fake} } - -// PinnipedV1alpha1 retrieves the PinnipedV1alpha1Client -func (c *Clientset) PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface { - return &fakepinnipedv1alpha1.FakePinnipedV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.17/client/clientset/versioned/fake/register.go b/generated/1.17/client/clientset/versioned/fake/register.go index 8b5269cc..4839890f 100644 --- a/generated/1.17/client/clientset/versioned/fake/register.go +++ b/generated/1.17/client/clientset/versioned/fake/register.go @@ -9,7 +9,6 @@ import ( configv1alpha1 "go.pinniped.dev/generated/1.17/apis/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.17/apis/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.17/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -24,7 +23,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, loginv1alpha1.AddToScheme, - pinnipedv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.17/client/clientset/versioned/scheme/register.go b/generated/1.17/client/clientset/versioned/scheme/register.go index 7ba56003..ffa304a3 100644 --- a/generated/1.17/client/clientset/versioned/scheme/register.go +++ b/generated/1.17/client/clientset/versioned/scheme/register.go @@ -9,7 +9,6 @@ import ( configv1alpha1 "go.pinniped.dev/generated/1.17/apis/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.17/apis/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.17/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -24,7 +23,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, loginv1alpha1.AddToScheme, - pinnipedv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go b/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go deleted file mode 100644 index cba7920e..00000000 --- a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "time" - - v1alpha1 "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1" - scheme "go.pinniped.dev/generated/1.17/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" -) - -// CredentialRequestsGetter has a method to return a CredentialRequestInterface. -// A group's client should implement this interface. -type CredentialRequestsGetter interface { - CredentialRequests() CredentialRequestInterface -} - -// CredentialRequestInterface has methods to work with CredentialRequest resources. -type CredentialRequestInterface interface { - Create(*v1alpha1.CredentialRequest) (*v1alpha1.CredentialRequest, error) - Update(*v1alpha1.CredentialRequest) (*v1alpha1.CredentialRequest, error) - UpdateStatus(*v1alpha1.CredentialRequest) (*v1alpha1.CredentialRequest, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.CredentialRequest, error) - List(opts v1.ListOptions) (*v1alpha1.CredentialRequestList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CredentialRequest, err error) - CredentialRequestExpansion -} - -// credentialRequests implements CredentialRequestInterface -type credentialRequests struct { - client rest.Interface -} - -// newCredentialRequests returns a CredentialRequests -func newCredentialRequests(c *PinnipedV1alpha1Client) *credentialRequests { - return &credentialRequests{ - client: c.RESTClient(), - } -} - -// Get takes name of the credentialRequest, and returns the corresponding credentialRequest object, and an error if there is any. -func (c *credentialRequests) Get(name string, options v1.GetOptions) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Get(). - Resource("credentialrequests"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CredentialRequests that match those selectors. -func (c *credentialRequests) List(opts v1.ListOptions) (result *v1alpha1.CredentialRequestList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.CredentialRequestList{} - err = c.client.Get(). - Resource("credentialrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested credentialRequests. -func (c *credentialRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("credentialrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a credentialRequest and creates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *credentialRequests) Create(credentialRequest *v1alpha1.CredentialRequest) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Post(). - Resource("credentialrequests"). - Body(credentialRequest). - Do(). - Into(result) - return -} - -// Update takes the representation of a credentialRequest and updates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *credentialRequests) Update(credentialRequest *v1alpha1.CredentialRequest) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Put(). - Resource("credentialrequests"). - Name(credentialRequest.Name). - Body(credentialRequest). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *credentialRequests) UpdateStatus(credentialRequest *v1alpha1.CredentialRequest) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Put(). - Resource("credentialrequests"). - Name(credentialRequest.Name). - SubResource("status"). - Body(credentialRequest). - Do(). - Into(result) - return -} - -// Delete takes name of the credentialRequest and deletes it. Returns an error if one occurs. -func (c *credentialRequests) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("credentialrequests"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *credentialRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("credentialrequests"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched credentialRequest. -func (c *credentialRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Patch(pt). - Resource("credentialrequests"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/doc.go b/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/doc.go deleted file mode 100644 index f75bf91f..00000000 --- a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go b/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go deleted file mode 100644 index 7879170d..00000000 --- a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go b/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go deleted file mode 100644 index 6a7317ba..00000000 --- a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCredentialRequests implements CredentialRequestInterface -type FakeCredentialRequests struct { - Fake *FakePinnipedV1alpha1 -} - -var credentialrequestsResource = schema.GroupVersionResource{Group: "pinniped.dev", Version: "v1alpha1", Resource: "credentialrequests"} - -var credentialrequestsKind = schema.GroupVersionKind{Group: "pinniped.dev", Version: "v1alpha1", Kind: "CredentialRequest"} - -// Get takes name of the credentialRequest, and returns the corresponding credentialRequest object, and an error if there is any. -func (c *FakeCredentialRequests) Get(name string, options v1.GetOptions) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(credentialrequestsResource, name), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} - -// List takes label and field selectors, and returns the list of CredentialRequests that match those selectors. -func (c *FakeCredentialRequests) List(opts v1.ListOptions) (result *v1alpha1.CredentialRequestList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(credentialrequestsResource, credentialrequestsKind, opts), &v1alpha1.CredentialRequestList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.CredentialRequestList{ListMeta: obj.(*v1alpha1.CredentialRequestList).ListMeta} - for _, item := range obj.(*v1alpha1.CredentialRequestList).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 credentialRequests. -func (c *FakeCredentialRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(credentialrequestsResource, opts)) -} - -// Create takes the representation of a credentialRequest and creates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *FakeCredentialRequests) Create(credentialRequest *v1alpha1.CredentialRequest) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(credentialrequestsResource, credentialRequest), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} - -// Update takes the representation of a credentialRequest and updates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *FakeCredentialRequests) Update(credentialRequest *v1alpha1.CredentialRequest) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(credentialrequestsResource, credentialRequest), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), 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 *FakeCredentialRequests) UpdateStatus(credentialRequest *v1alpha1.CredentialRequest) (*v1alpha1.CredentialRequest, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(credentialrequestsResource, "status", credentialRequest), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} - -// Delete takes name of the credentialRequest and deletes it. Returns an error if one occurs. -func (c *FakeCredentialRequests) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(credentialrequestsResource, name), &v1alpha1.CredentialRequest{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCredentialRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(credentialrequestsResource, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.CredentialRequestList{}) - return err -} - -// Patch applies the patch and returns the patched credentialRequest. -func (c *FakeCredentialRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(credentialrequestsResource, name, pt, data, subresources...), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} diff --git a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_pinniped_client.go b/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_pinniped_client.go deleted file mode 100644 index 784bbfa0..00000000 --- a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_pinniped_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakePinnipedV1alpha1 struct { - *testing.Fake -} - -func (c *FakePinnipedV1alpha1) CredentialRequests() v1alpha1.CredentialRequestInterface { - return &FakeCredentialRequests{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakePinnipedV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go b/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go deleted file mode 100644 index d6596a32..00000000 --- a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type CredentialRequestExpansion interface{} diff --git a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go b/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go deleted file mode 100644 index 9f3135fe..00000000 --- a/generated/1.17/client/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1" - "go.pinniped.dev/generated/1.17/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type PinnipedV1alpha1Interface interface { - RESTClient() rest.Interface - CredentialRequestsGetter -} - -// PinnipedV1alpha1Client is used to interact with features provided by the pinniped.dev group. -type PinnipedV1alpha1Client struct { - restClient rest.Interface -} - -func (c *PinnipedV1alpha1Client) CredentialRequests() CredentialRequestInterface { - return newCredentialRequests(c) -} - -// NewForConfig creates a new PinnipedV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*PinnipedV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &PinnipedV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new PinnipedV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PinnipedV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new PinnipedV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *PinnipedV1alpha1Client { - return &PinnipedV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *PinnipedV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.17/client/informers/externalversions/factory.go b/generated/1.17/client/informers/externalversions/factory.go index 6690b98a..414a8b20 100644 --- a/generated/1.17/client/informers/externalversions/factory.go +++ b/generated/1.17/client/informers/externalversions/factory.go @@ -15,7 +15,6 @@ import ( idp "go.pinniped.dev/generated/1.17/client/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.17/client/informers/externalversions/internalinterfaces" login "go.pinniped.dev/generated/1.17/client/informers/externalversions/login" - pinniped "go.pinniped.dev/generated/1.17/client/informers/externalversions/pinniped" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -165,7 +164,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface Login() login.Interface - Pinniped() pinniped.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -179,7 +177,3 @@ func (f *sharedInformerFactory) IDP() idp.Interface { func (f *sharedInformerFactory) Login() login.Interface { return login.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Pinniped() pinniped.Interface { - return pinniped.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.17/client/informers/externalversions/generic.go b/generated/1.17/client/informers/externalversions/generic.go index 5d2f19e7..01e9dfa3 100644 --- a/generated/1.17/client/informers/externalversions/generic.go +++ b/generated/1.17/client/informers/externalversions/generic.go @@ -11,7 +11,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.17/apis/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.17/apis/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.17/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -54,10 +53,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case loginv1alpha1.SchemeGroupVersion.WithResource("tokencredentialrequests"): return &genericInformer{resource: resource.GroupResource(), informer: f.Login().V1alpha1().TokenCredentialRequests().Informer()}, nil - // Group=pinniped.dev, Version=v1alpha1 - case pinnipedv1alpha1.SchemeGroupVersion.WithResource("credentialrequests"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Pinniped().V1alpha1().CredentialRequests().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.17/client/informers/externalversions/pinniped/interface.go b/generated/1.17/client/informers/externalversions/pinniped/interface.go deleted file mode 100644 index b8b087c5..00000000 --- a/generated/1.17/client/informers/externalversions/pinniped/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package pinniped - -import ( - internalinterfaces "go.pinniped.dev/generated/1.17/client/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.17/client/informers/externalversions/pinniped/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.17/client/informers/externalversions/pinniped/v1alpha1/credentialrequest.go b/generated/1.17/client/informers/externalversions/pinniped/v1alpha1/credentialrequest.go deleted file mode 100644 index 99e4d352..00000000 --- a/generated/1.17/client/informers/externalversions/pinniped/v1alpha1/credentialrequest.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - time "time" - - pinnipedv1alpha1 "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1" - versioned "go.pinniped.dev/generated/1.17/client/clientset/versioned" - internalinterfaces "go.pinniped.dev/generated/1.17/client/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.17/client/listers/pinniped/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// CredentialRequestInformer provides access to a shared informer and lister for -// CredentialRequests. -type CredentialRequestInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.CredentialRequestLister -} - -type credentialRequestInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewCredentialRequestInformer constructs a new informer for CredentialRequest type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewCredentialRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredCredentialRequestInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredCredentialRequestInformer constructs a new informer for CredentialRequest type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredCredentialRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.PinnipedV1alpha1().CredentialRequests().List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.PinnipedV1alpha1().CredentialRequests().Watch(options) - }, - }, - &pinnipedv1alpha1.CredentialRequest{}, - resyncPeriod, - indexers, - ) -} - -func (f *credentialRequestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredCredentialRequestInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *credentialRequestInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&pinnipedv1alpha1.CredentialRequest{}, f.defaultInformer) -} - -func (f *credentialRequestInformer) Lister() v1alpha1.CredentialRequestLister { - return v1alpha1.NewCredentialRequestLister(f.Informer().GetIndexer()) -} diff --git a/generated/1.17/client/informers/externalversions/pinniped/v1alpha1/interface.go b/generated/1.17/client/informers/externalversions/pinniped/v1alpha1/interface.go deleted file mode 100644 index b1121966..00000000 --- a/generated/1.17/client/informers/externalversions/pinniped/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.17/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // CredentialRequests returns a CredentialRequestInformer. - CredentialRequests() CredentialRequestInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// CredentialRequests returns a CredentialRequestInformer. -func (v *version) CredentialRequests() CredentialRequestInformer { - return &credentialRequestInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.17/client/listers/pinniped/v1alpha1/credentialrequest.go b/generated/1.17/client/listers/pinniped/v1alpha1/credentialrequest.go deleted file mode 100644 index a3c6f50f..00000000 --- a/generated/1.17/client/listers/pinniped/v1alpha1/credentialrequest.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// CredentialRequestLister helps list CredentialRequests. -type CredentialRequestLister interface { - // List lists all CredentialRequests in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.CredentialRequest, err error) - // Get retrieves the CredentialRequest from the index for a given name. - Get(name string) (*v1alpha1.CredentialRequest, error) - CredentialRequestListerExpansion -} - -// credentialRequestLister implements the CredentialRequestLister interface. -type credentialRequestLister struct { - indexer cache.Indexer -} - -// NewCredentialRequestLister returns a new CredentialRequestLister. -func NewCredentialRequestLister(indexer cache.Indexer) CredentialRequestLister { - return &credentialRequestLister{indexer: indexer} -} - -// List lists all CredentialRequests in the indexer. -func (s *credentialRequestLister) List(selector labels.Selector) (ret []*v1alpha1.CredentialRequest, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.CredentialRequest)) - }) - return ret, err -} - -// Get retrieves the CredentialRequest from the index for a given name. -func (s *credentialRequestLister) Get(name string) (*v1alpha1.CredentialRequest, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("credentialrequest"), name) - } - return obj.(*v1alpha1.CredentialRequest), nil -} diff --git a/generated/1.17/client/listers/pinniped/v1alpha1/expansion_generated.go b/generated/1.17/client/listers/pinniped/v1alpha1/expansion_generated.go deleted file mode 100644 index e39b06ca..00000000 --- a/generated/1.17/client/listers/pinniped/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// CredentialRequestListerExpansion allows custom methods to be added to -// CredentialRequestLister. -type CredentialRequestListerExpansion interface{} diff --git a/generated/1.17/client/openapi/zz_generated.openapi.go b/generated/1.17/client/openapi/zz_generated.openapi.go index 4b5394a3..829e2448 100644 --- a/generated/1.17/client/openapi/zz_generated.openapi.go +++ b/generated/1.17/client/openapi/zz_generated.openapi.go @@ -33,12 +33,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "go.pinniped.dev/generated/1.17/apis/login/v1alpha1.TokenCredentialRequestList": schema_117_apis_login_v1alpha1_TokenCredentialRequestList(ref), "go.pinniped.dev/generated/1.17/apis/login/v1alpha1.TokenCredentialRequestSpec": schema_117_apis_login_v1alpha1_TokenCredentialRequestSpec(ref), "go.pinniped.dev/generated/1.17/apis/login/v1alpha1.TokenCredentialRequestStatus": schema_117_apis_login_v1alpha1_TokenCredentialRequestStatus(ref), - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequest": schema_117_apis_pinniped_v1alpha1_CredentialRequest(ref), - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestCredential": schema_117_apis_pinniped_v1alpha1_CredentialRequestCredential(ref), - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestList": schema_117_apis_pinniped_v1alpha1_CredentialRequestList(ref), - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestSpec": schema_117_apis_pinniped_v1alpha1_CredentialRequestSpec(ref), - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestStatus": schema_117_apis_pinniped_v1alpha1_CredentialRequestStatus(ref), - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestTokenCredential": schema_117_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), @@ -711,215 +705,6 @@ func schema_117_apis_login_v1alpha1_TokenCredentialRequestStatus(ref common.Refe } } -func schema_117_apis_pinniped_v1alpha1_CredentialRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Ref: ref("go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestSpec", "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_117_apis_pinniped_v1alpha1_CredentialRequestCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "expirationTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "token": { - SchemaProps: spec.SchemaProps{ - Description: "Token is a bearer token used by the client for request authentication.", - Type: []string{"string"}, - Format: "", - }, - }, - "clientCertificateData": { - SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded client TLS certificates (including intermediates, if any).", - Type: []string{"string"}, - Format: "", - }, - }, - "clientKeyData": { - SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded private key for the above certificate.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_117_apis_pinniped_v1alpha1_CredentialRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestList is a list of CredentialRequest objects.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequest"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_117_apis_pinniped_v1alpha1_CredentialRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of credential.", - Type: []string{"string"}, - Format: "", - }, - }, - "token": { - SchemaProps: spec.SchemaProps{ - Description: "Token credential (when Type == TokenCredentialType).", - Ref: ref("go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestTokenCredential"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestTokenCredential"}, - } -} - -func schema_117_apis_pinniped_v1alpha1_CredentialRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "credential": { - SchemaProps: spec.SchemaProps{ - Description: "A Credential will be returned for a successful credential request.", - Ref: ref("go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestCredential"), - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "An error message will be returned for an unsuccessful credential request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.17/apis/pinniped/v1alpha1.CredentialRequestCredential"}, - } -} - -func schema_117_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value of the bearer token supplied with the credential request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/generated/1.18/README.adoc b/generated/1.18/README.adoc index de274707..22cfe325 100644 --- a/generated/1.18/README.adoc +++ b/generated/1.18/README.adoc @@ -8,7 +8,6 @@ - xref:{anchor_prefix}-config-pinniped-dev-v1alpha1[$$config.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-pinniped-dev-v1alpha1[$$idp.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-pinniped-dev-v1alpha1[$$login.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-pinniped-dev-v1alpha1[$$pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-config-pinniped-dev-v1alpha1"] @@ -285,106 +284,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-pinniped-dev-v1alpha1"] -=== pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped aggregated API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequest"] -==== CredentialRequest - -CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequestlist[$$CredentialRequestList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequestspec[$$CredentialRequestSpec$$]__ | -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequeststatus[$$CredentialRequestStatus$$]__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequestcredential"] -==== CredentialRequestCredential - -CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequeststatus[$$CredentialRequestStatus$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`expirationTimestamp`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta[$$Time$$]__ | ExpirationTimestamp indicates a time when the provided credentials expire. -| *`token`* __string__ | Token is a bearer token used by the client for request authentication. -| *`clientCertificateData`* __string__ | PEM-encoded client TLS certificates (including intermediates, if any). -| *`clientKeyData`* __string__ | PEM-encoded private key for the above certificate. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequestspec"] -==== CredentialRequestSpec - -CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequest[$$CredentialRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`type`* __CredentialType__ | Type of credential. -| *`token`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequesttokencredential[$$CredentialRequestTokenCredential$$]__ | Token credential (when Type == TokenCredentialType). -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequeststatus"] -==== CredentialRequestStatus - -CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequest[$$CredentialRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`credential`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequestcredential[$$CredentialRequestCredential$$]__ | A Credential will be returned for a successful credential request. -| *`message`* __string__ | An error message will be returned for an unsuccessful credential request. -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequesttokencredential"] -==== CredentialRequestTokenCredential - -CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-pinniped-v1alpha1-credentialrequestspec[$$CredentialRequestSpec$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`value`* __string__ | Value of the bearer token supplied with the credential request. -|=== - - diff --git a/generated/1.18/apis/pinniped/doc.go b/generated/1.18/apis/pinniped/doc.go deleted file mode 100644 index fea6e743..00000000 --- a/generated/1.18/apis/pinniped/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=pinniped.dev - -// Package pinniped is the internal version of the Pinniped aggregated API. -package pinniped diff --git a/generated/1.18/apis/pinniped/register.go b/generated/1.18/apis/pinniped/register.go deleted file mode 100644 index 73e69e17..00000000 --- a/generated/1.18/apis/pinniped/register.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package pinniped - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind. -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CredentialRequest{}, - &CredentialRequestList{}, - ) - return nil -} diff --git a/generated/1.18/apis/pinniped/types.go b/generated/1.18/apis/pinniped/types.go deleted file mode 100644 index 8f46e2a4..00000000 --- a/generated/1.18/apis/pinniped/types.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package pinniped - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type CredentialType string - -const ( - TokenCredentialType = CredentialType("token") -) - -type CredentialRequestTokenCredential struct { - // Value of the bearer token supplied with the credential request. - Value string -} - -type CredentialRequestSpec struct { - // Type of credential. - Type CredentialType - - // Token credential (when Type == TokenCredentialType). - Token *CredentialRequestTokenCredential -} - -type CredentialRequestCredential struct { - // ExpirationTimestamp indicates a time when the provided credentials expire. - ExpirationTimestamp metav1.Time - - // Token is a bearer token used by the client for request authentication. - Token string - - // PEM-encoded client TLS certificates (including intermediates, if any). - ClientCertificateData string - - // PEM-encoded private key for the above certificate. - ClientKeyData string -} - -type CredentialRequestStatus struct { - // A Credential will be returned for a successful credential request. - // +optional - Credential *CredentialRequestCredential - - // An error message will be returned for an unsuccessful credential request. - // +optional - Message *string -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type CredentialRequest struct { - metav1.TypeMeta - metav1.ObjectMeta - - Spec CredentialRequestSpec - Status CredentialRequestStatus -} - -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CredentialRequestList is a list of CredentialRequest objects. -type CredentialRequestList struct { - metav1.TypeMeta - metav1.ListMeta - - // Items is a list of CredentialRequests - Items []CredentialRequest -} diff --git a/generated/1.18/apis/pinniped/v1alpha1/conversion.go b/generated/1.18/apis/pinniped/v1alpha1/conversion.go deleted file mode 100644 index 226f6135..00000000 --- a/generated/1.18/apis/pinniped/v1alpha1/conversion.go +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 diff --git a/generated/1.18/apis/pinniped/v1alpha1/defaults.go b/generated/1.18/apis/pinniped/v1alpha1/defaults.go deleted file mode 100644 index 830aa010..00000000 --- a/generated/1.18/apis/pinniped/v1alpha1/defaults.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/generated/1.18/apis/pinniped/v1alpha1/doc.go b/generated/1.18/apis/pinniped/v1alpha1/doc.go deleted file mode 100644 index 1407a637..00000000 --- a/generated/1.18/apis/pinniped/v1alpha1/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.18/apis/pinniped -// +k8s:defaulter-gen=TypeMeta -// +groupName=pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped aggregated API. -package v1alpha1 diff --git a/generated/1.18/apis/pinniped/v1alpha1/register.go b/generated/1.18/apis/pinniped/v1alpha1/register.go deleted file mode 100644 index 04a72c6f..00000000 --- a/generated/1.18/apis/pinniped/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CredentialRequest{}, - &CredentialRequestList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.18/apis/pinniped/v1alpha1/types.go b/generated/1.18/apis/pinniped/v1alpha1/types.go deleted file mode 100644 index ac077576..00000000 --- a/generated/1.18/apis/pinniped/v1alpha1/types.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type CredentialType string - -const ( - TokenCredentialType = CredentialType("token") -) - -// CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider. -type CredentialRequestTokenCredential struct { - // Value of the bearer token supplied with the credential request. - Value string `json:"value,omitempty"` -} - -// CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API -type CredentialRequestSpec struct { - // Type of credential. - Type CredentialType `json:"type,omitempty"` - - // Token credential (when Type == TokenCredentialType). - Token *CredentialRequestTokenCredential `json:"token,omitempty"` -} - -// CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It -// contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster. -type CredentialRequestCredential struct { - // ExpirationTimestamp indicates a time when the provided credentials expire. - ExpirationTimestamp metav1.Time `json:"expirationTimestamp,omitempty"` - - // Token is a bearer token used by the client for request authentication. - Token string `json:"token,omitempty"` - - // PEM-encoded client TLS certificates (including intermediates, if any). - ClientCertificateData string `json:"clientCertificateData,omitempty"` - - // PEM-encoded private key for the above certificate. - ClientKeyData string `json:"clientKeyData,omitempty"` -} - -// CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API. -type CredentialRequestStatus struct { - // A Credential will be returned for a successful credential request. - // +optional - Credential *CredentialRequestCredential `json:"credential,omitempty"` - - // An error message will be returned for an unsuccessful credential request. - // +optional - Message *string `json:"message,omitempty"` -} - -// CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential. -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type CredentialRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec CredentialRequestSpec `json:"spec,omitempty"` - Status CredentialRequestStatus `json:"status,omitempty"` -} - - -// CredentialRequestList is a list of CredentialRequest objects. -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type CredentialRequestList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - - Items []CredentialRequest `json:"items"` -} diff --git a/generated/1.18/apis/pinniped/v1alpha1/zz_generated.conversion.go b/generated/1.18/apis/pinniped/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index c5d4717b..00000000 --- a/generated/1.18/apis/pinniped/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,230 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - pinniped "go.pinniped.dev/generated/1.18/apis/pinniped" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CredentialRequest)(nil), (*pinniped.CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(a.(*CredentialRequest), b.(*pinniped.CredentialRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequest)(nil), (*CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(a.(*pinniped.CredentialRequest), b.(*CredentialRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestCredential)(nil), (*pinniped.CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(a.(*CredentialRequestCredential), b.(*pinniped.CredentialRequestCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestCredential)(nil), (*CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(a.(*pinniped.CredentialRequestCredential), b.(*CredentialRequestCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestList)(nil), (*pinniped.CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(a.(*CredentialRequestList), b.(*pinniped.CredentialRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestList)(nil), (*CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(a.(*pinniped.CredentialRequestList), b.(*CredentialRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestSpec)(nil), (*pinniped.CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(a.(*CredentialRequestSpec), b.(*pinniped.CredentialRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestSpec)(nil), (*CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(a.(*pinniped.CredentialRequestSpec), b.(*CredentialRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestStatus)(nil), (*pinniped.CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(a.(*CredentialRequestStatus), b.(*pinniped.CredentialRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestStatus)(nil), (*CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(a.(*pinniped.CredentialRequestStatus), b.(*CredentialRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestTokenCredential)(nil), (*pinniped.CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(a.(*CredentialRequestTokenCredential), b.(*pinniped.CredentialRequestTokenCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestTokenCredential)(nil), (*CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(a.(*pinniped.CredentialRequestTokenCredential), b.(*CredentialRequestTokenCredential), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in *CredentialRequest, out *pinniped.CredentialRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in *CredentialRequest, out *pinniped.CredentialRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in, out, s) -} - -func autoConvert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in *pinniped.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest is an autogenerated conversion function. -func Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in *pinniped.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in *CredentialRequestCredential, out *pinniped.CredentialRequestCredential, s conversion.Scope) error { - out.ExpirationTimestamp = in.ExpirationTimestamp - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in *CredentialRequestCredential, out *pinniped.CredentialRequestCredential, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *pinniped.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { - out.ExpirationTimestamp = in.ExpirationTimestamp - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *pinniped.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in *CredentialRequestList, out *pinniped.CredentialRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]pinniped.CredentialRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in *CredentialRequestList, out *pinniped.CredentialRequestList, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *pinniped.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]CredentialRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *pinniped.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in *CredentialRequestSpec, out *pinniped.CredentialRequestSpec, s conversion.Scope) error { - out.Type = pinniped.CredentialType(in.Type) - out.Token = (*pinniped.CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) - return nil -} - -// Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in *CredentialRequestSpec, out *pinniped.CredentialRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *pinniped.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { - out.Type = CredentialType(in.Type) - out.Token = (*CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) - return nil -} - -// Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *pinniped.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in *CredentialRequestStatus, out *pinniped.CredentialRequestStatus, s conversion.Scope) error { - out.Credential = (*pinniped.CredentialRequestCredential)(unsafe.Pointer(in.Credential)) - out.Message = (*string)(unsafe.Pointer(in.Message)) - return nil -} - -// Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in *CredentialRequestStatus, out *pinniped.CredentialRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *pinniped.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { - out.Credential = (*CredentialRequestCredential)(unsafe.Pointer(in.Credential)) - out.Message = (*string)(unsafe.Pointer(in.Message)) - return nil -} - -// Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *pinniped.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *pinniped.CredentialRequestTokenCredential, s conversion.Scope) error { - out.Value = in.Value - return nil -} - -// Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *pinniped.CredentialRequestTokenCredential, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *pinniped.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { - out.Value = in.Value - return nil -} - -// Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *pinniped.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in, out, s) -} diff --git a/generated/1.18/apis/pinniped/v1alpha1/zz_generated.deepcopy.go b/generated/1.18/apis/pinniped/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index c44aa5a5..00000000 --- a/generated/1.18/apis/pinniped/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,153 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequest) DeepCopyInto(out *CredentialRequest) { - *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 CredentialRequest. -func (in *CredentialRequest) DeepCopy() *CredentialRequest { - if in == nil { - return nil - } - out := new(CredentialRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestCredential) DeepCopyInto(out *CredentialRequestCredential) { - *out = *in - in.ExpirationTimestamp.DeepCopyInto(&out.ExpirationTimestamp) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestCredential. -func (in *CredentialRequestCredential) DeepCopy() *CredentialRequestCredential { - if in == nil { - return nil - } - out := new(CredentialRequestCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestList) DeepCopyInto(out *CredentialRequestList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CredentialRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestList. -func (in *CredentialRequestList) DeepCopy() *CredentialRequestList { - if in == nil { - return nil - } - out := new(CredentialRequestList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequestList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestSpec) DeepCopyInto(out *CredentialRequestSpec) { - *out = *in - if in.Token != nil { - in, out := &in.Token, &out.Token - *out = new(CredentialRequestTokenCredential) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestSpec. -func (in *CredentialRequestSpec) DeepCopy() *CredentialRequestSpec { - if in == nil { - return nil - } - out := new(CredentialRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestStatus) DeepCopyInto(out *CredentialRequestStatus) { - *out = *in - if in.Credential != nil { - in, out := &in.Credential, &out.Credential - *out = new(CredentialRequestCredential) - (*in).DeepCopyInto(*out) - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestStatus. -func (in *CredentialRequestStatus) DeepCopy() *CredentialRequestStatus { - if in == nil { - return nil - } - out := new(CredentialRequestStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestTokenCredential) DeepCopyInto(out *CredentialRequestTokenCredential) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestTokenCredential. -func (in *CredentialRequestTokenCredential) DeepCopy() *CredentialRequestTokenCredential { - if in == nil { - return nil - } - out := new(CredentialRequestTokenCredential) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.18/apis/pinniped/v1alpha1/zz_generated.defaults.go b/generated/1.18/apis/pinniped/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index 427b2e2e..00000000 --- a/generated/1.18/apis/pinniped/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/generated/1.18/apis/pinniped/zz_generated.deepcopy.go b/generated/1.18/apis/pinniped/zz_generated.deepcopy.go deleted file mode 100644 index 29f35918..00000000 --- a/generated/1.18/apis/pinniped/zz_generated.deepcopy.go +++ /dev/null @@ -1,153 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package pinniped - -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 *CredentialRequest) DeepCopyInto(out *CredentialRequest) { - *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 CredentialRequest. -func (in *CredentialRequest) DeepCopy() *CredentialRequest { - if in == nil { - return nil - } - out := new(CredentialRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestCredential) DeepCopyInto(out *CredentialRequestCredential) { - *out = *in - in.ExpirationTimestamp.DeepCopyInto(&out.ExpirationTimestamp) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestCredential. -func (in *CredentialRequestCredential) DeepCopy() *CredentialRequestCredential { - if in == nil { - return nil - } - out := new(CredentialRequestCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestList) DeepCopyInto(out *CredentialRequestList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CredentialRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestList. -func (in *CredentialRequestList) DeepCopy() *CredentialRequestList { - if in == nil { - return nil - } - out := new(CredentialRequestList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequestList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestSpec) DeepCopyInto(out *CredentialRequestSpec) { - *out = *in - if in.Token != nil { - in, out := &in.Token, &out.Token - *out = new(CredentialRequestTokenCredential) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestSpec. -func (in *CredentialRequestSpec) DeepCopy() *CredentialRequestSpec { - if in == nil { - return nil - } - out := new(CredentialRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestStatus) DeepCopyInto(out *CredentialRequestStatus) { - *out = *in - if in.Credential != nil { - in, out := &in.Credential, &out.Credential - *out = new(CredentialRequestCredential) - (*in).DeepCopyInto(*out) - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestStatus. -func (in *CredentialRequestStatus) DeepCopy() *CredentialRequestStatus { - if in == nil { - return nil - } - out := new(CredentialRequestStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestTokenCredential) DeepCopyInto(out *CredentialRequestTokenCredential) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestTokenCredential. -func (in *CredentialRequestTokenCredential) DeepCopy() *CredentialRequestTokenCredential { - if in == nil { - return nil - } - out := new(CredentialRequestTokenCredential) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.18/client/clientset/versioned/clientset.go b/generated/1.18/client/clientset/versioned/clientset.go index f660a259..fcd663cd 100644 --- a/generated/1.18/client/clientset/versioned/clientset.go +++ b/generated/1.18/client/clientset/versioned/clientset.go @@ -11,7 +11,6 @@ import ( configv1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -22,17 +21,15 @@ type Interface interface { ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface LoginV1alpha1() loginv1alpha1.LoginV1alpha1Interface - PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - loginV1alpha1 *loginv1alpha1.LoginV1alpha1Client - pinnipedV1alpha1 *pinnipedv1alpha1.PinnipedV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client + loginV1alpha1 *loginv1alpha1.LoginV1alpha1Client } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -50,11 +47,6 @@ func (c *Clientset) LoginV1alpha1() loginv1alpha1.LoginV1alpha1Interface { return c.loginV1alpha1 } -// PinnipedV1alpha1 retrieves the PinnipedV1alpha1Client -func (c *Clientset) PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface { - return c.pinnipedV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -88,10 +80,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.pinnipedV1alpha1, err = pinnipedv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -107,7 +95,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.configV1alpha1 = configv1alpha1.NewForConfigOrDie(c) cs.iDPV1alpha1 = idpv1alpha1.NewForConfigOrDie(c) cs.loginV1alpha1 = loginv1alpha1.NewForConfigOrDie(c) - cs.pinnipedV1alpha1 = pinnipedv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -119,7 +106,6 @@ func New(c rest.Interface) *Clientset { cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) cs.loginV1alpha1 = loginv1alpha1.New(c) - cs.pinnipedV1alpha1 = pinnipedv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.18/client/clientset/versioned/fake/clientset_generated.go b/generated/1.18/client/clientset/versioned/fake/clientset_generated.go index 44791acc..00b7ab1c 100644 --- a/generated/1.18/client/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.18/client/clientset/versioned/fake/clientset_generated.go @@ -13,8 +13,6 @@ import ( fakeidpv1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/idp/v1alpha1/fake" loginv1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/login/v1alpha1" fakeloginv1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/login/v1alpha1/fake" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1" - fakepinnipedv1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -83,8 +81,3 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { func (c *Clientset) LoginV1alpha1() loginv1alpha1.LoginV1alpha1Interface { return &fakeloginv1alpha1.FakeLoginV1alpha1{Fake: &c.Fake} } - -// PinnipedV1alpha1 retrieves the PinnipedV1alpha1Client -func (c *Clientset) PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface { - return &fakepinnipedv1alpha1.FakePinnipedV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.18/client/clientset/versioned/fake/register.go b/generated/1.18/client/clientset/versioned/fake/register.go index 04aa23c0..d92ba36c 100644 --- a/generated/1.18/client/clientset/versioned/fake/register.go +++ b/generated/1.18/client/clientset/versioned/fake/register.go @@ -9,7 +9,6 @@ import ( configv1alpha1 "go.pinniped.dev/generated/1.18/apis/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.18/apis/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.18/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -24,7 +23,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, loginv1alpha1.AddToScheme, - pinnipedv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.18/client/clientset/versioned/scheme/register.go b/generated/1.18/client/clientset/versioned/scheme/register.go index 52af8eaf..fcc05088 100644 --- a/generated/1.18/client/clientset/versioned/scheme/register.go +++ b/generated/1.18/client/clientset/versioned/scheme/register.go @@ -9,7 +9,6 @@ import ( configv1alpha1 "go.pinniped.dev/generated/1.18/apis/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.18/apis/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.18/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -24,7 +23,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, loginv1alpha1.AddToScheme, - pinnipedv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go b/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go deleted file mode 100644 index 68954944..00000000 --- a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1" - scheme "go.pinniped.dev/generated/1.18/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" -) - -// CredentialRequestsGetter has a method to return a CredentialRequestInterface. -// A group's client should implement this interface. -type CredentialRequestsGetter interface { - CredentialRequests() CredentialRequestInterface -} - -// CredentialRequestInterface has methods to work with CredentialRequest resources. -type CredentialRequestInterface interface { - Create(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.CreateOptions) (*v1alpha1.CredentialRequest, error) - Update(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (*v1alpha1.CredentialRequest, error) - UpdateStatus(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (*v1alpha1.CredentialRequest, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CredentialRequest, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CredentialRequestList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CredentialRequest, err error) - CredentialRequestExpansion -} - -// credentialRequests implements CredentialRequestInterface -type credentialRequests struct { - client rest.Interface -} - -// newCredentialRequests returns a CredentialRequests -func newCredentialRequests(c *PinnipedV1alpha1Client) *credentialRequests { - return &credentialRequests{ - client: c.RESTClient(), - } -} - -// Get takes name of the credentialRequest, and returns the corresponding credentialRequest object, and an error if there is any. -func (c *credentialRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Get(). - Resource("credentialrequests"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CredentialRequests that match those selectors. -func (c *credentialRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CredentialRequestList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.CredentialRequestList{} - err = c.client.Get(). - Resource("credentialrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested credentialRequests. -func (c *credentialRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("credentialrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a credentialRequest and creates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *credentialRequests) Create(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.CreateOptions) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Post(). - Resource("credentialrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(credentialRequest). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a credentialRequest and updates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *credentialRequests) Update(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Put(). - Resource("credentialrequests"). - Name(credentialRequest.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(credentialRequest). - 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 *credentialRequests) UpdateStatus(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Put(). - Resource("credentialrequests"). - Name(credentialRequest.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(credentialRequest). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the credentialRequest and deletes it. Returns an error if one occurs. -func (c *credentialRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("credentialrequests"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *credentialRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("credentialrequests"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched credentialRequest. -func (c *credentialRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Patch(pt). - Resource("credentialrequests"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/doc.go b/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/doc.go deleted file mode 100644 index f75bf91f..00000000 --- a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go b/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go deleted file mode 100644 index 7879170d..00000000 --- a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go b/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go deleted file mode 100644 index 0c27a80b..00000000 --- a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCredentialRequests implements CredentialRequestInterface -type FakeCredentialRequests struct { - Fake *FakePinnipedV1alpha1 -} - -var credentialrequestsResource = schema.GroupVersionResource{Group: "pinniped.dev", Version: "v1alpha1", Resource: "credentialrequests"} - -var credentialrequestsKind = schema.GroupVersionKind{Group: "pinniped.dev", Version: "v1alpha1", Kind: "CredentialRequest"} - -// Get takes name of the credentialRequest, and returns the corresponding credentialRequest object, and an error if there is any. -func (c *FakeCredentialRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(credentialrequestsResource, name), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} - -// List takes label and field selectors, and returns the list of CredentialRequests that match those selectors. -func (c *FakeCredentialRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CredentialRequestList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(credentialrequestsResource, credentialrequestsKind, opts), &v1alpha1.CredentialRequestList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.CredentialRequestList{ListMeta: obj.(*v1alpha1.CredentialRequestList).ListMeta} - for _, item := range obj.(*v1alpha1.CredentialRequestList).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 credentialRequests. -func (c *FakeCredentialRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(credentialrequestsResource, opts)) -} - -// Create takes the representation of a credentialRequest and creates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *FakeCredentialRequests) Create(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.CreateOptions) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(credentialrequestsResource, credentialRequest), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} - -// Update takes the representation of a credentialRequest and updates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *FakeCredentialRequests) Update(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(credentialrequestsResource, credentialRequest), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), 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 *FakeCredentialRequests) UpdateStatus(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (*v1alpha1.CredentialRequest, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(credentialrequestsResource, "status", credentialRequest), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} - -// Delete takes name of the credentialRequest and deletes it. Returns an error if one occurs. -func (c *FakeCredentialRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(credentialrequestsResource, name), &v1alpha1.CredentialRequest{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCredentialRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(credentialrequestsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.CredentialRequestList{}) - return err -} - -// Patch applies the patch and returns the patched credentialRequest. -func (c *FakeCredentialRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(credentialrequestsResource, name, pt, data, subresources...), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} diff --git a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_pinniped_client.go b/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_pinniped_client.go deleted file mode 100644 index 5552d08d..00000000 --- a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_pinniped_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakePinnipedV1alpha1 struct { - *testing.Fake -} - -func (c *FakePinnipedV1alpha1) CredentialRequests() v1alpha1.CredentialRequestInterface { - return &FakeCredentialRequests{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakePinnipedV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go b/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go deleted file mode 100644 index d6596a32..00000000 --- a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type CredentialRequestExpansion interface{} diff --git a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go b/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go deleted file mode 100644 index af7680c1..00000000 --- a/generated/1.18/client/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1" - "go.pinniped.dev/generated/1.18/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type PinnipedV1alpha1Interface interface { - RESTClient() rest.Interface - CredentialRequestsGetter -} - -// PinnipedV1alpha1Client is used to interact with features provided by the pinniped.dev group. -type PinnipedV1alpha1Client struct { - restClient rest.Interface -} - -func (c *PinnipedV1alpha1Client) CredentialRequests() CredentialRequestInterface { - return newCredentialRequests(c) -} - -// NewForConfig creates a new PinnipedV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*PinnipedV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &PinnipedV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new PinnipedV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PinnipedV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new PinnipedV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *PinnipedV1alpha1Client { - return &PinnipedV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *PinnipedV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.18/client/informers/externalversions/factory.go b/generated/1.18/client/informers/externalversions/factory.go index 03b54691..f3793b09 100644 --- a/generated/1.18/client/informers/externalversions/factory.go +++ b/generated/1.18/client/informers/externalversions/factory.go @@ -15,7 +15,6 @@ import ( idp "go.pinniped.dev/generated/1.18/client/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.18/client/informers/externalversions/internalinterfaces" login "go.pinniped.dev/generated/1.18/client/informers/externalversions/login" - pinniped "go.pinniped.dev/generated/1.18/client/informers/externalversions/pinniped" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -165,7 +164,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface Login() login.Interface - Pinniped() pinniped.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -179,7 +177,3 @@ func (f *sharedInformerFactory) IDP() idp.Interface { func (f *sharedInformerFactory) Login() login.Interface { return login.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Pinniped() pinniped.Interface { - return pinniped.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.18/client/informers/externalversions/generic.go b/generated/1.18/client/informers/externalversions/generic.go index 711e2068..bba1a47a 100644 --- a/generated/1.18/client/informers/externalversions/generic.go +++ b/generated/1.18/client/informers/externalversions/generic.go @@ -11,7 +11,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.18/apis/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.18/apis/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.18/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -54,10 +53,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case loginv1alpha1.SchemeGroupVersion.WithResource("tokencredentialrequests"): return &genericInformer{resource: resource.GroupResource(), informer: f.Login().V1alpha1().TokenCredentialRequests().Informer()}, nil - // Group=pinniped.dev, Version=v1alpha1 - case pinnipedv1alpha1.SchemeGroupVersion.WithResource("credentialrequests"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Pinniped().V1alpha1().CredentialRequests().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.18/client/informers/externalversions/pinniped/interface.go b/generated/1.18/client/informers/externalversions/pinniped/interface.go deleted file mode 100644 index 18bd79c3..00000000 --- a/generated/1.18/client/informers/externalversions/pinniped/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package pinniped - -import ( - internalinterfaces "go.pinniped.dev/generated/1.18/client/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.18/client/informers/externalversions/pinniped/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.18/client/informers/externalversions/pinniped/v1alpha1/credentialrequest.go b/generated/1.18/client/informers/externalversions/pinniped/v1alpha1/credentialrequest.go deleted file mode 100644 index c63727fa..00000000 --- a/generated/1.18/client/informers/externalversions/pinniped/v1alpha1/credentialrequest.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - time "time" - - pinnipedv1alpha1 "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1" - versioned "go.pinniped.dev/generated/1.18/client/clientset/versioned" - internalinterfaces "go.pinniped.dev/generated/1.18/client/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.18/client/listers/pinniped/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// CredentialRequestInformer provides access to a shared informer and lister for -// CredentialRequests. -type CredentialRequestInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.CredentialRequestLister -} - -type credentialRequestInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewCredentialRequestInformer constructs a new informer for CredentialRequest type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewCredentialRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredCredentialRequestInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredCredentialRequestInformer constructs a new informer for CredentialRequest type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredCredentialRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.PinnipedV1alpha1().CredentialRequests().List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.PinnipedV1alpha1().CredentialRequests().Watch(context.TODO(), options) - }, - }, - &pinnipedv1alpha1.CredentialRequest{}, - resyncPeriod, - indexers, - ) -} - -func (f *credentialRequestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredCredentialRequestInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *credentialRequestInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&pinnipedv1alpha1.CredentialRequest{}, f.defaultInformer) -} - -func (f *credentialRequestInformer) Lister() v1alpha1.CredentialRequestLister { - return v1alpha1.NewCredentialRequestLister(f.Informer().GetIndexer()) -} diff --git a/generated/1.18/client/informers/externalversions/pinniped/v1alpha1/interface.go b/generated/1.18/client/informers/externalversions/pinniped/v1alpha1/interface.go deleted file mode 100644 index e2a2158d..00000000 --- a/generated/1.18/client/informers/externalversions/pinniped/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.18/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // CredentialRequests returns a CredentialRequestInformer. - CredentialRequests() CredentialRequestInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// CredentialRequests returns a CredentialRequestInformer. -func (v *version) CredentialRequests() CredentialRequestInformer { - return &credentialRequestInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.18/client/listers/pinniped/v1alpha1/credentialrequest.go b/generated/1.18/client/listers/pinniped/v1alpha1/credentialrequest.go deleted file mode 100644 index aba3ed81..00000000 --- a/generated/1.18/client/listers/pinniped/v1alpha1/credentialrequest.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// CredentialRequestLister helps list CredentialRequests. -type CredentialRequestLister interface { - // List lists all CredentialRequests in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.CredentialRequest, err error) - // Get retrieves the CredentialRequest from the index for a given name. - Get(name string) (*v1alpha1.CredentialRequest, error) - CredentialRequestListerExpansion -} - -// credentialRequestLister implements the CredentialRequestLister interface. -type credentialRequestLister struct { - indexer cache.Indexer -} - -// NewCredentialRequestLister returns a new CredentialRequestLister. -func NewCredentialRequestLister(indexer cache.Indexer) CredentialRequestLister { - return &credentialRequestLister{indexer: indexer} -} - -// List lists all CredentialRequests in the indexer. -func (s *credentialRequestLister) List(selector labels.Selector) (ret []*v1alpha1.CredentialRequest, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.CredentialRequest)) - }) - return ret, err -} - -// Get retrieves the CredentialRequest from the index for a given name. -func (s *credentialRequestLister) Get(name string) (*v1alpha1.CredentialRequest, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("credentialrequest"), name) - } - return obj.(*v1alpha1.CredentialRequest), nil -} diff --git a/generated/1.18/client/listers/pinniped/v1alpha1/expansion_generated.go b/generated/1.18/client/listers/pinniped/v1alpha1/expansion_generated.go deleted file mode 100644 index e39b06ca..00000000 --- a/generated/1.18/client/listers/pinniped/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// CredentialRequestListerExpansion allows custom methods to be added to -// CredentialRequestLister. -type CredentialRequestListerExpansion interface{} diff --git a/generated/1.18/client/openapi/zz_generated.openapi.go b/generated/1.18/client/openapi/zz_generated.openapi.go index 6e67eb5f..1c15426f 100644 --- a/generated/1.18/client/openapi/zz_generated.openapi.go +++ b/generated/1.18/client/openapi/zz_generated.openapi.go @@ -33,12 +33,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "go.pinniped.dev/generated/1.18/apis/login/v1alpha1.TokenCredentialRequestList": schema_118_apis_login_v1alpha1_TokenCredentialRequestList(ref), "go.pinniped.dev/generated/1.18/apis/login/v1alpha1.TokenCredentialRequestSpec": schema_118_apis_login_v1alpha1_TokenCredentialRequestSpec(ref), "go.pinniped.dev/generated/1.18/apis/login/v1alpha1.TokenCredentialRequestStatus": schema_118_apis_login_v1alpha1_TokenCredentialRequestStatus(ref), - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequest": schema_118_apis_pinniped_v1alpha1_CredentialRequest(ref), - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestCredential": schema_118_apis_pinniped_v1alpha1_CredentialRequestCredential(ref), - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestList": schema_118_apis_pinniped_v1alpha1_CredentialRequestList(ref), - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestSpec": schema_118_apis_pinniped_v1alpha1_CredentialRequestSpec(ref), - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestStatus": schema_118_apis_pinniped_v1alpha1_CredentialRequestStatus(ref), - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestTokenCredential": schema_118_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), @@ -711,215 +705,6 @@ func schema_118_apis_login_v1alpha1_TokenCredentialRequestStatus(ref common.Refe } } -func schema_118_apis_pinniped_v1alpha1_CredentialRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Ref: ref("go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestSpec", "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_118_apis_pinniped_v1alpha1_CredentialRequestCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "expirationTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "token": { - SchemaProps: spec.SchemaProps{ - Description: "Token is a bearer token used by the client for request authentication.", - Type: []string{"string"}, - Format: "", - }, - }, - "clientCertificateData": { - SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded client TLS certificates (including intermediates, if any).", - Type: []string{"string"}, - Format: "", - }, - }, - "clientKeyData": { - SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded private key for the above certificate.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_118_apis_pinniped_v1alpha1_CredentialRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestList is a list of CredentialRequest objects.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequest"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_118_apis_pinniped_v1alpha1_CredentialRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of credential.", - Type: []string{"string"}, - Format: "", - }, - }, - "token": { - SchemaProps: spec.SchemaProps{ - Description: "Token credential (when Type == TokenCredentialType).", - Ref: ref("go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestTokenCredential"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestTokenCredential"}, - } -} - -func schema_118_apis_pinniped_v1alpha1_CredentialRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "credential": { - SchemaProps: spec.SchemaProps{ - Description: "A Credential will be returned for a successful credential request.", - Ref: ref("go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestCredential"), - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "An error message will be returned for an unsuccessful credential request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.18/apis/pinniped/v1alpha1.CredentialRequestCredential"}, - } -} - -func schema_118_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value of the bearer token supplied with the credential request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/generated/1.19/README.adoc b/generated/1.19/README.adoc index 5e709d46..cb788bdd 100644 --- a/generated/1.19/README.adoc +++ b/generated/1.19/README.adoc @@ -8,7 +8,6 @@ - xref:{anchor_prefix}-config-pinniped-dev-v1alpha1[$$config.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-pinniped-dev-v1alpha1[$$idp.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-pinniped-dev-v1alpha1[$$login.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-pinniped-dev-v1alpha1[$$pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-config-pinniped-dev-v1alpha1"] @@ -285,106 +284,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-pinniped-dev-v1alpha1"] -=== pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped aggregated API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequest"] -==== CredentialRequest - -CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequestlist[$$CredentialRequestList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequestspec[$$CredentialRequestSpec$$]__ | -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequeststatus[$$CredentialRequestStatus$$]__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequestcredential"] -==== CredentialRequestCredential - -CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequeststatus[$$CredentialRequestStatus$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`expirationTimestamp`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#time-v1-meta[$$Time$$]__ | ExpirationTimestamp indicates a time when the provided credentials expire. -| *`token`* __string__ | Token is a bearer token used by the client for request authentication. -| *`clientCertificateData`* __string__ | PEM-encoded client TLS certificates (including intermediates, if any). -| *`clientKeyData`* __string__ | PEM-encoded private key for the above certificate. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequestspec"] -==== CredentialRequestSpec - -CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequest[$$CredentialRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`type`* __CredentialType__ | Type of credential. -| *`token`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequesttokencredential[$$CredentialRequestTokenCredential$$]__ | Token credential (when Type == TokenCredentialType). -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequeststatus"] -==== CredentialRequestStatus - -CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequest[$$CredentialRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`credential`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequestcredential[$$CredentialRequestCredential$$]__ | A Credential will be returned for a successful credential request. -| *`message`* __string__ | An error message will be returned for an unsuccessful credential request. -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequesttokencredential"] -==== CredentialRequestTokenCredential - -CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-pinniped-v1alpha1-credentialrequestspec[$$CredentialRequestSpec$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`value`* __string__ | Value of the bearer token supplied with the credential request. -|=== - - diff --git a/generated/1.19/apis/pinniped/doc.go b/generated/1.19/apis/pinniped/doc.go deleted file mode 100644 index fea6e743..00000000 --- a/generated/1.19/apis/pinniped/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=pinniped.dev - -// Package pinniped is the internal version of the Pinniped aggregated API. -package pinniped diff --git a/generated/1.19/apis/pinniped/register.go b/generated/1.19/apis/pinniped/register.go deleted file mode 100644 index 73e69e17..00000000 --- a/generated/1.19/apis/pinniped/register.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package pinniped - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind. -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CredentialRequest{}, - &CredentialRequestList{}, - ) - return nil -} diff --git a/generated/1.19/apis/pinniped/types.go b/generated/1.19/apis/pinniped/types.go deleted file mode 100644 index 8f46e2a4..00000000 --- a/generated/1.19/apis/pinniped/types.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package pinniped - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type CredentialType string - -const ( - TokenCredentialType = CredentialType("token") -) - -type CredentialRequestTokenCredential struct { - // Value of the bearer token supplied with the credential request. - Value string -} - -type CredentialRequestSpec struct { - // Type of credential. - Type CredentialType - - // Token credential (when Type == TokenCredentialType). - Token *CredentialRequestTokenCredential -} - -type CredentialRequestCredential struct { - // ExpirationTimestamp indicates a time when the provided credentials expire. - ExpirationTimestamp metav1.Time - - // Token is a bearer token used by the client for request authentication. - Token string - - // PEM-encoded client TLS certificates (including intermediates, if any). - ClientCertificateData string - - // PEM-encoded private key for the above certificate. - ClientKeyData string -} - -type CredentialRequestStatus struct { - // A Credential will be returned for a successful credential request. - // +optional - Credential *CredentialRequestCredential - - // An error message will be returned for an unsuccessful credential request. - // +optional - Message *string -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type CredentialRequest struct { - metav1.TypeMeta - metav1.ObjectMeta - - Spec CredentialRequestSpec - Status CredentialRequestStatus -} - -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CredentialRequestList is a list of CredentialRequest objects. -type CredentialRequestList struct { - metav1.TypeMeta - metav1.ListMeta - - // Items is a list of CredentialRequests - Items []CredentialRequest -} diff --git a/generated/1.19/apis/pinniped/v1alpha1/conversion.go b/generated/1.19/apis/pinniped/v1alpha1/conversion.go deleted file mode 100644 index 226f6135..00000000 --- a/generated/1.19/apis/pinniped/v1alpha1/conversion.go +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 diff --git a/generated/1.19/apis/pinniped/v1alpha1/defaults.go b/generated/1.19/apis/pinniped/v1alpha1/defaults.go deleted file mode 100644 index 830aa010..00000000 --- a/generated/1.19/apis/pinniped/v1alpha1/defaults.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/generated/1.19/apis/pinniped/v1alpha1/doc.go b/generated/1.19/apis/pinniped/v1alpha1/doc.go deleted file mode 100644 index e867a010..00000000 --- a/generated/1.19/apis/pinniped/v1alpha1/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.19/apis/pinniped -// +k8s:defaulter-gen=TypeMeta -// +groupName=pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped aggregated API. -package v1alpha1 diff --git a/generated/1.19/apis/pinniped/v1alpha1/register.go b/generated/1.19/apis/pinniped/v1alpha1/register.go deleted file mode 100644 index 04a72c6f..00000000 --- a/generated/1.19/apis/pinniped/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CredentialRequest{}, - &CredentialRequestList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.19/apis/pinniped/v1alpha1/types.go b/generated/1.19/apis/pinniped/v1alpha1/types.go deleted file mode 100644 index ac077576..00000000 --- a/generated/1.19/apis/pinniped/v1alpha1/types.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type CredentialType string - -const ( - TokenCredentialType = CredentialType("token") -) - -// CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider. -type CredentialRequestTokenCredential struct { - // Value of the bearer token supplied with the credential request. - Value string `json:"value,omitempty"` -} - -// CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API -type CredentialRequestSpec struct { - // Type of credential. - Type CredentialType `json:"type,omitempty"` - - // Token credential (when Type == TokenCredentialType). - Token *CredentialRequestTokenCredential `json:"token,omitempty"` -} - -// CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It -// contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster. -type CredentialRequestCredential struct { - // ExpirationTimestamp indicates a time when the provided credentials expire. - ExpirationTimestamp metav1.Time `json:"expirationTimestamp,omitempty"` - - // Token is a bearer token used by the client for request authentication. - Token string `json:"token,omitempty"` - - // PEM-encoded client TLS certificates (including intermediates, if any). - ClientCertificateData string `json:"clientCertificateData,omitempty"` - - // PEM-encoded private key for the above certificate. - ClientKeyData string `json:"clientKeyData,omitempty"` -} - -// CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API. -type CredentialRequestStatus struct { - // A Credential will be returned for a successful credential request. - // +optional - Credential *CredentialRequestCredential `json:"credential,omitempty"` - - // An error message will be returned for an unsuccessful credential request. - // +optional - Message *string `json:"message,omitempty"` -} - -// CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential. -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type CredentialRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec CredentialRequestSpec `json:"spec,omitempty"` - Status CredentialRequestStatus `json:"status,omitempty"` -} - - -// CredentialRequestList is a list of CredentialRequest objects. -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type CredentialRequestList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - - Items []CredentialRequest `json:"items"` -} diff --git a/generated/1.19/apis/pinniped/v1alpha1/zz_generated.conversion.go b/generated/1.19/apis/pinniped/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index de4dc411..00000000 --- a/generated/1.19/apis/pinniped/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,230 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - pinniped "go.pinniped.dev/generated/1.19/apis/pinniped" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CredentialRequest)(nil), (*pinniped.CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(a.(*CredentialRequest), b.(*pinniped.CredentialRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequest)(nil), (*CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(a.(*pinniped.CredentialRequest), b.(*CredentialRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestCredential)(nil), (*pinniped.CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(a.(*CredentialRequestCredential), b.(*pinniped.CredentialRequestCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestCredential)(nil), (*CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(a.(*pinniped.CredentialRequestCredential), b.(*CredentialRequestCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestList)(nil), (*pinniped.CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(a.(*CredentialRequestList), b.(*pinniped.CredentialRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestList)(nil), (*CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(a.(*pinniped.CredentialRequestList), b.(*CredentialRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestSpec)(nil), (*pinniped.CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(a.(*CredentialRequestSpec), b.(*pinniped.CredentialRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestSpec)(nil), (*CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(a.(*pinniped.CredentialRequestSpec), b.(*CredentialRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestStatus)(nil), (*pinniped.CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(a.(*CredentialRequestStatus), b.(*pinniped.CredentialRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestStatus)(nil), (*CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(a.(*pinniped.CredentialRequestStatus), b.(*CredentialRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestTokenCredential)(nil), (*pinniped.CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(a.(*CredentialRequestTokenCredential), b.(*pinniped.CredentialRequestTokenCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestTokenCredential)(nil), (*CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(a.(*pinniped.CredentialRequestTokenCredential), b.(*CredentialRequestTokenCredential), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in *CredentialRequest, out *pinniped.CredentialRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in *CredentialRequest, out *pinniped.CredentialRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in, out, s) -} - -func autoConvert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in *pinniped.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest is an autogenerated conversion function. -func Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in *pinniped.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in *CredentialRequestCredential, out *pinniped.CredentialRequestCredential, s conversion.Scope) error { - out.ExpirationTimestamp = in.ExpirationTimestamp - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in *CredentialRequestCredential, out *pinniped.CredentialRequestCredential, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *pinniped.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { - out.ExpirationTimestamp = in.ExpirationTimestamp - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *pinniped.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in *CredentialRequestList, out *pinniped.CredentialRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]pinniped.CredentialRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in *CredentialRequestList, out *pinniped.CredentialRequestList, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *pinniped.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]CredentialRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *pinniped.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in *CredentialRequestSpec, out *pinniped.CredentialRequestSpec, s conversion.Scope) error { - out.Type = pinniped.CredentialType(in.Type) - out.Token = (*pinniped.CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) - return nil -} - -// Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in *CredentialRequestSpec, out *pinniped.CredentialRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *pinniped.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { - out.Type = CredentialType(in.Type) - out.Token = (*CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) - return nil -} - -// Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *pinniped.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in *CredentialRequestStatus, out *pinniped.CredentialRequestStatus, s conversion.Scope) error { - out.Credential = (*pinniped.CredentialRequestCredential)(unsafe.Pointer(in.Credential)) - out.Message = (*string)(unsafe.Pointer(in.Message)) - return nil -} - -// Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in *CredentialRequestStatus, out *pinniped.CredentialRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *pinniped.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { - out.Credential = (*CredentialRequestCredential)(unsafe.Pointer(in.Credential)) - out.Message = (*string)(unsafe.Pointer(in.Message)) - return nil -} - -// Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *pinniped.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *pinniped.CredentialRequestTokenCredential, s conversion.Scope) error { - out.Value = in.Value - return nil -} - -// Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *pinniped.CredentialRequestTokenCredential, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in, out, s) -} - -func autoConvert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *pinniped.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { - out.Value = in.Value - return nil -} - -// Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential is an autogenerated conversion function. -func Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *pinniped.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { - return autoConvert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in, out, s) -} diff --git a/generated/1.19/apis/pinniped/v1alpha1/zz_generated.deepcopy.go b/generated/1.19/apis/pinniped/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index c44aa5a5..00000000 --- a/generated/1.19/apis/pinniped/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,153 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequest) DeepCopyInto(out *CredentialRequest) { - *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 CredentialRequest. -func (in *CredentialRequest) DeepCopy() *CredentialRequest { - if in == nil { - return nil - } - out := new(CredentialRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestCredential) DeepCopyInto(out *CredentialRequestCredential) { - *out = *in - in.ExpirationTimestamp.DeepCopyInto(&out.ExpirationTimestamp) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestCredential. -func (in *CredentialRequestCredential) DeepCopy() *CredentialRequestCredential { - if in == nil { - return nil - } - out := new(CredentialRequestCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestList) DeepCopyInto(out *CredentialRequestList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CredentialRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestList. -func (in *CredentialRequestList) DeepCopy() *CredentialRequestList { - if in == nil { - return nil - } - out := new(CredentialRequestList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequestList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestSpec) DeepCopyInto(out *CredentialRequestSpec) { - *out = *in - if in.Token != nil { - in, out := &in.Token, &out.Token - *out = new(CredentialRequestTokenCredential) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestSpec. -func (in *CredentialRequestSpec) DeepCopy() *CredentialRequestSpec { - if in == nil { - return nil - } - out := new(CredentialRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestStatus) DeepCopyInto(out *CredentialRequestStatus) { - *out = *in - if in.Credential != nil { - in, out := &in.Credential, &out.Credential - *out = new(CredentialRequestCredential) - (*in).DeepCopyInto(*out) - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestStatus. -func (in *CredentialRequestStatus) DeepCopy() *CredentialRequestStatus { - if in == nil { - return nil - } - out := new(CredentialRequestStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestTokenCredential) DeepCopyInto(out *CredentialRequestTokenCredential) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestTokenCredential. -func (in *CredentialRequestTokenCredential) DeepCopy() *CredentialRequestTokenCredential { - if in == nil { - return nil - } - out := new(CredentialRequestTokenCredential) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.19/apis/pinniped/v1alpha1/zz_generated.defaults.go b/generated/1.19/apis/pinniped/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index 427b2e2e..00000000 --- a/generated/1.19/apis/pinniped/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/generated/1.19/apis/pinniped/zz_generated.deepcopy.go b/generated/1.19/apis/pinniped/zz_generated.deepcopy.go deleted file mode 100644 index 29f35918..00000000 --- a/generated/1.19/apis/pinniped/zz_generated.deepcopy.go +++ /dev/null @@ -1,153 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package pinniped - -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 *CredentialRequest) DeepCopyInto(out *CredentialRequest) { - *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 CredentialRequest. -func (in *CredentialRequest) DeepCopy() *CredentialRequest { - if in == nil { - return nil - } - out := new(CredentialRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestCredential) DeepCopyInto(out *CredentialRequestCredential) { - *out = *in - in.ExpirationTimestamp.DeepCopyInto(&out.ExpirationTimestamp) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestCredential. -func (in *CredentialRequestCredential) DeepCopy() *CredentialRequestCredential { - if in == nil { - return nil - } - out := new(CredentialRequestCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestList) DeepCopyInto(out *CredentialRequestList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CredentialRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestList. -func (in *CredentialRequestList) DeepCopy() *CredentialRequestList { - if in == nil { - return nil - } - out := new(CredentialRequestList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialRequestList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestSpec) DeepCopyInto(out *CredentialRequestSpec) { - *out = *in - if in.Token != nil { - in, out := &in.Token, &out.Token - *out = new(CredentialRequestTokenCredential) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestSpec. -func (in *CredentialRequestSpec) DeepCopy() *CredentialRequestSpec { - if in == nil { - return nil - } - out := new(CredentialRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestStatus) DeepCopyInto(out *CredentialRequestStatus) { - *out = *in - if in.Credential != nil { - in, out := &in.Credential, &out.Credential - *out = new(CredentialRequestCredential) - (*in).DeepCopyInto(*out) - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestStatus. -func (in *CredentialRequestStatus) DeepCopy() *CredentialRequestStatus { - if in == nil { - return nil - } - out := new(CredentialRequestStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialRequestTokenCredential) DeepCopyInto(out *CredentialRequestTokenCredential) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialRequestTokenCredential. -func (in *CredentialRequestTokenCredential) DeepCopy() *CredentialRequestTokenCredential { - if in == nil { - return nil - } - out := new(CredentialRequestTokenCredential) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.19/client/clientset/versioned/clientset.go b/generated/1.19/client/clientset/versioned/clientset.go index 2f04361d..29731075 100644 --- a/generated/1.19/client/clientset/versioned/clientset.go +++ b/generated/1.19/client/clientset/versioned/clientset.go @@ -11,7 +11,6 @@ import ( configv1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -22,17 +21,15 @@ type Interface interface { ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface LoginV1alpha1() loginv1alpha1.LoginV1alpha1Interface - PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - loginV1alpha1 *loginv1alpha1.LoginV1alpha1Client - pinnipedV1alpha1 *pinnipedv1alpha1.PinnipedV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client + loginV1alpha1 *loginv1alpha1.LoginV1alpha1Client } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -50,11 +47,6 @@ func (c *Clientset) LoginV1alpha1() loginv1alpha1.LoginV1alpha1Interface { return c.loginV1alpha1 } -// PinnipedV1alpha1 retrieves the PinnipedV1alpha1Client -func (c *Clientset) PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface { - return c.pinnipedV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -88,10 +80,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.pinnipedV1alpha1, err = pinnipedv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -107,7 +95,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.configV1alpha1 = configv1alpha1.NewForConfigOrDie(c) cs.iDPV1alpha1 = idpv1alpha1.NewForConfigOrDie(c) cs.loginV1alpha1 = loginv1alpha1.NewForConfigOrDie(c) - cs.pinnipedV1alpha1 = pinnipedv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -119,7 +106,6 @@ func New(c rest.Interface) *Clientset { cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) cs.loginV1alpha1 = loginv1alpha1.New(c) - cs.pinnipedV1alpha1 = pinnipedv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.19/client/clientset/versioned/fake/clientset_generated.go b/generated/1.19/client/clientset/versioned/fake/clientset_generated.go index 71ade6ca..627c9388 100644 --- a/generated/1.19/client/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.19/client/clientset/versioned/fake/clientset_generated.go @@ -13,8 +13,6 @@ import ( fakeidpv1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/idp/v1alpha1/fake" loginv1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/login/v1alpha1" fakeloginv1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/login/v1alpha1/fake" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1" - fakepinnipedv1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -83,8 +81,3 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { func (c *Clientset) LoginV1alpha1() loginv1alpha1.LoginV1alpha1Interface { return &fakeloginv1alpha1.FakeLoginV1alpha1{Fake: &c.Fake} } - -// PinnipedV1alpha1 retrieves the PinnipedV1alpha1Client -func (c *Clientset) PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface { - return &fakepinnipedv1alpha1.FakePinnipedV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.19/client/clientset/versioned/fake/register.go b/generated/1.19/client/clientset/versioned/fake/register.go index 5be4d655..fcb06408 100644 --- a/generated/1.19/client/clientset/versioned/fake/register.go +++ b/generated/1.19/client/clientset/versioned/fake/register.go @@ -9,7 +9,6 @@ import ( configv1alpha1 "go.pinniped.dev/generated/1.19/apis/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.19/apis/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -24,7 +23,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, loginv1alpha1.AddToScheme, - pinnipedv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.19/client/clientset/versioned/scheme/register.go b/generated/1.19/client/clientset/versioned/scheme/register.go index 47d2cf16..1c7c6a21 100644 --- a/generated/1.19/client/clientset/versioned/scheme/register.go +++ b/generated/1.19/client/clientset/versioned/scheme/register.go @@ -9,7 +9,6 @@ import ( configv1alpha1 "go.pinniped.dev/generated/1.19/apis/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.19/apis/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -24,7 +23,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, loginv1alpha1.AddToScheme, - pinnipedv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go b/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go deleted file mode 100644 index 673abb44..00000000 --- a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" - scheme "go.pinniped.dev/generated/1.19/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" -) - -// CredentialRequestsGetter has a method to return a CredentialRequestInterface. -// A group's client should implement this interface. -type CredentialRequestsGetter interface { - CredentialRequests() CredentialRequestInterface -} - -// CredentialRequestInterface has methods to work with CredentialRequest resources. -type CredentialRequestInterface interface { - Create(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.CreateOptions) (*v1alpha1.CredentialRequest, error) - Update(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (*v1alpha1.CredentialRequest, error) - UpdateStatus(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (*v1alpha1.CredentialRequest, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CredentialRequest, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CredentialRequestList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CredentialRequest, err error) - CredentialRequestExpansion -} - -// credentialRequests implements CredentialRequestInterface -type credentialRequests struct { - client rest.Interface -} - -// newCredentialRequests returns a CredentialRequests -func newCredentialRequests(c *PinnipedV1alpha1Client) *credentialRequests { - return &credentialRequests{ - client: c.RESTClient(), - } -} - -// Get takes name of the credentialRequest, and returns the corresponding credentialRequest object, and an error if there is any. -func (c *credentialRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Get(). - Resource("credentialrequests"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CredentialRequests that match those selectors. -func (c *credentialRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CredentialRequestList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.CredentialRequestList{} - err = c.client.Get(). - Resource("credentialrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested credentialRequests. -func (c *credentialRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("credentialrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a credentialRequest and creates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *credentialRequests) Create(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.CreateOptions) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Post(). - Resource("credentialrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(credentialRequest). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a credentialRequest and updates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *credentialRequests) Update(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Put(). - Resource("credentialrequests"). - Name(credentialRequest.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(credentialRequest). - 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 *credentialRequests) UpdateStatus(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Put(). - Resource("credentialrequests"). - Name(credentialRequest.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(credentialRequest). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the credentialRequest and deletes it. Returns an error if one occurs. -func (c *credentialRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("credentialrequests"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *credentialRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("credentialrequests"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched credentialRequest. -func (c *credentialRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CredentialRequest, err error) { - result = &v1alpha1.CredentialRequest{} - err = c.client.Patch(pt). - Resource("credentialrequests"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/doc.go b/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/doc.go deleted file mode 100644 index f75bf91f..00000000 --- a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go b/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go deleted file mode 100644 index 7879170d..00000000 --- a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go b/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go deleted file mode 100644 index a71f895e..00000000 --- a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCredentialRequests implements CredentialRequestInterface -type FakeCredentialRequests struct { - Fake *FakePinnipedV1alpha1 -} - -var credentialrequestsResource = schema.GroupVersionResource{Group: "pinniped.dev", Version: "v1alpha1", Resource: "credentialrequests"} - -var credentialrequestsKind = schema.GroupVersionKind{Group: "pinniped.dev", Version: "v1alpha1", Kind: "CredentialRequest"} - -// Get takes name of the credentialRequest, and returns the corresponding credentialRequest object, and an error if there is any. -func (c *FakeCredentialRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(credentialrequestsResource, name), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} - -// List takes label and field selectors, and returns the list of CredentialRequests that match those selectors. -func (c *FakeCredentialRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CredentialRequestList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(credentialrequestsResource, credentialrequestsKind, opts), &v1alpha1.CredentialRequestList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.CredentialRequestList{ListMeta: obj.(*v1alpha1.CredentialRequestList).ListMeta} - for _, item := range obj.(*v1alpha1.CredentialRequestList).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 credentialRequests. -func (c *FakeCredentialRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(credentialrequestsResource, opts)) -} - -// Create takes the representation of a credentialRequest and creates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *FakeCredentialRequests) Create(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.CreateOptions) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(credentialrequestsResource, credentialRequest), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} - -// Update takes the representation of a credentialRequest and updates it. Returns the server's representation of the credentialRequest, and an error, if there is any. -func (c *FakeCredentialRequests) Update(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(credentialrequestsResource, credentialRequest), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), 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 *FakeCredentialRequests) UpdateStatus(ctx context.Context, credentialRequest *v1alpha1.CredentialRequest, opts v1.UpdateOptions) (*v1alpha1.CredentialRequest, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(credentialrequestsResource, "status", credentialRequest), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} - -// Delete takes name of the credentialRequest and deletes it. Returns an error if one occurs. -func (c *FakeCredentialRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(credentialrequestsResource, name), &v1alpha1.CredentialRequest{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCredentialRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(credentialrequestsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.CredentialRequestList{}) - return err -} - -// Patch applies the patch and returns the patched credentialRequest. -func (c *FakeCredentialRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CredentialRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(credentialrequestsResource, name, pt, data, subresources...), &v1alpha1.CredentialRequest{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CredentialRequest), err -} diff --git a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_pinniped_client.go b/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_pinniped_client.go deleted file mode 100644 index d7086c7c..00000000 --- a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_pinniped_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakePinnipedV1alpha1 struct { - *testing.Fake -} - -func (c *FakePinnipedV1alpha1) CredentialRequests() v1alpha1.CredentialRequestInterface { - return &FakeCredentialRequests{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakePinnipedV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go b/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go deleted file mode 100644 index d6596a32..00000000 --- a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type CredentialRequestExpansion interface{} diff --git a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go b/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go deleted file mode 100644 index 0bc867d0..00000000 --- a/generated/1.19/client/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" - "go.pinniped.dev/generated/1.19/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type PinnipedV1alpha1Interface interface { - RESTClient() rest.Interface - CredentialRequestsGetter -} - -// PinnipedV1alpha1Client is used to interact with features provided by the pinniped.dev group. -type PinnipedV1alpha1Client struct { - restClient rest.Interface -} - -func (c *PinnipedV1alpha1Client) CredentialRequests() CredentialRequestInterface { - return newCredentialRequests(c) -} - -// NewForConfig creates a new PinnipedV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*PinnipedV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &PinnipedV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new PinnipedV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PinnipedV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new PinnipedV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *PinnipedV1alpha1Client { - return &PinnipedV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *PinnipedV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.19/client/informers/externalversions/factory.go b/generated/1.19/client/informers/externalversions/factory.go index d98a4b7f..5f503b85 100644 --- a/generated/1.19/client/informers/externalversions/factory.go +++ b/generated/1.19/client/informers/externalversions/factory.go @@ -15,7 +15,6 @@ import ( idp "go.pinniped.dev/generated/1.19/client/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.19/client/informers/externalversions/internalinterfaces" login "go.pinniped.dev/generated/1.19/client/informers/externalversions/login" - pinniped "go.pinniped.dev/generated/1.19/client/informers/externalversions/pinniped" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -165,7 +164,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface Login() login.Interface - Pinniped() pinniped.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -179,7 +177,3 @@ func (f *sharedInformerFactory) IDP() idp.Interface { func (f *sharedInformerFactory) Login() login.Interface { return login.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Pinniped() pinniped.Interface { - return pinniped.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.19/client/informers/externalversions/generic.go b/generated/1.19/client/informers/externalversions/generic.go index 13224b2d..6a761df3 100644 --- a/generated/1.19/client/informers/externalversions/generic.go +++ b/generated/1.19/client/informers/externalversions/generic.go @@ -11,7 +11,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.19/apis/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.19/apis/idp/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -54,10 +53,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case loginv1alpha1.SchemeGroupVersion.WithResource("tokencredentialrequests"): return &genericInformer{resource: resource.GroupResource(), informer: f.Login().V1alpha1().TokenCredentialRequests().Informer()}, nil - // Group=pinniped.dev, Version=v1alpha1 - case pinnipedv1alpha1.SchemeGroupVersion.WithResource("credentialrequests"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Pinniped().V1alpha1().CredentialRequests().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.19/client/informers/externalversions/pinniped/interface.go b/generated/1.19/client/informers/externalversions/pinniped/interface.go deleted file mode 100644 index e75c55b4..00000000 --- a/generated/1.19/client/informers/externalversions/pinniped/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package pinniped - -import ( - internalinterfaces "go.pinniped.dev/generated/1.19/client/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.19/client/informers/externalversions/pinniped/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.19/client/informers/externalversions/pinniped/v1alpha1/credentialrequest.go b/generated/1.19/client/informers/externalversions/pinniped/v1alpha1/credentialrequest.go deleted file mode 100644 index 3dc9f93c..00000000 --- a/generated/1.19/client/informers/externalversions/pinniped/v1alpha1/credentialrequest.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - time "time" - - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" - versioned "go.pinniped.dev/generated/1.19/client/clientset/versioned" - internalinterfaces "go.pinniped.dev/generated/1.19/client/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.19/client/listers/pinniped/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// CredentialRequestInformer provides access to a shared informer and lister for -// CredentialRequests. -type CredentialRequestInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.CredentialRequestLister -} - -type credentialRequestInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewCredentialRequestInformer constructs a new informer for CredentialRequest type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewCredentialRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredCredentialRequestInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredCredentialRequestInformer constructs a new informer for CredentialRequest type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredCredentialRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.PinnipedV1alpha1().CredentialRequests().List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.PinnipedV1alpha1().CredentialRequests().Watch(context.TODO(), options) - }, - }, - &pinnipedv1alpha1.CredentialRequest{}, - resyncPeriod, - indexers, - ) -} - -func (f *credentialRequestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredCredentialRequestInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *credentialRequestInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&pinnipedv1alpha1.CredentialRequest{}, f.defaultInformer) -} - -func (f *credentialRequestInformer) Lister() v1alpha1.CredentialRequestLister { - return v1alpha1.NewCredentialRequestLister(f.Informer().GetIndexer()) -} diff --git a/generated/1.19/client/informers/externalversions/pinniped/v1alpha1/interface.go b/generated/1.19/client/informers/externalversions/pinniped/v1alpha1/interface.go deleted file mode 100644 index c24273d6..00000000 --- a/generated/1.19/client/informers/externalversions/pinniped/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.19/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // CredentialRequests returns a CredentialRequestInformer. - CredentialRequests() CredentialRequestInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// CredentialRequests returns a CredentialRequestInformer. -func (v *version) CredentialRequests() CredentialRequestInformer { - return &credentialRequestInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.19/client/listers/pinniped/v1alpha1/credentialrequest.go b/generated/1.19/client/listers/pinniped/v1alpha1/credentialrequest.go deleted file mode 100644 index ffd5577d..00000000 --- a/generated/1.19/client/listers/pinniped/v1alpha1/credentialrequest.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// CredentialRequestLister helps list CredentialRequests. -// All objects returned here must be treated as read-only. -type CredentialRequestLister interface { - // List lists all CredentialRequests in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.CredentialRequest, err error) - // Get retrieves the CredentialRequest from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.CredentialRequest, error) - CredentialRequestListerExpansion -} - -// credentialRequestLister implements the CredentialRequestLister interface. -type credentialRequestLister struct { - indexer cache.Indexer -} - -// NewCredentialRequestLister returns a new CredentialRequestLister. -func NewCredentialRequestLister(indexer cache.Indexer) CredentialRequestLister { - return &credentialRequestLister{indexer: indexer} -} - -// List lists all CredentialRequests in the indexer. -func (s *credentialRequestLister) List(selector labels.Selector) (ret []*v1alpha1.CredentialRequest, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.CredentialRequest)) - }) - return ret, err -} - -// Get retrieves the CredentialRequest from the index for a given name. -func (s *credentialRequestLister) Get(name string) (*v1alpha1.CredentialRequest, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("credentialrequest"), name) - } - return obj.(*v1alpha1.CredentialRequest), nil -} diff --git a/generated/1.19/client/listers/pinniped/v1alpha1/expansion_generated.go b/generated/1.19/client/listers/pinniped/v1alpha1/expansion_generated.go deleted file mode 100644 index e39b06ca..00000000 --- a/generated/1.19/client/listers/pinniped/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// CredentialRequestListerExpansion allows custom methods to be added to -// CredentialRequestLister. -type CredentialRequestListerExpansion interface{} diff --git a/generated/1.19/client/openapi/zz_generated.openapi.go b/generated/1.19/client/openapi/zz_generated.openapi.go index 24e421b4..5a4cef84 100644 --- a/generated/1.19/client/openapi/zz_generated.openapi.go +++ b/generated/1.19/client/openapi/zz_generated.openapi.go @@ -33,12 +33,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "go.pinniped.dev/generated/1.19/apis/login/v1alpha1.TokenCredentialRequestList": schema_119_apis_login_v1alpha1_TokenCredentialRequestList(ref), "go.pinniped.dev/generated/1.19/apis/login/v1alpha1.TokenCredentialRequestSpec": schema_119_apis_login_v1alpha1_TokenCredentialRequestSpec(ref), "go.pinniped.dev/generated/1.19/apis/login/v1alpha1.TokenCredentialRequestStatus": schema_119_apis_login_v1alpha1_TokenCredentialRequestStatus(ref), - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequest": schema_119_apis_pinniped_v1alpha1_CredentialRequest(ref), - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestCredential": schema_119_apis_pinniped_v1alpha1_CredentialRequestCredential(ref), - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestList": schema_119_apis_pinniped_v1alpha1_CredentialRequestList(ref), - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestSpec": schema_119_apis_pinniped_v1alpha1_CredentialRequestSpec(ref), - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestStatus": schema_119_apis_pinniped_v1alpha1_CredentialRequestStatus(ref), - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestTokenCredential": schema_119_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), @@ -712,215 +706,6 @@ func schema_119_apis_login_v1alpha1_TokenCredentialRequestStatus(ref common.Refe } } -func schema_119_apis_pinniped_v1alpha1_CredentialRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequest submits an IDP-specific credential to Pinniped in exchange for a cluster-specific credential.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Ref: ref("go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestSpec", "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_119_apis_pinniped_v1alpha1_CredentialRequestCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestCredential is the cluster-specific credential returned on a successful CredentialRequest. It contains either a valid bearer token or a valid TLS certificate and corresponding private key for the cluster.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "expirationTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "token": { - SchemaProps: spec.SchemaProps{ - Description: "Token is a bearer token used by the client for request authentication.", - Type: []string{"string"}, - Format: "", - }, - }, - "clientCertificateData": { - SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded client TLS certificates (including intermediates, if any).", - Type: []string{"string"}, - Format: "", - }, - }, - "clientKeyData": { - SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded private key for the above certificate.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_119_apis_pinniped_v1alpha1_CredentialRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestList is a list of CredentialRequest objects.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequest"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_119_apis_pinniped_v1alpha1_CredentialRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestSpec is the specification of a CredentialRequest, expected on requests to the Pinniped API", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of credential.", - Type: []string{"string"}, - Format: "", - }, - }, - "token": { - SchemaProps: spec.SchemaProps{ - Description: "Token credential (when Type == TokenCredentialType).", - Ref: ref("go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestTokenCredential"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestTokenCredential"}, - } -} - -func schema_119_apis_pinniped_v1alpha1_CredentialRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestStatus is the status of a CredentialRequest, returned on responses to the Pinniped API.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "credential": { - SchemaProps: spec.SchemaProps{ - Description: "A Credential will be returned for a successful credential request.", - Ref: ref("go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestCredential"), - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "An error message will be returned for an unsuccessful credential request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1.CredentialRequestCredential"}, - } -} - -func schema_119_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CredentialRequestTokenCredential holds a bearer token issued by an upstream identity provider.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value of the bearer token supplied with the credential request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/hack/lib/docs/config.yaml b/hack/lib/docs/config.yaml index 8456aa9c..891093bf 100644 --- a/hack/lib/docs/config.yaml +++ b/hack/lib/docs/config.yaml @@ -5,7 +5,6 @@ processor: ignoreGroupVersions: - "config.pinniped.dev/config" - "idp.pinniped.dev/idp" - - "pinniped.dev/pinniped" - "login.pinniped.dev/login" ignoreFields: - "TypeMeta$" diff --git a/hack/lib/kube-versions.txt b/hack/lib/kube-versions.txt index 35e945d1..9ffdb3ab 100644 --- a/hack/lib/kube-versions.txt +++ b/hack/lib/kube-versions.txt @@ -1,3 +1,3 @@ -1.17.11 -1.18.2 1.19.0 +1.18.2 +1.17.11 diff --git a/hack/lib/update-codegen.sh b/hack/lib/update-codegen.sh index 466b25f1..57ef3d37 100755 --- a/hack/lib/update-codegen.sh +++ b/hack/lib/update-codegen.sh @@ -109,7 +109,7 @@ echo "generating API-related code for our public API groups..." deepcopy \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ - "pinniped:v1alpha1 config:v1alpha1 idp:v1alpha1 login:v1alpha1" \ + "config:v1alpha1 idp:v1alpha1 login:v1alpha1" \ --go-header-file "${ROOT}/hack/boilerplate.go.txt" 2>&1 | sed "s|^|gen-api > |" ) @@ -121,7 +121,7 @@ echo "generating API-related code for our internal API groups..." "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ - "pinniped:v1alpha1 config:v1alpha1 idp:v1alpha1 login:v1alpha1" \ + "config:v1alpha1 idp:v1alpha1 login:v1alpha1" \ --go-header-file "${ROOT}/hack/boilerplate.go.txt" 2>&1 | sed "s|^|gen-int-api > |" ) @@ -136,7 +136,7 @@ echo "generating client code for our public API groups..." client,lister,informer \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ - "pinniped:v1alpha1 config:v1alpha1 idp:v1alpha1 login:v1alpha1" \ + "config:v1alpha1 idp:v1alpha1 login:v1alpha1" \ --go-header-file "${ROOT}/hack/boilerplate.go.txt" 2>&1 | sed "s|^|gen-client > |" ) diff --git a/internal/apiserver/apiserver.go b/internal/apiserver/apiserver.go index f73f2f14..ecf63838 100644 --- a/internal/apiserver/apiserver.go +++ b/internal/apiserver/apiserver.go @@ -20,8 +20,6 @@ import ( loginapi "go.pinniped.dev/generated/1.19/apis/login" loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" - pinnipedapi "go.pinniped.dev/generated/1.19/apis/pinniped" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" "go.pinniped.dev/internal/registry/credentialrequest" ) @@ -35,8 +33,6 @@ var ( //nolint: gochecknoinits func init() { - utilruntime.Must(pinnipedv1alpha1.AddToScheme(scheme)) - utilruntime.Must(pinnipedapi.AddToScheme(scheme)) utilruntime.Must(loginv1alpha1.AddToScheme(scheme)) utilruntime.Must(loginapi.AddToScheme(scheme)) @@ -102,21 +98,17 @@ func (c completedConfig) New() (*PinnipedServer, error) { GenericAPIServer: genericServer, } - restHandler := credentialrequest.NewREST(c.ExtraConfig.TokenAuthenticator, c.ExtraConfig.Issuer) - for gvr, storage := range map[schema.GroupVersionResource]rest.Storage{ - pinnipedv1alpha1.SchemeGroupVersion.WithResource("credentialrequests"): restHandler.PinnipedV1alpha1Storage(), - loginv1alpha1.SchemeGroupVersion.WithResource("tokencredentialrequests"): restHandler.LoginV1alpha1Storage(), - } { - if err := s.GenericAPIServer.InstallAPIGroup(&genericapiserver.APIGroupInfo{ - PrioritizedVersions: []schema.GroupVersion{gvr.GroupVersion()}, - VersionedResourcesStorageMap: map[string]map[string]rest.Storage{gvr.Version: {gvr.Resource: storage}}, - OptionsExternalVersion: &schema.GroupVersion{Version: "v1"}, - Scheme: scheme, - ParameterCodec: metav1.ParameterCodec, - NegotiatedSerializer: Codecs, - }); err != nil { - return nil, fmt.Errorf("could not install API group %s: %w", gvr.String(), err) - } + gvr := loginv1alpha1.SchemeGroupVersion.WithResource("tokencredentialrequests") + storage := credentialrequest.NewREST(c.ExtraConfig.TokenAuthenticator, c.ExtraConfig.Issuer) + if err := s.GenericAPIServer.InstallAPIGroup(&genericapiserver.APIGroupInfo{ + PrioritizedVersions: []schema.GroupVersion{gvr.GroupVersion()}, + VersionedResourcesStorageMap: map[string]map[string]rest.Storage{gvr.Version: {gvr.Resource: storage}}, + OptionsExternalVersion: &schema.GroupVersion{Version: "v1"}, + Scheme: scheme, + ParameterCodec: metav1.ParameterCodec, + NegotiatedSerializer: Codecs, + }); err != nil { + return nil, fmt.Errorf("could not install API group %s: %w", gvr.String(), err) } s.GenericAPIServer.AddPostStartHookOrDie("start-controllers", diff --git a/internal/controller/apicerts/apiservice_updater_test.go b/internal/controller/apicerts/apiservice_updater_test.go index cb0e1bc3..4cba94b9 100644 --- a/internal/controller/apicerts/apiservice_updater_test.go +++ b/internal/controller/apicerts/apiservice_updater_test.go @@ -22,7 +22,7 @@ import ( apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" aggregatorfake "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/fake" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" + loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" "go.pinniped.dev/internal/controllerlib" "go.pinniped.dev/internal/testutil" ) @@ -41,7 +41,7 @@ func TestAPIServiceUpdaterControllerOptions(t *testing.T) { secretsInformer := kubeinformers.NewSharedInformerFactory(nil, 0).Core().V1().Secrets() _ = NewAPIServiceUpdaterController( installedInNamespace, - pinnipedv1alpha1.SchemeGroupVersion.Version+"."+pinnipedv1alpha1.GroupName, + loginv1alpha1.SchemeGroupVersion.Version+"."+loginv1alpha1.GroupName, nil, secretsInformer, observableWithInformerOption.WithInformer, // make it possible to observe the behavior of the Filters @@ -119,7 +119,7 @@ func TestAPIServiceUpdaterControllerSync(t *testing.T) { // Set this at the last second to allow for injection of server override. subject = NewAPIServiceUpdaterController( installedInNamespace, - pinnipedv1alpha1.SchemeGroupVersion.Version+"."+pinnipedv1alpha1.GroupName, + loginv1alpha1.SchemeGroupVersion.Version+"."+loginv1alpha1.GroupName, aggregatorAPIClient, kubeInformers.Core().V1().Secrets(), controllerlib.WithInformer, @@ -195,7 +195,7 @@ func TestAPIServiceUpdaterControllerSync(t *testing.T) { it.Before(func() { apiService := &apiregistrationv1.APIService{ ObjectMeta: metav1.ObjectMeta{ - Name: pinnipedv1alpha1.SchemeGroupVersion.Version + "." + pinnipedv1alpha1.GroupName, + Name: loginv1alpha1.SchemeGroupVersion.Version + "." + loginv1alpha1.GroupName, }, Spec: apiregistrationv1.APIServiceSpec{ CABundle: nil, @@ -214,7 +214,7 @@ func TestAPIServiceUpdaterControllerSync(t *testing.T) { // Make sure we updated the APIService caBundle and left it otherwise unchanged r.Len(aggregatorAPIClient.Actions(), 2) r.Equal("get", aggregatorAPIClient.Actions()[0].GetVerb()) - expectedAPIServiceName := pinnipedv1alpha1.SchemeGroupVersion.Version + "." + pinnipedv1alpha1.GroupName + expectedAPIServiceName := loginv1alpha1.SchemeGroupVersion.Version + "." + loginv1alpha1.GroupName expectedUpdateAction := coretesting.NewUpdateAction( schema.GroupVersionResource{ Group: apiregistrationv1.GroupName, diff --git a/internal/controller/apicerts/update_api_service_test.go b/internal/controller/apicerts/update_api_service_test.go index 2dc7cbf9..1af26848 100644 --- a/internal/controller/apicerts/update_api_service_test.go +++ b/internal/controller/apicerts/update_api_service_test.go @@ -17,11 +17,11 @@ import ( apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" aggregatorv1fake "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/fake" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" + loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" ) func TestUpdateAPIService(t *testing.T) { - const apiServiceName = "v1alpha1.pinniped.dev" + const apiServiceName = "v1alpha1.login.pinniped.dev" tests := []struct { name string @@ -181,7 +181,7 @@ func TestUpdateAPIService(t *testing.T) { tt.mocks(client) } - err := UpdateAPIService(ctx, client, pinnipedv1alpha1.SchemeGroupVersion.Version+"."+pinnipedv1alpha1.GroupName, tt.caInput) + err := UpdateAPIService(ctx, client, loginv1alpha1.SchemeGroupVersion.Version+"."+loginv1alpha1.GroupName, tt.caInput) if tt.wantErr != "" { require.EqualError(t, err, tt.wantErr) return diff --git a/internal/controllermanager/prepare_controllers.go b/internal/controllermanager/prepare_controllers.go index 13b36b6a..787ae0b6 100644 --- a/internal/controllermanager/prepare_controllers.go +++ b/internal/controllermanager/prepare_controllers.go @@ -16,7 +16,6 @@ import ( aggregatorclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" pinnipedclientset "go.pinniped.dev/generated/1.19/client/clientset/versioned" pinnipedinformers "go.pinniped.dev/generated/1.19/client/informers/externalversions" "go.pinniped.dev/internal/controller/apicerts" @@ -82,16 +81,6 @@ func PrepareControllers( ), singletonWorker, ). - WithController( - apicerts.NewAPIServiceUpdaterController( - serverInstallationNamespace, - pinnipedv1alpha1.SchemeGroupVersion.Version+"."+pinnipedv1alpha1.GroupName, - aggregatorClient, - installationNamespaceK8sInformers.Core().V1().Secrets(), - controllerlib.WithInformer, - ), - singletonWorker, - ). WithController( apicerts.NewAPIServiceUpdaterController( serverInstallationNamespace, diff --git a/internal/registry/credentialrequest/conversions.go b/internal/registry/credentialrequest/conversions.go deleted file mode 100644 index 4259f9b2..00000000 --- a/internal/registry/credentialrequest/conversions.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package credentialrequest - -import ( - loginapi "go.pinniped.dev/generated/1.19/apis/login" - pinnipedapi "go.pinniped.dev/generated/1.19/apis/pinniped" -) - -func convertToLoginAPI(input *pinnipedapi.CredentialRequest) *loginapi.TokenCredentialRequest { - if input == nil { - return nil - } - - result := loginapi.TokenCredentialRequest{} - result.ObjectMeta = input.ObjectMeta - if input.Spec.Token != nil { - result.Spec.Token = input.Spec.Token.Value - } - result.Status.Message = input.Status.Message - if input.Status.Credential != nil { - result.Status.Credential = &loginapi.ClusterCredential{ - ExpirationTimestamp: input.Status.Credential.ExpirationTimestamp, - Token: input.Status.Credential.Token, - ClientCertificateData: input.Status.Credential.ClientCertificateData, - ClientKeyData: input.Status.Credential.ClientKeyData, - } - } - return &result -} - -func convertFromLoginAPI(input *loginapi.TokenCredentialRequest) *pinnipedapi.CredentialRequest { - if input == nil { - return nil - } - - result := pinnipedapi.CredentialRequest{} - result.ObjectMeta = input.ObjectMeta - if input.Spec.Token != "" { - result.Spec.Type = pinnipedapi.TokenCredentialType - result.Spec.Token = &pinnipedapi.CredentialRequestTokenCredential{Value: input.Spec.Token} - } - result.Status.Message = input.Status.Message - if input.Status.Credential != nil { - result.Status.Credential = &pinnipedapi.CredentialRequestCredential{ - ExpirationTimestamp: input.Status.Credential.ExpirationTimestamp, - Token: input.Status.Credential.Token, - ClientCertificateData: input.Status.Credential.ClientCertificateData, - ClientKeyData: input.Status.Credential.ClientKeyData, - } - } - return &result -} diff --git a/internal/registry/credentialrequest/conversions_test.go b/internal/registry/credentialrequest/conversions_test.go deleted file mode 100644 index fcdccca5..00000000 --- a/internal/registry/credentialrequest/conversions_test.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package credentialrequest - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - loginapi "go.pinniped.dev/generated/1.19/apis/login" - pinnipedapi "go.pinniped.dev/generated/1.19/apis/pinniped" -) - -func TestConversions(t *testing.T) { - now := time.Now() - errMsg := "some error message" - - tests := []struct { - name string - new *loginapi.TokenCredentialRequest - old *pinnipedapi.CredentialRequest - }{ - { - name: "nil input", - }, - { - name: "usual request", - new: &loginapi.TokenCredentialRequest{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-object", - }, - Spec: loginapi.TokenCredentialRequestSpec{Token: "test-token"}, - }, - old: &pinnipedapi.CredentialRequest{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-object", - }, - Spec: pinnipedapi.CredentialRequestSpec{ - Type: pinnipedapi.TokenCredentialType, - Token: &pinnipedapi.CredentialRequestTokenCredential{Value: "test-token"}, - }, - }, - }, - { - name: "usual response", - new: &loginapi.TokenCredentialRequest{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-object", - }, - Status: loginapi.TokenCredentialRequestStatus{ - Credential: &loginapi.ClusterCredential{ - ExpirationTimestamp: metav1.NewTime(now), - Token: "test-cluster-token", - ClientCertificateData: "test-cluster-cert", - ClientKeyData: "test-cluster-key", - }, - }, - }, - old: &pinnipedapi.CredentialRequest{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-object", - }, - Status: pinnipedapi.CredentialRequestStatus{ - Credential: &pinnipedapi.CredentialRequestCredential{ - ExpirationTimestamp: metav1.NewTime(now), - Token: "test-cluster-token", - ClientCertificateData: "test-cluster-cert", - ClientKeyData: "test-cluster-key", - }, - }, - }, - }, - { - name: "error response", - new: &loginapi.TokenCredentialRequest{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-object", - }, - Status: loginapi.TokenCredentialRequestStatus{ - Message: &errMsg, - }, - }, - old: &pinnipedapi.CredentialRequest{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-object", - }, - Status: pinnipedapi.CredentialRequestStatus{ - Message: &errMsg, - }, - }, - }, - } - for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { - t.Run("upgrade", func(t *testing.T) { - require.Equal(t, tt.new, convertToLoginAPI(tt.old)) - }) - t.Run("downgrade", func(t *testing.T) { - require.Equal(t, tt.old, convertFromLoginAPI(tt.new)) - }) - t.Run("roundtrip", func(t *testing.T) { - require.Equal(t, tt.old, convertFromLoginAPI(convertToLoginAPI(tt.old))) - require.Equal(t, tt.new, convertToLoginAPI(convertFromLoginAPI(tt.new))) - }) - }) - } -} diff --git a/internal/registry/credentialrequest/rest.go b/internal/registry/credentialrequest/rest.go index e8656d31..f8ccafb0 100644 --- a/internal/registry/credentialrequest/rest.go +++ b/internal/registry/credentialrequest/rest.go @@ -19,7 +19,6 @@ import ( "k8s.io/utils/trace" loginapi "go.pinniped.dev/generated/1.19/apis/login" - pinnipedapi "go.pinniped.dev/generated/1.19/apis/pinniped" ) // clientCertificateTTL is the TTL for short-lived client certificates returned by this API. @@ -48,23 +47,13 @@ type REST struct { issuer CertIssuer } -// PinnipedV1alpha1Storage returns a wrapper of the REST which serves the pinniped.dev/v1alpha1 API. -func (r *REST) PinnipedV1alpha1Storage() Storage { return &oldAPIREST{r} } +func (*REST) New() runtime.Object { + return &loginapi.TokenCredentialRequest{} +} -type oldAPIREST struct{ *REST } - -func (*oldAPIREST) New() runtime.Object { return &pinnipedapi.CredentialRequest{} } - -func (*oldAPIREST) NamespaceScoped() bool { return false } - -// LoginV1alpha1Storage returns a wrapper of the REST which serves the login.pinniped.dev/v1alpha1 API. -func (r *REST) LoginV1alpha1Storage() Storage { return &newAPIREST{r} } - -type newAPIREST struct{ *REST } - -func (*newAPIREST) New() runtime.Object { return &loginapi.TokenCredentialRequest{} } - -func (*newAPIREST) NamespaceScoped() bool { return true } +func (*REST) NamespaceScoped() bool { + return true +} func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) { t := trace.FromContext(ctx).Nest("create", trace.Field{ @@ -73,13 +62,6 @@ func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation }) defer t.Log() - // If the incoming request is from the newer version of the API, convert it into the older API and map the result back later. - convertResponse := func(in *pinnipedapi.CredentialRequest) runtime.Object { return in } - if req, ok := obj.(*loginapi.TokenCredentialRequest); ok { - obj = convertFromLoginAPI(req) - convertResponse = func(in *pinnipedapi.CredentialRequest) runtime.Object { return convertToLoginAPI(in) } - } - credentialRequest, err := validateRequest(ctx, obj, createValidation, options, t) if err != nil { return nil, err @@ -97,14 +79,14 @@ func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation } }() - authResponse, authenticated, err := r.tokenAuthenticator.AuthenticateToken(cancelCtx, credentialRequest.Spec.Token.Value) + authResponse, authenticated, err := r.tokenAuthenticator.AuthenticateToken(cancelCtx, credentialRequest.Spec.Token) if err != nil { traceFailureWithError(t, "webhook authentication", err) - return convertResponse(failureResponse()), nil + return failureResponse(), nil } if !authenticated || authResponse == nil || authResponse.User == nil || authResponse.User.GetName() == "" { traceSuccess(t, authResponse, authenticated, false) - return convertResponse(failureResponse()), nil + return failureResponse(), nil } username := authResponse.User.GetName() @@ -125,41 +107,28 @@ func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation traceSuccess(t, authResponse, authenticated, true) - return convertResponse(&pinnipedapi.CredentialRequest{ - Status: pinnipedapi.CredentialRequestStatus{ - Credential: &pinnipedapi.CredentialRequestCredential{ + return &loginapi.TokenCredentialRequest{ + Status: loginapi.TokenCredentialRequestStatus{ + Credential: &loginapi.ClusterCredential{ ExpirationTimestamp: metav1.NewTime(time.Now().UTC().Add(clientCertificateTTL)), ClientCertificateData: string(certPEM), ClientKeyData: string(keyPEM), }, }, - }), nil + }, nil } -func validateRequest(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions, t *trace.Trace) (*pinnipedapi.CredentialRequest, error) { - credentialRequest, ok := obj.(*pinnipedapi.CredentialRequest) +func validateRequest(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions, t *trace.Trace) (*loginapi.TokenCredentialRequest, error) { + credentialRequest, ok := obj.(*loginapi.TokenCredentialRequest) if !ok { traceValidationFailure(t, "not a CredentialRequest") return nil, apierrors.NewBadRequest(fmt.Sprintf("not a CredentialRequest: %#v", obj)) } - if len(credentialRequest.Spec.Type) == 0 { - traceValidationFailure(t, "type must be supplied") - errs := field.ErrorList{field.Required(field.NewPath("spec", "type"), "type must be supplied")} - return nil, apierrors.NewInvalid(pinnipedapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) - } - - if credentialRequest.Spec.Type != pinnipedapi.TokenCredentialType { - traceValidationFailure(t, "unrecognized type") - errs := field.ErrorList{field.Invalid(field.NewPath("spec", "type"), credentialRequest.Spec.Type, "unrecognized type")} - return nil, apierrors.NewInvalid(pinnipedapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) - } - - token := credentialRequest.Spec.Token - if token == nil || len(token.Value) == 0 { + if len(credentialRequest.Spec.Token) == 0 { traceValidationFailure(t, "token must be supplied") errs := field.ErrorList{field.Required(field.NewPath("spec", "token", "value"), "token must be supplied")} - return nil, apierrors.NewInvalid(pinnipedapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) + return nil, apierrors.NewInvalid(loginapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) } // just a sanity check, not sure how to honor a dry run on a virtual API @@ -167,7 +136,7 @@ func validateRequest(ctx context.Context, obj runtime.Object, createValidation r if len(options.DryRun) != 0 { traceValidationFailure(t, "dryRun not supported") errs := field.ErrorList{field.NotSupported(field.NewPath("dryRun"), options.DryRun, nil)} - return nil, apierrors.NewInvalid(pinnipedapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) + return nil, apierrors.NewInvalid(loginapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) } } @@ -178,8 +147,7 @@ func validateRequest(ctx context.Context, obj runtime.Object, createValidation r // they already got the token. if createValidation != nil { requestForValidation := obj.DeepCopyObject() - credentialRequestCopy, _ := requestForValidation.(*pinnipedapi.CredentialRequest) - credentialRequestCopy.Spec.Token.Value = "" + requestForValidation.(*loginapi.TokenCredentialRequest).Spec.Token = "" if err := createValidation(ctx, requestForValidation); err != nil { traceFailureWithError(t, "validation webhook", err) return nil, err @@ -215,10 +183,10 @@ func traceFailureWithError(t *trace.Trace, failureType string, err error) { ) } -func failureResponse() *pinnipedapi.CredentialRequest { +func failureResponse() *loginapi.TokenCredentialRequest { m := "authentication failed" - return &pinnipedapi.CredentialRequest{ - Status: pinnipedapi.CredentialRequestStatus{ + return &loginapi.TokenCredentialRequest{ + Status: loginapi.TokenCredentialRequestStatus{ Credential: nil, Message: &m, }, diff --git a/internal/registry/credentialrequest/rest_test.go b/internal/registry/credentialrequest/rest_test.go index c13d8b2c..efa3071a 100644 --- a/internal/registry/credentialrequest/rest_test.go +++ b/internal/registry/credentialrequest/rest_test.go @@ -24,7 +24,6 @@ import ( "k8s.io/klog/v2" loginapi "go.pinniped.dev/generated/1.19/apis/login" - pinnipedapi "go.pinniped.dev/generated/1.19/apis/pinniped" "go.pinniped.dev/internal/mocks/mockcertissuer" "go.pinniped.dev/internal/testutil" ) @@ -104,16 +103,16 @@ func TestCreate(t *testing.T) { response, err := callCreate(context.Background(), storage, validCredentialRequestWithToken(requestToken)) r.NoError(err) - r.IsType(&pinnipedapi.CredentialRequest{}, response) + r.IsType(&loginapi.TokenCredentialRequest{}, response) - expires := response.(*pinnipedapi.CredentialRequest).Status.Credential.ExpirationTimestamp + expires := response.(*loginapi.TokenCredentialRequest).Status.Credential.ExpirationTimestamp r.NotNil(expires) r.InDelta(time.Now().Add(1*time.Hour).Unix(), expires.Unix(), 5) - response.(*pinnipedapi.CredentialRequest).Status.Credential.ExpirationTimestamp = metav1.Time{} + response.(*loginapi.TokenCredentialRequest).Status.Credential.ExpirationTimestamp = metav1.Time{} - r.Equal(response, &pinnipedapi.CredentialRequest{ - Status: pinnipedapi.CredentialRequestStatus{ - Credential: &pinnipedapi.CredentialRequestCredential{ + r.Equal(response, &loginapi.TokenCredentialRequest{ + Status: loginapi.TokenCredentialRequestStatus{ + Credential: &loginapi.ClusterCredential{ ExpirationTimestamp: metav1.Time{}, ClientCertificateData: "test-cert", ClientKeyData: "test-key", @@ -315,47 +314,10 @@ func TestCreate(t *testing.T) { requireOneLogStatement(r, logger, `"failure" failureType:request validation,msg:not a CredentialRequest`) }) - it("CreateFailsWhenTokenIsNilInRequest", func() { - storage := NewREST(&FakeToken{}, nil) - response, err := callCreate(context.Background(), storage, credentialRequest(pinnipedapi.CredentialRequestSpec{ - Type: pinnipedapi.TokenCredentialType, - Token: nil, - })) - - requireAPIError(t, response, err, apierrors.IsInvalid, - `.pinniped.dev "request name" is invalid: spec.token.value: Required value: token must be supplied`) - requireOneLogStatement(r, logger, `"failure" failureType:request validation,msg:token must be supplied`) - }) - - it("CreateFailsWhenTypeInRequestIsMissing", func() { - storage := NewREST(&FakeToken{}, nil) - response, err := callCreate(context.Background(), storage, credentialRequest(pinnipedapi.CredentialRequestSpec{ - Type: "", - Token: &pinnipedapi.CredentialRequestTokenCredential{Value: "a token"}, - })) - - requireAPIError(t, response, err, apierrors.IsInvalid, - `.pinniped.dev "request name" is invalid: spec.type: Required value: type must be supplied`) - requireOneLogStatement(r, logger, `"failure" failureType:request validation,msg:type must be supplied`) - }) - - it("CreateFailsWhenTypeInRequestIsNotLegal", func() { - storage := NewREST(&FakeToken{}, nil) - response, err := callCreate(context.Background(), storage, credentialRequest(pinnipedapi.CredentialRequestSpec{ - Type: "this in an invalid type", - Token: &pinnipedapi.CredentialRequestTokenCredential{Value: "a token"}, - })) - - requireAPIError(t, response, err, apierrors.IsInvalid, - `.pinniped.dev "request name" is invalid: spec.type: Invalid value: "this in an invalid type": unrecognized type`) - requireOneLogStatement(r, logger, `"failure" failureType:request validation,msg:unrecognized type`) - }) - it("CreateFailsWhenTokenValueIsEmptyInRequest", func() { storage := NewREST(&FakeToken{}, nil) - response, err := callCreate(context.Background(), storage, credentialRequest(pinnipedapi.CredentialRequestSpec{ - Type: pinnipedapi.TokenCredentialType, - Token: &pinnipedapi.CredentialRequestTokenCredential{Value: ""}, + response, err := callCreate(context.Background(), storage, credentialRequest(loginapi.TokenCredentialRequestSpec{ + Token: "", })) requireAPIError(t, response, err, apierrors.IsInvalid, @@ -387,8 +349,8 @@ func TestCreate(t *testing.T) { context.Background(), validCredentialRequestWithToken(requestToken), func(ctx context.Context, obj runtime.Object) error { - credentialRequest, _ := obj.(*pinnipedapi.CredentialRequest) - credentialRequest.Spec.Token.Value = "foobaz" + credentialRequest, _ := obj.(*loginapi.TokenCredentialRequest) + credentialRequest.Spec.Token = "foobaz" return nil }, &metav1.CreateOptions{}) @@ -409,9 +371,9 @@ func TestCreate(t *testing.T) { context.Background(), validCredentialRequest(), func(ctx context.Context, obj runtime.Object) error { - credentialRequest, _ := obj.(*pinnipedapi.CredentialRequest) + credentialRequest, _ := obj.(*loginapi.TokenCredentialRequest) validationFunctionWasCalled = true - validationFunctionSawTokenValue = credentialRequest.Spec.Token.Value + validationFunctionSawTokenValue = credentialRequest.Spec.Token return nil }, &metav1.CreateOptions{}) @@ -508,19 +470,16 @@ func callCreate(ctx context.Context, storage *REST, obj runtime.Object) (runtime }) } -func validCredentialRequest() *pinnipedapi.CredentialRequest { +func validCredentialRequest() *loginapi.TokenCredentialRequest { return validCredentialRequestWithToken("some token") } -func validCredentialRequestWithToken(token string) *pinnipedapi.CredentialRequest { - return credentialRequest(pinnipedapi.CredentialRequestSpec{ - Type: pinnipedapi.TokenCredentialType, - Token: &pinnipedapi.CredentialRequestTokenCredential{Value: token}, - }) +func validCredentialRequestWithToken(token string) *loginapi.TokenCredentialRequest { + return credentialRequest(loginapi.TokenCredentialRequestSpec{Token: token}) } -func credentialRequest(spec pinnipedapi.CredentialRequestSpec) *pinnipedapi.CredentialRequest { - return &pinnipedapi.CredentialRequest{ +func credentialRequest(spec loginapi.TokenCredentialRequestSpec) *loginapi.TokenCredentialRequest { + return &loginapi.TokenCredentialRequest{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "request name", @@ -550,8 +509,8 @@ func requireAPIError(t *testing.T, response runtime.Object, err error, expectedE func requireSuccessfulResponseWithAuthenticationFailureMessage(t *testing.T, err error, response runtime.Object) { t.Helper() require.NoError(t, err) - require.Equal(t, response, &pinnipedapi.CredentialRequest{ - Status: pinnipedapi.CredentialRequestStatus{ + require.Equal(t, response, &loginapi.TokenCredentialRequest{ + Status: loginapi.TokenCredentialRequestStatus{ Credential: nil, Message: stringPtr("authentication failed"), }, diff --git a/internal/server/server.go b/internal/server/server.go index d38e537f..2dd0b20d 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -20,7 +20,7 @@ import ( "k8s.io/klog/v2" configv1alpha1 "go.pinniped.dev/generated/1.19/apis/config/v1alpha1" - pinnipedv1alpha1 "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" + loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" pinnipedclientset "go.pinniped.dev/generated/1.19/client/clientset/versioned" "go.pinniped.dev/internal/apiserver" "go.pinniped.dev/internal/certauthority/kubecertauthority" @@ -45,7 +45,7 @@ type App struct { // This is ignored for now because we turn off etcd storage below, but this is // the right prefix in case we turn it back on. -const defaultEtcdPathPrefix = "/registry/" + pinnipedv1alpha1.GroupName +const defaultEtcdPathPrefix = "/registry/" + loginv1alpha1.GroupName // New constructs a new App with command line args, stdout and stderr. func New(ctx context.Context, args []string, stdout, stderr io.Writer) *App { @@ -246,7 +246,7 @@ func getAggregatedAPIServerConfig( ) (*apiserver.Config, error) { recommendedOptions := genericoptions.NewRecommendedOptions( defaultEtcdPathPrefix, - apiserver.Codecs.LegacyCodec(pinnipedv1alpha1.SchemeGroupVersion), + apiserver.Codecs.LegacyCodec(loginv1alpha1.SchemeGroupVersion), // TODO we should check to see if all the other default settings are acceptable for us ) recommendedOptions.Etcd = nil // turn off etcd storage because we don't need it yet diff --git a/test/integration/api_discovery_test.go b/test/integration/api_discovery_test.go index 275045cd..d5eec031 100644 --- a/test/integration/api_discovery_test.go +++ b/test/integration/api_discovery_test.go @@ -26,25 +26,25 @@ func TestGetAPIResourceList(t *testing.T) { }{ { group: metav1.APIGroup{ - Name: "pinniped.dev", + Name: "login.pinniped.dev", Versions: []metav1.GroupVersionForDiscovery{ { - GroupVersion: "pinniped.dev/v1alpha1", + GroupVersion: "login.pinniped.dev/v1alpha1", Version: "v1alpha1", }, }, PreferredVersion: metav1.GroupVersionForDiscovery{ - GroupVersion: "pinniped.dev/v1alpha1", + GroupVersion: "login.pinniped.dev/v1alpha1", Version: "v1alpha1", }, }, resourceByVersion: map[string][]metav1.APIResource{ - "pinniped.dev/v1alpha1": { + "login.pinniped.dev/v1alpha1": { { - Name: "credentialrequests", - Kind: "CredentialRequest", + Name: "tokencredentialrequests", + Kind: "TokenCredentialRequest", Verbs: []string{"create"}, - Namespaced: false, + Namespaced: true, // This is currently an empty string in the response; maybe it should not be // empty? Seems like no harm in keeping it like this for now, but feel free diff --git a/test/integration/api_serving_certs_test.go b/test/integration/api_serving_certs_test.go index df056983..cdb1d80e 100644 --- a/test/integration/api_serving_certs_test.go +++ b/test/integration/api_serving_certs_test.go @@ -13,7 +13,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" + loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" "go.pinniped.dev/internal/testutil" "go.pinniped.dev/test/library" ) @@ -80,7 +80,7 @@ func TestAPIServingCertificateAutoCreationAndRotation(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute) defer cancel() - const apiServiceName = "v1alpha1.pinniped.dev" + const apiServiceName = "v1alpha1.login.pinniped.dev" // Get the initial auto-generated version of the Secret. secret, err := kubeClient.CoreV1().Secrets(namespaceName).Get(ctx, "api-serving-cert", metav1.GetOptions{}) @@ -133,13 +133,10 @@ func TestAPIServingCertificateAutoCreationAndRotation(t *testing.T) { // pod has rotated their cert, but not the other ones sitting behind the service. aggregatedAPIWorking := func() bool { for i := 0; i < 10; i++ { - _, err = pinnipedClient.PinnipedV1alpha1().CredentialRequests().Create(ctx, &v1alpha1.CredentialRequest{ + _, err = pinnipedClient.LoginV1alpha1().TokenCredentialRequests(namespaceName).Create(ctx, &loginv1alpha1.TokenCredentialRequest{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{}, - Spec: v1alpha1.CredentialRequestSpec{ - Type: v1alpha1.TokenCredentialType, - Token: &v1alpha1.CredentialRequestTokenCredential{Value: "not a good token"}, - }, + Spec: loginv1alpha1.TokenCredentialRequestSpec{Token: "not a good token"}, }, metav1.CreateOptions{}) if err != nil { break diff --git a/test/integration/credentialrequest_test.go b/test/integration/credentialrequest_test.go index 3d1b926c..fe321c54 100644 --- a/test/integration/credentialrequest_test.go +++ b/test/integration/credentialrequest_test.go @@ -18,7 +18,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" - "go.pinniped.dev/generated/1.19/apis/pinniped/v1alpha1" + "go.pinniped.dev/generated/1.19/apis/login/v1alpha1" "go.pinniped.dev/test/library" ) @@ -74,10 +74,7 @@ func TestFailedCredentialRequestWhenTheRequestIsValidButTheTokenDoesNotAuthentic library.SkipUnlessIntegration(t) library.SkipUnlessClusterHasCapability(t, library.ClusterSigningKeyIsAvailable) - response, err := makeRequest(t, v1alpha1.CredentialRequestSpec{ - Type: v1alpha1.TokenCredentialType, - Token: &v1alpha1.CredentialRequestTokenCredential{Value: "not a good token"}, - }) + response, err := makeRequest(t, v1alpha1.TokenCredentialRequestSpec{Token: "not a good token"}) require.NoError(t, err) @@ -90,10 +87,7 @@ func TestCredentialRequest_ShouldFailWhenRequestDoesNotIncludeToken(t *testing.T library.SkipUnlessIntegration(t) library.SkipUnlessClusterHasCapability(t, library.ClusterSigningKeyIsAvailable) - response, err := makeRequest(t, v1alpha1.CredentialRequestSpec{ - Type: v1alpha1.TokenCredentialType, - Token: nil, - }) + response, err := makeRequest(t, v1alpha1.TokenCredentialRequestSpec{Token: ""}) require.Error(t, err) statusError, isStatus := err.(*errors.StatusError) @@ -122,7 +116,7 @@ func TestCredentialRequest_OtherwiseValidRequestWithRealTokenShouldFailWhenTheCl require.Equal(t, stringPtr("authentication failed"), response.Status.Message) } -func makeRequest(t *testing.T, spec v1alpha1.CredentialRequestSpec) (*v1alpha1.CredentialRequest, error) { +func makeRequest(t *testing.T, spec v1alpha1.TokenCredentialRequestSpec) (*v1alpha1.TokenCredentialRequest, error) { t.Helper() client := library.NewAnonymousPinnipedClientset(t) @@ -130,19 +124,16 @@ func makeRequest(t *testing.T, spec v1alpha1.CredentialRequestSpec) (*v1alpha1.C ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - return client.PinnipedV1alpha1().CredentialRequests().Create(ctx, &v1alpha1.CredentialRequest{ + ns := library.GetEnv(t, "PINNIPED_NAMESPACE") + return client.LoginV1alpha1().TokenCredentialRequests(ns).Create(ctx, &v1alpha1.TokenCredentialRequest{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{}, Spec: spec, }, metav1.CreateOptions{}) } -func validCredentialRequestSpecWithRealToken(t *testing.T) v1alpha1.CredentialRequestSpec { - token := library.GetEnv(t, "PINNIPED_TEST_USER_TOKEN") - return v1alpha1.CredentialRequestSpec{ - Type: v1alpha1.TokenCredentialType, - Token: &v1alpha1.CredentialRequestTokenCredential{Value: token}, - } +func validCredentialRequestSpecWithRealToken(t *testing.T) v1alpha1.TokenCredentialRequestSpec { + return v1alpha1.TokenCredentialRequestSpec{Token: library.GetEnv(t, "PINNIPED_TEST_USER_TOKEN")} } func addTestClusterRoleBinding(ctx context.Context, t *testing.T, adminClient kubernetes.Interface, binding *rbacv1.ClusterRoleBinding) {