Merge pull request #293 from vmware-tanzu/rename-oidcprovider-and-upstreamoidcprovider

Rename OIDCProvider -> FederationDomain and UpstreamOIDCProvider -> OIDCIdentityProvider
This commit is contained in:
Margo Crawford 2020-12-16 14:58:33 -08:00 committed by GitHub
commit 40586b255c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
149 changed files with 4525 additions and 4523 deletions

View File

@ -30,8 +30,8 @@ func init() {
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&OIDCProvider{},
&OIDCProviderList{},
&FederationDomain{},
&FederationDomainList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View File

@ -9,19 +9,19 @@ import (
)
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid;SameIssuerHostMustUseSameSecret
type OIDCProviderStatusCondition string
type FederationDomainStatusCondition string
const (
SuccessOIDCProviderStatusCondition = OIDCProviderStatusCondition("Success")
DuplicateOIDCProviderStatusCondition = OIDCProviderStatusCondition("Duplicate")
SameIssuerHostMustUseSameSecretOIDCProviderStatusCondition = OIDCProviderStatusCondition("SameIssuerHostMustUseSameSecret")
InvalidOIDCProviderStatusCondition = OIDCProviderStatusCondition("Invalid")
SuccessFederationDomainStatusCondition = FederationDomainStatusCondition("Success")
DuplicateFederationDomainStatusCondition = FederationDomainStatusCondition("Duplicate")
SameIssuerHostMustUseSameSecretFederationDomainStatusCondition = FederationDomainStatusCondition("SameIssuerHostMustUseSameSecret")
InvalidFederationDomainStatusCondition = FederationDomainStatusCondition("Invalid")
)
// OIDCProviderTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
type OIDCProviderTLSSpec struct {
// FederationDomainTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
type FederationDomainTLSSpec struct {
// SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains
// the TLS serving certificate for the HTTPS endpoints served by this OIDCProvider. When provided, the TLS Secret
// the TLS serving certificate for the HTTPS endpoints served by this FederationDomain. When provided, the TLS Secret
// named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use
// for TLS.
//
@ -41,8 +41,8 @@ type OIDCProviderTLSSpec struct {
SecretName string `json:"secretName,omitempty"`
}
// OIDCProviderSpec is a struct that describes an OIDC Provider.
type OIDCProviderSpec struct {
// FederationDomainSpec is a struct that describes an OIDC Provider.
type FederationDomainSpec struct {
// Issuer is the OIDC Provider's issuer, per the OIDC Discovery Metadata document, as well as the
// identifier that it will use for the iss claim in issued JWTs. This field will also be used as
// the base URL for any endpoints used by the OIDC Provider (e.g., if your issuer is
@ -54,13 +54,13 @@ type OIDCProviderSpec struct {
// +kubebuilder:validation:MinLength=1
Issuer string `json:"issuer"`
// TLS configures how this OIDCProvider is served over Transport Layer Security (TLS).
// TLS configures how this FederationDomain is served over Transport Layer Security (TLS).
// +optional
TLS *OIDCProviderTLSSpec `json:"tls,omitempty"`
TLS *FederationDomainTLSSpec `json:"tls,omitempty"`
}
// OIDCProviderSecrets holds information about this OIDC Provider's secrets.
type OIDCProviderSecrets struct {
// FederationDomainSecrets holds information about this OIDC Provider's secrets.
type FederationDomainSecrets struct {
// JWKS holds the name of the corev1.Secret in which this OIDC Provider's signing/verification keys are
// stored. If it is empty, then the signing/verification keys are either unknown or they don't
// exist.
@ -83,12 +83,12 @@ type OIDCProviderSecrets struct {
StateEncryptionKey corev1.LocalObjectReference `json:"stateEncryptionKey,omitempty"`
}
// OIDCProviderStatus is a struct that describes the actual state of an OIDC Provider.
type OIDCProviderStatus struct {
// FederationDomainStatus is a struct that describes the actual state of an OIDC Provider.
type FederationDomainStatus struct {
// Status holds an enum that describes the state of this OIDC Provider. Note that this Status can
// represent success or failure.
// +optional
Status OIDCProviderStatusCondition `json:"status,omitempty"`
Status FederationDomainStatusCondition `json:"status,omitempty"`
// Message provides human-readable details about the Status.
// +optional
@ -102,29 +102,29 @@ type OIDCProviderStatus struct {
// Secrets contains information about this OIDC Provider's secrets.
// +optional
Secrets OIDCProviderSecrets `json:"secrets,omitempty"`
Secrets FederationDomainSecrets `json:"secrets,omitempty"`
}
// OIDCProvider describes the configuration of an OIDC provider.
// FederationDomain describes the configuration of an OIDC provider.
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=pinniped
type OIDCProvider struct {
type FederationDomain struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec of the OIDC provider.
Spec OIDCProviderSpec `json:"spec"`
Spec FederationDomainSpec `json:"spec"`
// Status of the OIDC provider.
Status OIDCProviderStatus `json:"status,omitempty"`
Status FederationDomainStatus `json:"status,omitempty"`
}
// List of OIDCProvider objects.
// List of FederationDomain objects.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type OIDCProviderList struct {
type FederationDomainList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []OIDCProvider `json:"items"`
Items []FederationDomain `json:"items"`
}

View File

@ -30,8 +30,8 @@ func init() {
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&UpstreamOIDCProvider{},
&UpstreamOIDCProviderList{},
&OIDCIdentityProvider{},
&OIDCIdentityProviderList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View File

@ -7,25 +7,25 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type UpstreamOIDCProviderPhase string
type OIDCIdentityProviderPhase string
const (
// PhasePending is the default phase for newly-created UpstreamOIDCProvider resources.
PhasePending UpstreamOIDCProviderPhase = "Pending"
// PhasePending is the default phase for newly-created OIDCIdentityProvider resources.
PhasePending OIDCIdentityProviderPhase = "Pending"
// PhaseReady is the phase for an UpstreamOIDCProvider resource in a healthy state.
PhaseReady UpstreamOIDCProviderPhase = "Ready"
// PhaseReady is the phase for an OIDCIdentityProvider resource in a healthy state.
PhaseReady OIDCIdentityProviderPhase = "Ready"
// PhaseError is the phase for an UpstreamOIDCProvider in an unhealthy state.
PhaseError UpstreamOIDCProviderPhase = "Error"
// PhaseError is the phase for an OIDCIdentityProvider in an unhealthy state.
PhaseError OIDCIdentityProviderPhase = "Error"
)
// Status of an OIDC identity provider.
type UpstreamOIDCProviderStatus struct {
// Phase summarizes the overall status of the UpstreamOIDCProvider.
type OIDCIdentityProviderStatus struct {
// Phase summarizes the overall status of the OIDCIdentityProvider.
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Ready;Error
Phase UpstreamOIDCProviderPhase `json:"phase,omitempty"`
Phase OIDCIdentityProviderPhase `json:"phase,omitempty"`
// Represents the observations of an identity provider's current state.
// +patchMergeKey=type
@ -68,7 +68,7 @@ type OIDCClient struct {
}
// Spec for configuring an OIDC identity provider.
type UpstreamOIDCProviderSpec struct {
type OIDCIdentityProviderSpec struct {
// Issuer is the issuer URL of this OIDC identity provider, i.e., where to fetch
// /.well-known/openid-configuration.
// +kubebuilder:validation:MinLength=1
@ -94,7 +94,7 @@ type UpstreamOIDCProviderSpec struct {
Client OIDCClient `json:"client"`
}
// UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect identity provider.
// OIDCIdentityProvider describes the configuration of an upstream OpenID Connect identity provider.
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=pinniped;pinniped-idp;pinniped-idps
@ -102,22 +102,22 @@ type UpstreamOIDCProviderSpec struct {
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:subresource:status
type UpstreamOIDCProvider struct {
type OIDCIdentityProvider struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec for configuring the identity provider.
Spec UpstreamOIDCProviderSpec `json:"spec"`
Spec OIDCIdentityProviderSpec `json:"spec"`
// Status of the identity provider.
Status UpstreamOIDCProviderStatus `json:"status,omitempty"`
Status OIDCIdentityProviderStatus `json:"status,omitempty"`
}
// List of UpstreamOIDCProvider objects.
// List of OIDCIdentityProvider objects.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type UpstreamOIDCProviderList struct {
type OIDCIdentityProviderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []UpstreamOIDCProvider `json:"items"`
Items []OIDCIdentityProvider `json:"items"`
}

View File

@ -91,7 +91,7 @@ func startControllers(
kubeInformers kubeinformers.SharedInformerFactory,
pinnipedInformers pinnipedinformers.SharedInformerFactory,
) {
opInformer := pinnipedInformers.Config().V1alpha1().OIDCProviders()
opInformer := pinnipedInformers.Config().V1alpha1().FederationDomains()
secretInformer := kubeInformers.Core().V1().Secrets()
// Create controller manager.
@ -107,7 +107,7 @@ func startControllers(
singletonWorker,
).
WithController(
supervisorconfig.NewOIDCProviderWatcherController(
supervisorconfig.NewFederationDomainWatcherController(
issuerManager,
clock.RealClock{},
pinnipedClient,
@ -162,15 +162,15 @@ func startControllers(
singletonWorker,
).
WithController(
generator.NewOIDCProviderSecretsController(
generator.NewFederationDomainSecretsController(
generator.NewSymmetricSecretHelper(
"pinniped-oidc-provider-hmac-key-",
cfg.Labels,
rand.Reader,
generator.SecretUsageTokenSigningKey,
func(oidcProviderIssuer string, symmetricKey []byte) {
plog.Debug("setting hmac secret", "issuer", oidcProviderIssuer)
secretCache.SetTokenHMACKey(oidcProviderIssuer, symmetricKey)
func(federationDomainIssuer string, symmetricKey []byte) {
plog.Debug("setting hmac secret", "issuer", federationDomainIssuer)
secretCache.SetTokenHMACKey(federationDomainIssuer, symmetricKey)
},
),
kubeClient,
@ -182,15 +182,15 @@ func startControllers(
singletonWorker,
).
WithController(
generator.NewOIDCProviderSecretsController(
generator.NewFederationDomainSecretsController(
generator.NewSymmetricSecretHelper(
"pinniped-oidc-provider-upstream-state-signature-key-",
cfg.Labels,
rand.Reader,
generator.SecretUsageStateSigningKey,
func(oidcProviderIssuer string, symmetricKey []byte) {
plog.Debug("setting state signature key", "issuer", oidcProviderIssuer)
secretCache.SetStateEncoderHashKey(oidcProviderIssuer, symmetricKey)
func(federationDomainIssuer string, symmetricKey []byte) {
plog.Debug("setting state signature key", "issuer", federationDomainIssuer)
secretCache.SetStateEncoderHashKey(federationDomainIssuer, symmetricKey)
},
),
kubeClient,
@ -202,15 +202,15 @@ func startControllers(
singletonWorker,
).
WithController(
generator.NewOIDCProviderSecretsController(
generator.NewFederationDomainSecretsController(
generator.NewSymmetricSecretHelper(
"pinniped-oidc-provider-upstream-state-encryption-key-",
cfg.Labels,
rand.Reader,
generator.SecretUsageStateEncryptionKey,
func(oidcProviderIssuer string, symmetricKey []byte) {
plog.Debug("setting state encryption key", "issuer", oidcProviderIssuer)
secretCache.SetStateEncoderBlockKey(oidcProviderIssuer, symmetricKey)
func(federationDomainIssuer string, symmetricKey []byte) {
plog.Debug("setting state encryption key", "issuer", federationDomainIssuer)
secretCache.SetStateEncoderBlockKey(federationDomainIssuer, symmetricKey)
},
),
kubeClient,
@ -225,7 +225,7 @@ func startControllers(
upstreamwatcher.New(
dynamicUpstreamIDPProvider,
pinnipedClient,
pinnipedInformers.IDP().V1alpha1().UpstreamOIDCProviders(),
pinnipedInformers.IDP().V1alpha1().OIDCIdentityProviders(),
kubeInformers.Core().V1().Secrets(),
klogr.New()),
singletonWorker)

View File

@ -59,7 +59,7 @@ The most common ways are:
1. Or, define a [TCP LoadBalancer Service](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer)
which is a layer 4 load balancer and does not terminate TLS. In this case, the Supervisor app will need to be
configured with TLS certificates and will terminate the TLS connection itself (see the section about OIDCProvider
configured with TLS certificates and will terminate the TLS connection itself (see the section about FederationDomain
below). The LoadBalancer Service should be configured to use the HTTPS port 443 of the Supervisor pods as its `targetPort`.
*Warning:* Do not expose the Supervisor's port 8080 to the public. It would not be secure for the OIDC protocol
@ -132,12 +132,12 @@ spec:
### Configuring the Supervisor to Act as an OIDC Provider
The Supervisor can be configured as an OIDC provider by creating `OIDCProvider` resources
The Supervisor can be configured as an OIDC provider by creating `FederationDomain` resources
in the same namespace where the Supervisor app was installed. For example:
```yaml
apiVersion: config.supervisor.pinniped.dev/v1alpha1
kind: OIDCProvider
kind: FederationDomain
metadata:
name: my-provider
# Assuming that this is the namespace where the supervisor was installed. This is the default in install-supervisor.yaml.
@ -156,12 +156,12 @@ spec:
#### Configuring TLS for the Supervisor OIDC Endpoints
If you have terminated TLS outside the app, for example using an Ingress with TLS certificates, then you do not need to
configure TLS certificates on the OIDCProvider.
configure TLS certificates on the FederationDomain.
If you are using a LoadBalancer Service to expose the Supervisor app outside your cluster, then you will
also need to configure the Supervisor app to terminate TLS. There are two places to configure TLS certificates:
1. Each `OIDCProvider` can be configured with TLS certificates, using the `spec.tls.secretName` field.
1. Each `FederationDomain` can be configured with TLS certificates, using the `spec.tls.secretName` field.
1. The default TLS certificate for all OIDC providers can be configured by creating a Secret called
`pinniped-supervisor-default-tls-certificate` in the same namespace in which the Supervisor was installed.

View File

@ -6,22 +6,22 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
creationTimestamp: null
name: oidcproviders.config.supervisor.pinniped.dev
name: federationdomains.config.supervisor.pinniped.dev
spec:
group: config.supervisor.pinniped.dev
names:
categories:
- pinniped
kind: OIDCProvider
listKind: OIDCProviderList
plural: oidcproviders
singular: oidcprovider
kind: FederationDomain
listKind: FederationDomainList
plural: federationdomains
singular: federationdomain
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: OIDCProvider describes the configuration of an OIDC provider.
description: FederationDomain describes the configuration of an OIDC provider.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
@ -50,14 +50,14 @@ spec:
minLength: 1
type: string
tls:
description: TLS configures how this OIDCProvider is served over Transport
Layer Security (TLS).
description: TLS configures how this FederationDomain is served over
Transport Layer Security (TLS).
properties:
secretName:
description: "SecretName is an optional name of a Secret in the
same namespace, of type `kubernetes.io/tls`, which contains
the TLS serving certificate for the HTTPS endpoints served by
this OIDCProvider. When provided, the TLS Secret named here
this FederationDomain. When provided, the TLS Secret named here
must contain keys named `tls.crt` and `tls.key` that contain
the certificate and private key to use for TLS. \n Server Name
Indication (SNI) is an extension to the Transport Layer Security

View File

@ -6,7 +6,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
creationTimestamp: null
name: upstreamoidcproviders.idp.supervisor.pinniped.dev
name: oidcidentityproviders.idp.supervisor.pinniped.dev
spec:
group: idp.supervisor.pinniped.dev
names:
@ -14,10 +14,10 @@ spec:
- pinniped
- pinniped-idp
- pinniped-idps
kind: UpstreamOIDCProvider
listKind: UpstreamOIDCProviderList
plural: upstreamoidcproviders
singular: upstreamoidcprovider
kind: OIDCIdentityProvider
listKind: OIDCIdentityProviderList
plural: oidcidentityproviders
singular: oidcidentityprovider
scope: Namespaced
versions:
- additionalPrinterColumns:
@ -33,7 +33,7 @@ spec:
name: v1alpha1
schema:
openAPIV3Schema:
description: UpstreamOIDCProvider describes the configuration of an upstream
description: OIDCIdentityProvider describes the configuration of an upstream
OpenID Connect identity provider.
properties:
apiVersion:
@ -183,7 +183,7 @@ spec:
x-kubernetes-list-type: map
phase:
default: Pending
description: Phase summarizes the overall status of the UpstreamOIDCProvider.
description: Phase summarizes the overall status of the OIDCIdentityProvider.
enum:
- Pending
- Ready

View File

@ -17,13 +17,13 @@ rules:
resources: [secrets]
verbs: [create, get, list, patch, update, watch, delete]
- apiGroups: [config.supervisor.pinniped.dev]
resources: [oidcproviders]
resources: [federationdomains]
verbs: [update, get, list, watch]
- apiGroups: [idp.supervisor.pinniped.dev]
resources: [upstreamoidcproviders]
resources: [oidcidentityproviders]
verbs: [get, list, watch]
- apiGroups: [idp.supervisor.pinniped.dev]
resources: [upstreamoidcproviders/status]
resources: [oidcidentityproviders/status]
verbs: [get, patch, update]
#! We want to be able to read pods/replicasets/deployment so we can learn who our deployment is to set
#! as an owner reference.

View File

@ -4,13 +4,13 @@
#@ load("@ytt:overlay", "overlay")
#@ load("helpers.lib.yaml", "labels")
#@overlay/match by=overlay.subset({"kind": "CustomResourceDefinition", "metadata":{"name":"oidcproviders.config.supervisor.pinniped.dev"}}), expects=1
#@overlay/match by=overlay.subset({"kind": "CustomResourceDefinition", "metadata":{"name":"federationdomains.config.supervisor.pinniped.dev"}}), expects=1
---
metadata:
#@overlay/match missing_ok=True
labels: #@ labels()
#@overlay/match by=overlay.subset({"kind": "CustomResourceDefinition", "metadata":{"name":"upstreamoidcproviders.idp.supervisor.pinniped.dev"}}), expects=1
#@overlay/match by=overlay.subset({"kind": "CustomResourceDefinition", "metadata":{"name":"oidcidentityproviders.idp.supervisor.pinniped.dev"}}), expects=1
---
metadata:
#@overlay/match missing_ok=True

View File

@ -301,14 +301,14 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcprovider"]
==== OIDCProvider
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomain"]
==== FederationDomain
OIDCProvider describes the configuration of an OIDC provider.
FederationDomain describes the configuration of an OIDC provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcproviderlist[$$OIDCProviderList$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomainlist[$$FederationDomainList$$]
****
[cols="25a,75a", options="header"]
@ -316,21 +316,21 @@ OIDCProvider describes the configuration of an OIDC provider.
| 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-supervisor-config-v1alpha1-oidcproviderspec[$$OIDCProviderSpec$$]__ | Spec of the OIDC provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcproviderstatus[$$OIDCProviderStatus$$]__ | Status of the OIDC provider.
| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomainspec[$$FederationDomainSpec$$]__ | Spec of the OIDC provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomainstatus[$$FederationDomainStatus$$]__ | Status of the OIDC provider.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcprovidersecrets"]
==== OIDCProviderSecrets
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomainsecrets"]
==== FederationDomainSecrets
OIDCProviderSecrets holds information about this OIDC Provider's secrets.
FederationDomainSecrets holds information about this OIDC Provider's secrets.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcproviderstatus[$$OIDCProviderStatus$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomainstatus[$$FederationDomainStatus$$]
****
[cols="25a,75a", options="header"]
@ -343,14 +343,14 @@ OIDCProviderSecrets holds information about this OIDC Provider's secrets.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcproviderspec"]
==== OIDCProviderSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomainspec"]
==== FederationDomainSpec
OIDCProviderSpec is a struct that describes an OIDC Provider.
FederationDomainSpec is a struct that describes an OIDC Provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcprovider[$$OIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomain[$$FederationDomain$$]
****
[cols="25a,75a", options="header"]
@ -358,44 +358,44 @@ OIDCProviderSpec is a struct that describes an OIDC Provider.
| Field | Description
| *`issuer`* __string__ | Issuer is the OIDC Provider's issuer, per the OIDC Discovery Metadata document, as well as the identifier that it will use for the iss claim in issued JWTs. This field will also be used as the base URL for any endpoints used by the OIDC Provider (e.g., if your issuer is https://example.com/foo, then your authorization endpoint will look like https://example.com/foo/some/path/to/auth/endpoint).
See https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.3 for more information.
| *`tls`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcprovidertlsspec[$$OIDCProviderTLSSpec$$]__ | TLS configures how this OIDCProvider is served over Transport Layer Security (TLS).
| *`tls`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomaintlsspec[$$FederationDomainTLSSpec$$]__ | TLS configures how this FederationDomain is served over Transport Layer Security (TLS).
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcproviderstatus"]
==== OIDCProviderStatus
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomainstatus"]
==== FederationDomainStatus
OIDCProviderStatus is a struct that describes the actual state of an OIDC Provider.
FederationDomainStatus is a struct that describes the actual state of an OIDC Provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcprovider[$$OIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomain[$$FederationDomain$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`status`* __OIDCProviderStatusCondition__ | Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure.
| *`status`* __FederationDomainStatusCondition__ | Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure.
| *`message`* __string__ | Message provides human-readable details about the Status.
| *`lastUpdateTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#time-v1-meta[$$Time$$]__ | LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get around some undesirable behavior with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811).
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcprovidersecrets[$$OIDCProviderSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcprovidertlsspec"]
==== OIDCProviderTLSSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomaintlsspec"]
==== FederationDomainTLSSpec
OIDCProviderTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
FederationDomainTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcproviderspec[$$OIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomainspec[$$FederationDomainSpec$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`secretName`* __string__ | SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains the TLS serving certificate for the HTTPS endpoints served by this OIDCProvider. When provided, the TLS Secret named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use for TLS.
| *`secretName`* __string__ | SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains the TLS serving certificate for the HTTPS endpoints served by this FederationDomain. When provided, the TLS Secret named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use for TLS.
Server Name Indication (SNI) is an extension to the Transport Layer Security (TLS) supported by all major browsers.
SecretName is required if you would like to use different TLS certificates for issuers of different hostnames. SNI requests do not include port numbers, so all issuers with the same DNS hostname must use the same SecretName value even if they have different port numbers.
SecretName is not required when you would like to use only the HTTP endpoints (e.g. when terminating TLS at an Ingress). It is also not required when you would like all requests to this OIDC Provider's HTTPS endpoints to use the default TLS certificate, which is configured elsewhere.
@ -418,7 +418,7 @@ Condition status of a resource (mirrored from the metav1.Condition type added in
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcproviderstatus[$$UpstreamOIDCProviderStatus$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderstatus[$$OIDCIdentityProviderStatus$$]
****
[cols="25a,75a", options="header"]
@ -440,7 +440,7 @@ OIDCAuthorizationConfig provides information about how to form the OAuth2 author
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
@ -457,7 +457,7 @@ OIDCClaims provides a mapping from upstream claims into identities.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
@ -475,7 +475,7 @@ OIDCClient contains information about an OIDC client (e.g., client ID and client
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
@ -485,31 +485,14 @@ OIDCClient contains information about an OIDC client (e.g., client ID and client
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-tlsspec"]
==== TLSSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityprovider"]
==== OIDCIdentityProvider
Configuration for TLS parameters related to identity provider integration.
OIDCIdentityProvider describes the configuration of an upstream OpenID Connect identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`certificateAuthorityData`* __string__ | X.509 Certificate Authority (base64-encoded PEM bundle). If omitted, a default set of system roots will be trusted.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcprovider"]
==== UpstreamOIDCProvider
UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcproviderlist[$$UpstreamOIDCProviderList$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderlist[$$OIDCIdentityProviderList$$]
****
[cols="25a,75a", options="header"]
@ -517,21 +500,21 @@ UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect i
| 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-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]__ | Spec for configuring the identity provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcproviderstatus[$$UpstreamOIDCProviderStatus$$]__ | Status of the identity provider.
| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]__ | Spec for configuring the identity provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderstatus[$$OIDCIdentityProviderStatus$$]__ | Status of the identity provider.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec"]
==== UpstreamOIDCProviderSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec"]
==== OIDCIdentityProviderSpec
Spec for configuring an OIDC identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcprovider[$$UpstreamOIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityprovider[$$OIDCIdentityProvider$$]
****
[cols="25a,75a", options="header"]
@ -545,24 +528,41 @@ Spec for configuring an OIDC identity provider.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcproviderstatus"]
==== UpstreamOIDCProviderStatus
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderstatus"]
==== OIDCIdentityProviderStatus
Status of an OIDC identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-upstreamoidcprovider[$$UpstreamOIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityprovider[$$OIDCIdentityProvider$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`phase`* __UpstreamOIDCProviderPhase__ | Phase summarizes the overall status of the UpstreamOIDCProvider.
| *`phase`* __OIDCIdentityProviderPhase__ | Phase summarizes the overall status of the OIDCIdentityProvider.
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-condition[$$Condition$$]__ | Represents the observations of an identity provider's current state.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-tlsspec"]
==== TLSSpec
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`certificateAuthorityData`* __string__ | X.509 Certificate Authority (base64-encoded PEM bundle). If omitted, a default set of system roots will be trusted.
|===
[id="{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1"]
=== login.concierge.pinniped.dev/v1alpha1

View File

@ -30,8 +30,8 @@ func init() {
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&OIDCProvider{},
&OIDCProviderList{},
&FederationDomain{},
&FederationDomainList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View File

@ -9,19 +9,19 @@ import (
)
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid;SameIssuerHostMustUseSameSecret
type OIDCProviderStatusCondition string
type FederationDomainStatusCondition string
const (
SuccessOIDCProviderStatusCondition = OIDCProviderStatusCondition("Success")
DuplicateOIDCProviderStatusCondition = OIDCProviderStatusCondition("Duplicate")
SameIssuerHostMustUseSameSecretOIDCProviderStatusCondition = OIDCProviderStatusCondition("SameIssuerHostMustUseSameSecret")
InvalidOIDCProviderStatusCondition = OIDCProviderStatusCondition("Invalid")
SuccessFederationDomainStatusCondition = FederationDomainStatusCondition("Success")
DuplicateFederationDomainStatusCondition = FederationDomainStatusCondition("Duplicate")
SameIssuerHostMustUseSameSecretFederationDomainStatusCondition = FederationDomainStatusCondition("SameIssuerHostMustUseSameSecret")
InvalidFederationDomainStatusCondition = FederationDomainStatusCondition("Invalid")
)
// OIDCProviderTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
type OIDCProviderTLSSpec struct {
// FederationDomainTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
type FederationDomainTLSSpec struct {
// SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains
// the TLS serving certificate for the HTTPS endpoints served by this OIDCProvider. When provided, the TLS Secret
// the TLS serving certificate for the HTTPS endpoints served by this FederationDomain. When provided, the TLS Secret
// named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use
// for TLS.
//
@ -41,8 +41,8 @@ type OIDCProviderTLSSpec struct {
SecretName string `json:"secretName,omitempty"`
}
// OIDCProviderSpec is a struct that describes an OIDC Provider.
type OIDCProviderSpec struct {
// FederationDomainSpec is a struct that describes an OIDC Provider.
type FederationDomainSpec struct {
// Issuer is the OIDC Provider's issuer, per the OIDC Discovery Metadata document, as well as the
// identifier that it will use for the iss claim in issued JWTs. This field will also be used as
// the base URL for any endpoints used by the OIDC Provider (e.g., if your issuer is
@ -54,13 +54,13 @@ type OIDCProviderSpec struct {
// +kubebuilder:validation:MinLength=1
Issuer string `json:"issuer"`
// TLS configures how this OIDCProvider is served over Transport Layer Security (TLS).
// TLS configures how this FederationDomain is served over Transport Layer Security (TLS).
// +optional
TLS *OIDCProviderTLSSpec `json:"tls,omitempty"`
TLS *FederationDomainTLSSpec `json:"tls,omitempty"`
}
// OIDCProviderSecrets holds information about this OIDC Provider's secrets.
type OIDCProviderSecrets struct {
// FederationDomainSecrets holds information about this OIDC Provider's secrets.
type FederationDomainSecrets struct {
// JWKS holds the name of the corev1.Secret in which this OIDC Provider's signing/verification keys are
// stored. If it is empty, then the signing/verification keys are either unknown or they don't
// exist.
@ -83,12 +83,12 @@ type OIDCProviderSecrets struct {
StateEncryptionKey corev1.LocalObjectReference `json:"stateEncryptionKey,omitempty"`
}
// OIDCProviderStatus is a struct that describes the actual state of an OIDC Provider.
type OIDCProviderStatus struct {
// FederationDomainStatus is a struct that describes the actual state of an OIDC Provider.
type FederationDomainStatus struct {
// Status holds an enum that describes the state of this OIDC Provider. Note that this Status can
// represent success or failure.
// +optional
Status OIDCProviderStatusCondition `json:"status,omitempty"`
Status FederationDomainStatusCondition `json:"status,omitempty"`
// Message provides human-readable details about the Status.
// +optional
@ -102,29 +102,29 @@ type OIDCProviderStatus struct {
// Secrets contains information about this OIDC Provider's secrets.
// +optional
Secrets OIDCProviderSecrets `json:"secrets,omitempty"`
Secrets FederationDomainSecrets `json:"secrets,omitempty"`
}
// OIDCProvider describes the configuration of an OIDC provider.
// FederationDomain describes the configuration of an OIDC provider.
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=pinniped
type OIDCProvider struct {
type FederationDomain struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec of the OIDC provider.
Spec OIDCProviderSpec `json:"spec"`
Spec FederationDomainSpec `json:"spec"`
// Status of the OIDC provider.
Status OIDCProviderStatus `json:"status,omitempty"`
Status FederationDomainStatus `json:"status,omitempty"`
}
// List of OIDCProvider objects.
// List of FederationDomain objects.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type OIDCProviderList struct {
type FederationDomainList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []OIDCProvider `json:"items"`
Items []FederationDomain `json:"items"`
}

View File

@ -12,7 +12,7 @@ import (
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProvider) DeepCopyInto(out *OIDCProvider) {
func (in *FederationDomain) DeepCopyInto(out *FederationDomain) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
@ -21,18 +21,18 @@ func (in *OIDCProvider) DeepCopyInto(out *OIDCProvider) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProvider.
func (in *OIDCProvider) DeepCopy() *OIDCProvider {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomain.
func (in *FederationDomain) DeepCopy() *FederationDomain {
if in == nil {
return nil
}
out := new(OIDCProvider)
out := new(FederationDomain)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCProvider) DeepCopyObject() runtime.Object {
func (in *FederationDomain) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
@ -40,13 +40,13 @@ func (in *OIDCProvider) DeepCopyObject() runtime.Object {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderList) DeepCopyInto(out *OIDCProviderList) {
func (in *FederationDomainList) DeepCopyInto(out *FederationDomainList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]OIDCProvider, len(*in))
*out = make([]FederationDomain, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -54,18 +54,18 @@ func (in *OIDCProviderList) DeepCopyInto(out *OIDCProviderList) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderList.
func (in *OIDCProviderList) DeepCopy() *OIDCProviderList {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainList.
func (in *FederationDomainList) DeepCopy() *FederationDomainList {
if in == nil {
return nil
}
out := new(OIDCProviderList)
out := new(FederationDomainList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCProviderList) DeepCopyObject() runtime.Object {
func (in *FederationDomainList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
@ -73,7 +73,7 @@ func (in *OIDCProviderList) DeepCopyObject() runtime.Object {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderSecrets) DeepCopyInto(out *OIDCProviderSecrets) {
func (in *FederationDomainSecrets) DeepCopyInto(out *FederationDomainSecrets) {
*out = *in
out.JWKS = in.JWKS
out.TokenSigningKey = in.TokenSigningKey
@ -82,39 +82,39 @@ func (in *OIDCProviderSecrets) DeepCopyInto(out *OIDCProviderSecrets) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderSecrets.
func (in *OIDCProviderSecrets) DeepCopy() *OIDCProviderSecrets {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainSecrets.
func (in *FederationDomainSecrets) DeepCopy() *FederationDomainSecrets {
if in == nil {
return nil
}
out := new(OIDCProviderSecrets)
out := new(FederationDomainSecrets)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderSpec) DeepCopyInto(out *OIDCProviderSpec) {
func (in *FederationDomainSpec) DeepCopyInto(out *FederationDomainSpec) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(OIDCProviderTLSSpec)
*out = new(FederationDomainTLSSpec)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderSpec.
func (in *OIDCProviderSpec) DeepCopy() *OIDCProviderSpec {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainSpec.
func (in *FederationDomainSpec) DeepCopy() *FederationDomainSpec {
if in == nil {
return nil
}
out := new(OIDCProviderSpec)
out := new(FederationDomainSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderStatus) DeepCopyInto(out *OIDCProviderStatus) {
func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
*out = *in
if in.LastUpdateTime != nil {
in, out := &in.LastUpdateTime, &out.LastUpdateTime
@ -124,28 +124,28 @@ func (in *OIDCProviderStatus) DeepCopyInto(out *OIDCProviderStatus) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderStatus.
func (in *OIDCProviderStatus) DeepCopy() *OIDCProviderStatus {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainStatus.
func (in *FederationDomainStatus) DeepCopy() *FederationDomainStatus {
if in == nil {
return nil
}
out := new(OIDCProviderStatus)
out := new(FederationDomainStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderTLSSpec) DeepCopyInto(out *OIDCProviderTLSSpec) {
func (in *FederationDomainTLSSpec) DeepCopyInto(out *FederationDomainTLSSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderTLSSpec.
func (in *OIDCProviderTLSSpec) DeepCopy() *OIDCProviderTLSSpec {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainTLSSpec.
func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec {
if in == nil {
return nil
}
out := new(OIDCProviderTLSSpec)
out := new(FederationDomainTLSSpec)
in.DeepCopyInto(out)
return out
}

View File

@ -30,8 +30,8 @@ func init() {
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&UpstreamOIDCProvider{},
&UpstreamOIDCProviderList{},
&OIDCIdentityProvider{},
&OIDCIdentityProviderList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View File

@ -7,25 +7,25 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type UpstreamOIDCProviderPhase string
type OIDCIdentityProviderPhase string
const (
// PhasePending is the default phase for newly-created UpstreamOIDCProvider resources.
PhasePending UpstreamOIDCProviderPhase = "Pending"
// PhasePending is the default phase for newly-created OIDCIdentityProvider resources.
PhasePending OIDCIdentityProviderPhase = "Pending"
// PhaseReady is the phase for an UpstreamOIDCProvider resource in a healthy state.
PhaseReady UpstreamOIDCProviderPhase = "Ready"
// PhaseReady is the phase for an OIDCIdentityProvider resource in a healthy state.
PhaseReady OIDCIdentityProviderPhase = "Ready"
// PhaseError is the phase for an UpstreamOIDCProvider in an unhealthy state.
PhaseError UpstreamOIDCProviderPhase = "Error"
// PhaseError is the phase for an OIDCIdentityProvider in an unhealthy state.
PhaseError OIDCIdentityProviderPhase = "Error"
)
// Status of an OIDC identity provider.
type UpstreamOIDCProviderStatus struct {
// Phase summarizes the overall status of the UpstreamOIDCProvider.
type OIDCIdentityProviderStatus struct {
// Phase summarizes the overall status of the OIDCIdentityProvider.
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Ready;Error
Phase UpstreamOIDCProviderPhase `json:"phase,omitempty"`
Phase OIDCIdentityProviderPhase `json:"phase,omitempty"`
// Represents the observations of an identity provider's current state.
// +patchMergeKey=type
@ -68,7 +68,7 @@ type OIDCClient struct {
}
// Spec for configuring an OIDC identity provider.
type UpstreamOIDCProviderSpec struct {
type OIDCIdentityProviderSpec struct {
// Issuer is the issuer URL of this OIDC identity provider, i.e., where to fetch
// /.well-known/openid-configuration.
// +kubebuilder:validation:MinLength=1
@ -94,7 +94,7 @@ type UpstreamOIDCProviderSpec struct {
Client OIDCClient `json:"client"`
}
// UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect identity provider.
// OIDCIdentityProvider describes the configuration of an upstream OpenID Connect identity provider.
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=pinniped;pinniped-idp;pinniped-idps
@ -102,22 +102,22 @@ type UpstreamOIDCProviderSpec struct {
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:subresource:status
type UpstreamOIDCProvider struct {
type OIDCIdentityProvider struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec for configuring the identity provider.
Spec UpstreamOIDCProviderSpec `json:"spec"`
Spec OIDCIdentityProviderSpec `json:"spec"`
// Status of the identity provider.
Status UpstreamOIDCProviderStatus `json:"status,omitempty"`
Status OIDCIdentityProviderStatus `json:"status,omitempty"`
}
// List of UpstreamOIDCProvider objects.
// List of OIDCIdentityProvider objects.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type UpstreamOIDCProviderList struct {
type OIDCIdentityProviderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []UpstreamOIDCProvider `json:"items"`
Items []OIDCIdentityProvider `json:"items"`
}

View File

@ -81,6 +81,114 @@ func (in *OIDCClient) DeepCopy() *OIDCClient {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProvider) DeepCopyInto(out *OIDCIdentityProvider) {
*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 OIDCIdentityProvider.
func (in *OIDCIdentityProvider) DeepCopy() *OIDCIdentityProvider {
if in == nil {
return nil
}
out := new(OIDCIdentityProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCIdentityProvider) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProviderList) DeepCopyInto(out *OIDCIdentityProviderList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]OIDCIdentityProvider, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityProviderList.
func (in *OIDCIdentityProviderList) DeepCopy() *OIDCIdentityProviderList {
if in == nil {
return nil
}
out := new(OIDCIdentityProviderList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCIdentityProviderList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProviderSpec) DeepCopyInto(out *OIDCIdentityProviderSpec) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(TLSSpec)
**out = **in
}
in.AuthorizationConfig.DeepCopyInto(&out.AuthorizationConfig)
out.Claims = in.Claims
out.Client = in.Client
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityProviderSpec.
func (in *OIDCIdentityProviderSpec) DeepCopy() *OIDCIdentityProviderSpec {
if in == nil {
return nil
}
out := new(OIDCIdentityProviderSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProviderStatus) DeepCopyInto(out *OIDCIdentityProviderStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityProviderStatus.
func (in *OIDCIdentityProviderStatus) DeepCopy() *OIDCIdentityProviderStatus {
if in == nil {
return nil
}
out := new(OIDCIdentityProviderStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TLSSpec) DeepCopyInto(out *TLSSpec) {
*out = *in
@ -96,111 +204,3 @@ func (in *TLSSpec) DeepCopy() *TLSSpec {
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProvider) DeepCopyInto(out *UpstreamOIDCProvider) {
*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 UpstreamOIDCProvider.
func (in *UpstreamOIDCProvider) DeepCopy() *UpstreamOIDCProvider {
if in == nil {
return nil
}
out := new(UpstreamOIDCProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *UpstreamOIDCProvider) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProviderList) DeepCopyInto(out *UpstreamOIDCProviderList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]UpstreamOIDCProvider, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOIDCProviderList.
func (in *UpstreamOIDCProviderList) DeepCopy() *UpstreamOIDCProviderList {
if in == nil {
return nil
}
out := new(UpstreamOIDCProviderList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *UpstreamOIDCProviderList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProviderSpec) DeepCopyInto(out *UpstreamOIDCProviderSpec) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(TLSSpec)
**out = **in
}
in.AuthorizationConfig.DeepCopyInto(&out.AuthorizationConfig)
out.Claims = in.Claims
out.Client = in.Client
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOIDCProviderSpec.
func (in *UpstreamOIDCProviderSpec) DeepCopy() *UpstreamOIDCProviderSpec {
if in == nil {
return nil
}
out := new(UpstreamOIDCProviderSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProviderStatus) DeepCopyInto(out *UpstreamOIDCProviderStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOIDCProviderStatus.
func (in *UpstreamOIDCProviderStatus) DeepCopy() *UpstreamOIDCProviderStatus {
if in == nil {
return nil
}
out := new(UpstreamOIDCProviderStatus)
in.DeepCopyInto(out)
return out
}

View File

@ -13,7 +13,7 @@ import (
type ConfigV1alpha1Interface interface {
RESTClient() rest.Interface
OIDCProvidersGetter
FederationDomainsGetter
}
// ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group.
@ -21,8 +21,8 @@ type ConfigV1alpha1Client struct {
restClient rest.Interface
}
func (c *ConfigV1alpha1Client) OIDCProviders(namespace string) OIDCProviderInterface {
return newOIDCProviders(c, namespace)
func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDomainInterface {
return newFederationDomains(c, namespace)
}
// NewForConfig creates a new ConfigV1alpha1Client for the given config.

View File

@ -15,8 +15,8 @@ type FakeConfigV1alpha1 struct {
*testing.Fake
}
func (c *FakeConfigV1alpha1) OIDCProviders(namespace string) v1alpha1.OIDCProviderInterface {
return &FakeOIDCProviders{c, namespace}
func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.FederationDomainInterface {
return &FakeFederationDomains{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate

View File

@ -0,0 +1,127 @@
// 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/supervisor/config/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"
)
// FakeFederationDomains implements FederationDomainInterface
type FakeFederationDomains struct {
Fake *FakeConfigV1alpha1
ns string
}
var federationdomainsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "federationdomains"}
var federationdomainsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "FederationDomain"}
// Get takes name of the federationDomain, and returns the corresponding federationDomain object, and an error if there is any.
func (c *FakeFederationDomains) Get(name string, options v1.GetOptions) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(federationdomainsResource, c.ns, name), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}
// List takes label and field selectors, and returns the list of FederationDomains that match those selectors.
func (c *FakeFederationDomains) List(opts v1.ListOptions) (result *v1alpha1.FederationDomainList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(federationdomainsResource, federationdomainsKind, c.ns, opts), &v1alpha1.FederationDomainList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.FederationDomainList{ListMeta: obj.(*v1alpha1.FederationDomainList).ListMeta}
for _, item := range obj.(*v1alpha1.FederationDomainList).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 federationDomains.
func (c *FakeFederationDomains) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(federationdomainsResource, c.ns, opts))
}
// Create takes the representation of a federationDomain and creates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *FakeFederationDomains) Create(federationDomain *v1alpha1.FederationDomain) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(federationdomainsResource, c.ns, federationDomain), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}
// Update takes the representation of a federationDomain and updates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *FakeFederationDomains) Update(federationDomain *v1alpha1.FederationDomain) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(federationdomainsResource, c.ns, federationDomain), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), 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 *FakeFederationDomains) UpdateStatus(federationDomain *v1alpha1.FederationDomain) (*v1alpha1.FederationDomain, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(federationdomainsResource, "status", c.ns, federationDomain), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}
// Delete takes name of the federationDomain and deletes it. Returns an error if one occurs.
func (c *FakeFederationDomains) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(federationdomainsResource, c.ns, name), &v1alpha1.FederationDomain{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeFederationDomains) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(federationdomainsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.FederationDomainList{})
return err
}
// Patch applies the patch and returns the patched federationDomain.
func (c *FakeFederationDomains) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(federationdomainsResource, c.ns, name, pt, data, subresources...), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}

View File

@ -1,127 +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/supervisor/config/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"
)
// FakeOIDCProviders implements OIDCProviderInterface
type FakeOIDCProviders struct {
Fake *FakeConfigV1alpha1
ns string
}
var oidcprovidersResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcproviders"}
var oidcprovidersKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCProvider"}
// Get takes name of the oIDCProvider, and returns the corresponding oIDCProvider object, and an error if there is any.
func (c *FakeOIDCProviders) Get(name string, options v1.GetOptions) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(oidcprovidersResource, c.ns, name), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}
// List takes label and field selectors, and returns the list of OIDCProviders that match those selectors.
func (c *FakeOIDCProviders) List(opts v1.ListOptions) (result *v1alpha1.OIDCProviderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(oidcprovidersResource, oidcprovidersKind, c.ns, opts), &v1alpha1.OIDCProviderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.OIDCProviderList{ListMeta: obj.(*v1alpha1.OIDCProviderList).ListMeta}
for _, item := range obj.(*v1alpha1.OIDCProviderList).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 oIDCProviders.
func (c *FakeOIDCProviders) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(oidcprovidersResource, c.ns, opts))
}
// Create takes the representation of a oIDCProvider and creates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *FakeOIDCProviders) Create(oIDCProvider *v1alpha1.OIDCProvider) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(oidcprovidersResource, c.ns, oIDCProvider), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}
// Update takes the representation of a oIDCProvider and updates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *FakeOIDCProviders) Update(oIDCProvider *v1alpha1.OIDCProvider) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(oidcprovidersResource, c.ns, oIDCProvider), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), 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 *FakeOIDCProviders) UpdateStatus(oIDCProvider *v1alpha1.OIDCProvider) (*v1alpha1.OIDCProvider, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(oidcprovidersResource, "status", c.ns, oIDCProvider), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}
// Delete takes name of the oIDCProvider and deletes it. Returns an error if one occurs.
func (c *FakeOIDCProviders) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(oidcprovidersResource, c.ns, name), &v1alpha1.OIDCProvider{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeOIDCProviders) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(oidcprovidersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.OIDCProviderList{})
return err
}
// Patch applies the patch and returns the patched oIDCProvider.
func (c *FakeOIDCProviders) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(oidcprovidersResource, c.ns, name, pt, data, subresources...), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}

View File

@ -0,0 +1,178 @@
// 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/supervisor/config/v1alpha1"
scheme "go.pinniped.dev/generated/1.17/client/supervisor/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"
)
// FederationDomainsGetter has a method to return a FederationDomainInterface.
// A group's client should implement this interface.
type FederationDomainsGetter interface {
FederationDomains(namespace string) FederationDomainInterface
}
// FederationDomainInterface has methods to work with FederationDomain resources.
type FederationDomainInterface interface {
Create(*v1alpha1.FederationDomain) (*v1alpha1.FederationDomain, error)
Update(*v1alpha1.FederationDomain) (*v1alpha1.FederationDomain, error)
UpdateStatus(*v1alpha1.FederationDomain) (*v1alpha1.FederationDomain, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.FederationDomain, error)
List(opts v1.ListOptions) (*v1alpha1.FederationDomainList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.FederationDomain, err error)
FederationDomainExpansion
}
// federationDomains implements FederationDomainInterface
type federationDomains struct {
client rest.Interface
ns string
}
// newFederationDomains returns a FederationDomains
func newFederationDomains(c *ConfigV1alpha1Client, namespace string) *federationDomains {
return &federationDomains{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the federationDomain, and returns the corresponding federationDomain object, and an error if there is any.
func (c *federationDomains) Get(name string, options v1.GetOptions) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Get().
Namespace(c.ns).
Resource("federationdomains").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of FederationDomains that match those selectors.
func (c *federationDomains) List(opts v1.ListOptions) (result *v1alpha1.FederationDomainList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.FederationDomainList{}
err = c.client.Get().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested federationDomains.
func (c *federationDomains) 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().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a federationDomain and creates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *federationDomains) Create(federationDomain *v1alpha1.FederationDomain) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Post().
Namespace(c.ns).
Resource("federationdomains").
Body(federationDomain).
Do().
Into(result)
return
}
// Update takes the representation of a federationDomain and updates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *federationDomains) Update(federationDomain *v1alpha1.FederationDomain) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Put().
Namespace(c.ns).
Resource("federationdomains").
Name(federationDomain.Name).
Body(federationDomain).
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 *federationDomains) UpdateStatus(federationDomain *v1alpha1.FederationDomain) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Put().
Namespace(c.ns).
Resource("federationdomains").
Name(federationDomain.Name).
SubResource("status").
Body(federationDomain).
Do().
Into(result)
return
}
// Delete takes name of the federationDomain and deletes it. Returns an error if one occurs.
func (c *federationDomains) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("federationdomains").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *federationDomains) 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().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched federationDomain.
func (c *federationDomains) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("federationdomains").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@ -5,4 +5,4 @@
package v1alpha1
type OIDCProviderExpansion interface{}
type FederationDomainExpansion interface{}

View File

@ -1,178 +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/supervisor/config/v1alpha1"
scheme "go.pinniped.dev/generated/1.17/client/supervisor/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"
)
// OIDCProvidersGetter has a method to return a OIDCProviderInterface.
// A group's client should implement this interface.
type OIDCProvidersGetter interface {
OIDCProviders(namespace string) OIDCProviderInterface
}
// OIDCProviderInterface has methods to work with OIDCProvider resources.
type OIDCProviderInterface interface {
Create(*v1alpha1.OIDCProvider) (*v1alpha1.OIDCProvider, error)
Update(*v1alpha1.OIDCProvider) (*v1alpha1.OIDCProvider, error)
UpdateStatus(*v1alpha1.OIDCProvider) (*v1alpha1.OIDCProvider, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.OIDCProvider, error)
List(opts v1.ListOptions) (*v1alpha1.OIDCProviderList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OIDCProvider, err error)
OIDCProviderExpansion
}
// oIDCProviders implements OIDCProviderInterface
type oIDCProviders struct {
client rest.Interface
ns string
}
// newOIDCProviders returns a OIDCProviders
func newOIDCProviders(c *ConfigV1alpha1Client, namespace string) *oIDCProviders {
return &oIDCProviders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the oIDCProvider, and returns the corresponding oIDCProvider object, and an error if there is any.
func (c *oIDCProviders) Get(name string, options v1.GetOptions) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcproviders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of OIDCProviders that match those selectors.
func (c *oIDCProviders) List(opts v1.ListOptions) (result *v1alpha1.OIDCProviderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.OIDCProviderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested oIDCProviders.
func (c *oIDCProviders) 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().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a oIDCProvider and creates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *oIDCProviders) Create(oIDCProvider *v1alpha1.OIDCProvider) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Post().
Namespace(c.ns).
Resource("oidcproviders").
Body(oIDCProvider).
Do().
Into(result)
return
}
// Update takes the representation of a oIDCProvider and updates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *oIDCProviders) Update(oIDCProvider *v1alpha1.OIDCProvider) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcproviders").
Name(oIDCProvider.Name).
Body(oIDCProvider).
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 *oIDCProviders) UpdateStatus(oIDCProvider *v1alpha1.OIDCProvider) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcproviders").
Name(oIDCProvider.Name).
SubResource("status").
Body(oIDCProvider).
Do().
Into(result)
return
}
// Delete takes name of the oIDCProvider and deletes it. Returns an error if one occurs.
func (c *oIDCProviders) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("oidcproviders").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *oIDCProviders) 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().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched oIDCProvider.
func (c *oIDCProviders) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("oidcproviders").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@ -15,8 +15,8 @@ type FakeIDPV1alpha1 struct {
*testing.Fake
}
func (c *FakeIDPV1alpha1) UpstreamOIDCProviders(namespace string) v1alpha1.UpstreamOIDCProviderInterface {
return &FakeUpstreamOIDCProviders{c, namespace}
func (c *FakeIDPV1alpha1) OIDCIdentityProviders(namespace string) v1alpha1.OIDCIdentityProviderInterface {
return &FakeOIDCIdentityProviders{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate

View File

@ -0,0 +1,127 @@
// 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/supervisor/idp/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"
)
// FakeOIDCIdentityProviders implements OIDCIdentityProviderInterface
type FakeOIDCIdentityProviders struct {
Fake *FakeIDPV1alpha1
ns string
}
var oidcidentityprovidersResource = schema.GroupVersionResource{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcidentityproviders"}
var oidcidentityprovidersKind = schema.GroupVersionKind{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCIdentityProvider"}
// Get takes name of the oIDCIdentityProvider, and returns the corresponding oIDCIdentityProvider object, and an error if there is any.
func (c *FakeOIDCIdentityProviders) Get(name string, options v1.GetOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(oidcidentityprovidersResource, c.ns, name), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}
// List takes label and field selectors, and returns the list of OIDCIdentityProviders that match those selectors.
func (c *FakeOIDCIdentityProviders) List(opts v1.ListOptions) (result *v1alpha1.OIDCIdentityProviderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(oidcidentityprovidersResource, oidcidentityprovidersKind, c.ns, opts), &v1alpha1.OIDCIdentityProviderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.OIDCIdentityProviderList{ListMeta: obj.(*v1alpha1.OIDCIdentityProviderList).ListMeta}
for _, item := range obj.(*v1alpha1.OIDCIdentityProviderList).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 oIDCIdentityProviders.
func (c *FakeOIDCIdentityProviders) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(oidcidentityprovidersResource, c.ns, opts))
}
// Create takes the representation of a oIDCIdentityProvider and creates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *FakeOIDCIdentityProviders) Create(oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(oidcidentityprovidersResource, c.ns, oIDCIdentityProvider), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}
// Update takes the representation of a oIDCIdentityProvider and updates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *FakeOIDCIdentityProviders) Update(oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(oidcidentityprovidersResource, c.ns, oIDCIdentityProvider), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), 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 *FakeOIDCIdentityProviders) UpdateStatus(oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider) (*v1alpha1.OIDCIdentityProvider, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(oidcidentityprovidersResource, "status", c.ns, oIDCIdentityProvider), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}
// Delete takes name of the oIDCIdentityProvider and deletes it. Returns an error if one occurs.
func (c *FakeOIDCIdentityProviders) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(oidcidentityprovidersResource, c.ns, name), &v1alpha1.OIDCIdentityProvider{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeOIDCIdentityProviders) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(oidcidentityprovidersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.OIDCIdentityProviderList{})
return err
}
// Patch applies the patch and returns the patched oIDCIdentityProvider.
func (c *FakeOIDCIdentityProviders) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(oidcidentityprovidersResource, c.ns, name, pt, data, subresources...), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}

View File

@ -1,127 +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/supervisor/idp/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"
)
// FakeUpstreamOIDCProviders implements UpstreamOIDCProviderInterface
type FakeUpstreamOIDCProviders struct {
Fake *FakeIDPV1alpha1
ns string
}
var upstreamoidcprovidersResource = schema.GroupVersionResource{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "upstreamoidcproviders"}
var upstreamoidcprovidersKind = schema.GroupVersionKind{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "UpstreamOIDCProvider"}
// Get takes name of the upstreamOIDCProvider, and returns the corresponding upstreamOIDCProvider object, and an error if there is any.
func (c *FakeUpstreamOIDCProviders) Get(name string, options v1.GetOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(upstreamoidcprovidersResource, c.ns, name), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}
// List takes label and field selectors, and returns the list of UpstreamOIDCProviders that match those selectors.
func (c *FakeUpstreamOIDCProviders) List(opts v1.ListOptions) (result *v1alpha1.UpstreamOIDCProviderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(upstreamoidcprovidersResource, upstreamoidcprovidersKind, c.ns, opts), &v1alpha1.UpstreamOIDCProviderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.UpstreamOIDCProviderList{ListMeta: obj.(*v1alpha1.UpstreamOIDCProviderList).ListMeta}
for _, item := range obj.(*v1alpha1.UpstreamOIDCProviderList).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 upstreamOIDCProviders.
func (c *FakeUpstreamOIDCProviders) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(upstreamoidcprovidersResource, c.ns, opts))
}
// Create takes the representation of a upstreamOIDCProvider and creates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *FakeUpstreamOIDCProviders) Create(upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(upstreamoidcprovidersResource, c.ns, upstreamOIDCProvider), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}
// Update takes the representation of a upstreamOIDCProvider and updates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *FakeUpstreamOIDCProviders) Update(upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(upstreamoidcprovidersResource, c.ns, upstreamOIDCProvider), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), 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 *FakeUpstreamOIDCProviders) UpdateStatus(upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider) (*v1alpha1.UpstreamOIDCProvider, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(upstreamoidcprovidersResource, "status", c.ns, upstreamOIDCProvider), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}
// Delete takes name of the upstreamOIDCProvider and deletes it. Returns an error if one occurs.
func (c *FakeUpstreamOIDCProviders) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(upstreamoidcprovidersResource, c.ns, name), &v1alpha1.UpstreamOIDCProvider{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeUpstreamOIDCProviders) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(upstreamoidcprovidersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.UpstreamOIDCProviderList{})
return err
}
// Patch applies the patch and returns the patched upstreamOIDCProvider.
func (c *FakeUpstreamOIDCProviders) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(upstreamoidcprovidersResource, c.ns, name, pt, data, subresources...), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}

View File

@ -5,4 +5,4 @@
package v1alpha1
type UpstreamOIDCProviderExpansion interface{}
type OIDCIdentityProviderExpansion interface{}

View File

@ -13,7 +13,7 @@ import (
type IDPV1alpha1Interface interface {
RESTClient() rest.Interface
UpstreamOIDCProvidersGetter
OIDCIdentityProvidersGetter
}
// IDPV1alpha1Client is used to interact with features provided by the idp.supervisor.pinniped.dev group.
@ -21,8 +21,8 @@ type IDPV1alpha1Client struct {
restClient rest.Interface
}
func (c *IDPV1alpha1Client) UpstreamOIDCProviders(namespace string) UpstreamOIDCProviderInterface {
return newUpstreamOIDCProviders(c, namespace)
func (c *IDPV1alpha1Client) OIDCIdentityProviders(namespace string) OIDCIdentityProviderInterface {
return newOIDCIdentityProviders(c, namespace)
}
// NewForConfig creates a new IDPV1alpha1Client for the given config.

View File

@ -0,0 +1,178 @@
// 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/supervisor/idp/v1alpha1"
scheme "go.pinniped.dev/generated/1.17/client/supervisor/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"
)
// OIDCIdentityProvidersGetter has a method to return a OIDCIdentityProviderInterface.
// A group's client should implement this interface.
type OIDCIdentityProvidersGetter interface {
OIDCIdentityProviders(namespace string) OIDCIdentityProviderInterface
}
// OIDCIdentityProviderInterface has methods to work with OIDCIdentityProvider resources.
type OIDCIdentityProviderInterface interface {
Create(*v1alpha1.OIDCIdentityProvider) (*v1alpha1.OIDCIdentityProvider, error)
Update(*v1alpha1.OIDCIdentityProvider) (*v1alpha1.OIDCIdentityProvider, error)
UpdateStatus(*v1alpha1.OIDCIdentityProvider) (*v1alpha1.OIDCIdentityProvider, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.OIDCIdentityProvider, error)
List(opts v1.ListOptions) (*v1alpha1.OIDCIdentityProviderList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OIDCIdentityProvider, err error)
OIDCIdentityProviderExpansion
}
// oIDCIdentityProviders implements OIDCIdentityProviderInterface
type oIDCIdentityProviders struct {
client rest.Interface
ns string
}
// newOIDCIdentityProviders returns a OIDCIdentityProviders
func newOIDCIdentityProviders(c *IDPV1alpha1Client, namespace string) *oIDCIdentityProviders {
return &oIDCIdentityProviders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the oIDCIdentityProvider, and returns the corresponding oIDCIdentityProvider object, and an error if there is any.
func (c *oIDCIdentityProviders) Get(name string, options v1.GetOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of OIDCIdentityProviders that match those selectors.
func (c *oIDCIdentityProviders) List(opts v1.ListOptions) (result *v1alpha1.OIDCIdentityProviderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.OIDCIdentityProviderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested oIDCIdentityProviders.
func (c *oIDCIdentityProviders) 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().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a oIDCIdentityProvider and creates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *oIDCIdentityProviders) Create(oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Post().
Namespace(c.ns).
Resource("oidcidentityproviders").
Body(oIDCIdentityProvider).
Do().
Into(result)
return
}
// Update takes the representation of a oIDCIdentityProvider and updates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *oIDCIdentityProviders) Update(oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(oIDCIdentityProvider.Name).
Body(oIDCIdentityProvider).
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 *oIDCIdentityProviders) UpdateStatus(oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(oIDCIdentityProvider.Name).
SubResource("status").
Body(oIDCIdentityProvider).
Do().
Into(result)
return
}
// Delete takes name of the oIDCIdentityProvider and deletes it. Returns an error if one occurs.
func (c *oIDCIdentityProviders) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *oIDCIdentityProviders) 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().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched oIDCIdentityProvider.
func (c *oIDCIdentityProviders) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("oidcidentityproviders").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@ -1,178 +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/supervisor/idp/v1alpha1"
scheme "go.pinniped.dev/generated/1.17/client/supervisor/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"
)
// UpstreamOIDCProvidersGetter has a method to return a UpstreamOIDCProviderInterface.
// A group's client should implement this interface.
type UpstreamOIDCProvidersGetter interface {
UpstreamOIDCProviders(namespace string) UpstreamOIDCProviderInterface
}
// UpstreamOIDCProviderInterface has methods to work with UpstreamOIDCProvider resources.
type UpstreamOIDCProviderInterface interface {
Create(*v1alpha1.UpstreamOIDCProvider) (*v1alpha1.UpstreamOIDCProvider, error)
Update(*v1alpha1.UpstreamOIDCProvider) (*v1alpha1.UpstreamOIDCProvider, error)
UpdateStatus(*v1alpha1.UpstreamOIDCProvider) (*v1alpha1.UpstreamOIDCProvider, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.UpstreamOIDCProvider, error)
List(opts v1.ListOptions) (*v1alpha1.UpstreamOIDCProviderList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.UpstreamOIDCProvider, err error)
UpstreamOIDCProviderExpansion
}
// upstreamOIDCProviders implements UpstreamOIDCProviderInterface
type upstreamOIDCProviders struct {
client rest.Interface
ns string
}
// newUpstreamOIDCProviders returns a UpstreamOIDCProviders
func newUpstreamOIDCProviders(c *IDPV1alpha1Client, namespace string) *upstreamOIDCProviders {
return &upstreamOIDCProviders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the upstreamOIDCProvider, and returns the corresponding upstreamOIDCProvider object, and an error if there is any.
func (c *upstreamOIDCProviders) Get(name string, options v1.GetOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Get().
Namespace(c.ns).
Resource("upstreamoidcproviders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of UpstreamOIDCProviders that match those selectors.
func (c *upstreamOIDCProviders) List(opts v1.ListOptions) (result *v1alpha1.UpstreamOIDCProviderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.UpstreamOIDCProviderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("upstreamoidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested upstreamOIDCProviders.
func (c *upstreamOIDCProviders) 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().
Namespace(c.ns).
Resource("upstreamoidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a upstreamOIDCProvider and creates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *upstreamOIDCProviders) Create(upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Post().
Namespace(c.ns).
Resource("upstreamoidcproviders").
Body(upstreamOIDCProvider).
Do().
Into(result)
return
}
// Update takes the representation of a upstreamOIDCProvider and updates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *upstreamOIDCProviders) Update(upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("upstreamoidcproviders").
Name(upstreamOIDCProvider.Name).
Body(upstreamOIDCProvider).
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 *upstreamOIDCProviders) UpdateStatus(upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("upstreamoidcproviders").
Name(upstreamOIDCProvider.Name).
SubResource("status").
Body(upstreamOIDCProvider).
Do().
Into(result)
return
}
// Delete takes name of the upstreamOIDCProvider and deletes it. Returns an error if one occurs.
func (c *upstreamOIDCProviders) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("upstreamoidcproviders").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *upstreamOIDCProviders) 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().
Namespace(c.ns).
Resource("upstreamoidcproviders").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched upstreamOIDCProvider.
func (c *upstreamOIDCProviders) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("upstreamoidcproviders").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@ -0,0 +1,76 @@
// 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"
configv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/config/v1alpha1"
versioned "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned"
internalinterfaces "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/internalinterfaces"
v1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/listers/config/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"
)
// FederationDomainInformer provides access to a shared informer and lister for
// FederationDomains.
type FederationDomainInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.FederationDomainLister
}
type federationDomainInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewFederationDomainInformer constructs a new informer for FederationDomain 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 NewFederationDomainInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredFederationDomainInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredFederationDomainInformer constructs a new informer for FederationDomain 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 NewFilteredFederationDomainInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha1().FederationDomains(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha1().FederationDomains(namespace).Watch(options)
},
},
&configv1alpha1.FederationDomain{},
resyncPeriod,
indexers,
)
}
func (f *federationDomainInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredFederationDomainInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *federationDomainInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha1.FederationDomain{}, f.defaultInformer)
}
func (f *federationDomainInformer) Lister() v1alpha1.FederationDomainLister {
return v1alpha1.NewFederationDomainLister(f.Informer().GetIndexer())
}

View File

@ -11,8 +11,8 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
// OIDCProviders returns a OIDCProviderInformer.
OIDCProviders() OIDCProviderInformer
// FederationDomains returns a FederationDomainInformer.
FederationDomains() FederationDomainInformer
}
type version struct {
@ -26,7 +26,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// OIDCProviders returns a OIDCProviderInformer.
func (v *version) OIDCProviders() OIDCProviderInformer {
return &oIDCProviderInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
// FederationDomains returns a FederationDomainInformer.
func (v *version) FederationDomains() FederationDomainInformer {
return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@ -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 (
time "time"
configv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/config/v1alpha1"
versioned "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned"
internalinterfaces "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/internalinterfaces"
v1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/listers/config/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"
)
// OIDCProviderInformer provides access to a shared informer and lister for
// OIDCProviders.
type OIDCProviderInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.OIDCProviderLister
}
type oIDCProviderInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewOIDCProviderInformer constructs a new informer for OIDCProvider 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 NewOIDCProviderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredOIDCProviderInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredOIDCProviderInformer constructs a new informer for OIDCProvider 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 NewFilteredOIDCProviderInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha1().OIDCProviders(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha1().OIDCProviders(namespace).Watch(options)
},
},
&configv1alpha1.OIDCProvider{},
resyncPeriod,
indexers,
)
}
func (f *oIDCProviderInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredOIDCProviderInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *oIDCProviderInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha1.OIDCProvider{}, f.defaultInformer)
}
func (f *oIDCProviderInformer) Lister() v1alpha1.OIDCProviderLister {
return v1alpha1.NewOIDCProviderLister(f.Informer().GetIndexer())
}

View File

@ -41,12 +41,12 @@ func (f *genericInformer) Lister() cache.GenericLister {
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
switch resource {
// Group=config.supervisor.pinniped.dev, Version=v1alpha1
case v1alpha1.SchemeGroupVersion.WithResource("oidcproviders"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCProviders().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil
// Group=idp.supervisor.pinniped.dev, Version=v1alpha1
case idpv1alpha1.SchemeGroupVersion.WithResource("upstreamoidcproviders"):
return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().UpstreamOIDCProviders().Informer()}, nil
case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"):
return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil
}

View File

@ -11,8 +11,8 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
// UpstreamOIDCProviders returns a UpstreamOIDCProviderInformer.
UpstreamOIDCProviders() UpstreamOIDCProviderInformer
// OIDCIdentityProviders returns a OIDCIdentityProviderInformer.
OIDCIdentityProviders() OIDCIdentityProviderInformer
}
type version struct {
@ -26,7 +26,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// UpstreamOIDCProviders returns a UpstreamOIDCProviderInformer.
func (v *version) UpstreamOIDCProviders() UpstreamOIDCProviderInformer {
return &upstreamOIDCProviderInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
// OIDCIdentityProviders returns a OIDCIdentityProviderInformer.
func (v *version) OIDCIdentityProviders() OIDCIdentityProviderInformer {
return &oIDCIdentityProviderInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@ -18,59 +18,59 @@ import (
cache "k8s.io/client-go/tools/cache"
)
// UpstreamOIDCProviderInformer provides access to a shared informer and lister for
// UpstreamOIDCProviders.
type UpstreamOIDCProviderInformer interface {
// OIDCIdentityProviderInformer provides access to a shared informer and lister for
// OIDCIdentityProviders.
type OIDCIdentityProviderInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.UpstreamOIDCProviderLister
Lister() v1alpha1.OIDCIdentityProviderLister
}
type upstreamOIDCProviderInformer struct {
type oIDCIdentityProviderInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewUpstreamOIDCProviderInformer constructs a new informer for UpstreamOIDCProvider type.
// NewOIDCIdentityProviderInformer constructs a new informer for OIDCIdentityProvider 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 NewUpstreamOIDCProviderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredUpstreamOIDCProviderInformer(client, namespace, resyncPeriod, indexers, nil)
func NewOIDCIdentityProviderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredOIDCIdentityProviderInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredUpstreamOIDCProviderInformer constructs a new informer for UpstreamOIDCProvider type.
// NewFilteredOIDCIdentityProviderInformer constructs a new informer for OIDCIdentityProvider 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 NewFilteredUpstreamOIDCProviderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
func NewFilteredOIDCIdentityProviderInformer(client versioned.Interface, namespace string, 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.IDPV1alpha1().UpstreamOIDCProviders(namespace).List(options)
return client.IDPV1alpha1().OIDCIdentityProviders(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.IDPV1alpha1().UpstreamOIDCProviders(namespace).Watch(options)
return client.IDPV1alpha1().OIDCIdentityProviders(namespace).Watch(options)
},
},
&idpv1alpha1.UpstreamOIDCProvider{},
&idpv1alpha1.OIDCIdentityProvider{},
resyncPeriod,
indexers,
)
}
func (f *upstreamOIDCProviderInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredUpstreamOIDCProviderInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
func (f *oIDCIdentityProviderInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredOIDCIdentityProviderInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *upstreamOIDCProviderInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&idpv1alpha1.UpstreamOIDCProvider{}, f.defaultInformer)
func (f *oIDCIdentityProviderInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&idpv1alpha1.OIDCIdentityProvider{}, f.defaultInformer)
}
func (f *upstreamOIDCProviderInformer) Lister() v1alpha1.UpstreamOIDCProviderLister {
return v1alpha1.NewUpstreamOIDCProviderLister(f.Informer().GetIndexer())
func (f *oIDCIdentityProviderInformer) Lister() v1alpha1.OIDCIdentityProviderLister {
return v1alpha1.NewOIDCIdentityProviderLister(f.Informer().GetIndexer())
}

View File

@ -5,10 +5,10 @@
package v1alpha1
// OIDCProviderListerExpansion allows custom methods to be added to
// OIDCProviderLister.
type OIDCProviderListerExpansion interface{}
// FederationDomainListerExpansion allows custom methods to be added to
// FederationDomainLister.
type FederationDomainListerExpansion interface{}
// OIDCProviderNamespaceListerExpansion allows custom methods to be added to
// OIDCProviderNamespaceLister.
type OIDCProviderNamespaceListerExpansion interface{}
// FederationDomainNamespaceListerExpansion allows custom methods to be added to
// FederationDomainNamespaceLister.
type FederationDomainNamespaceListerExpansion interface{}

View File

@ -0,0 +1,81 @@
// 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/supervisor/config/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// FederationDomainLister helps list FederationDomains.
type FederationDomainLister interface {
// List lists all FederationDomains in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.FederationDomain, err error)
// FederationDomains returns an object that can list and get FederationDomains.
FederationDomains(namespace string) FederationDomainNamespaceLister
FederationDomainListerExpansion
}
// federationDomainLister implements the FederationDomainLister interface.
type federationDomainLister struct {
indexer cache.Indexer
}
// NewFederationDomainLister returns a new FederationDomainLister.
func NewFederationDomainLister(indexer cache.Indexer) FederationDomainLister {
return &federationDomainLister{indexer: indexer}
}
// List lists all FederationDomains in the indexer.
func (s *federationDomainLister) List(selector labels.Selector) (ret []*v1alpha1.FederationDomain, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.FederationDomain))
})
return ret, err
}
// FederationDomains returns an object that can list and get FederationDomains.
func (s *federationDomainLister) FederationDomains(namespace string) FederationDomainNamespaceLister {
return federationDomainNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// FederationDomainNamespaceLister helps list and get FederationDomains.
type FederationDomainNamespaceLister interface {
// List lists all FederationDomains in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v1alpha1.FederationDomain, err error)
// Get retrieves the FederationDomain from the indexer for a given namespace and name.
Get(name string) (*v1alpha1.FederationDomain, error)
FederationDomainNamespaceListerExpansion
}
// federationDomainNamespaceLister implements the FederationDomainNamespaceLister
// interface.
type federationDomainNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all FederationDomains in the indexer for a given namespace.
func (s federationDomainNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.FederationDomain, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.FederationDomain))
})
return ret, err
}
// Get retrieves the FederationDomain from the indexer for a given namespace and name.
func (s federationDomainNamespaceLister) Get(name string) (*v1alpha1.FederationDomain, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("federationdomain"), name)
}
return obj.(*v1alpha1.FederationDomain), nil
}

View File

@ -1,81 +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/supervisor/config/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// OIDCProviderLister helps list OIDCProviders.
type OIDCProviderLister interface {
// List lists all OIDCProviders in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.OIDCProvider, err error)
// OIDCProviders returns an object that can list and get OIDCProviders.
OIDCProviders(namespace string) OIDCProviderNamespaceLister
OIDCProviderListerExpansion
}
// oIDCProviderLister implements the OIDCProviderLister interface.
type oIDCProviderLister struct {
indexer cache.Indexer
}
// NewOIDCProviderLister returns a new OIDCProviderLister.
func NewOIDCProviderLister(indexer cache.Indexer) OIDCProviderLister {
return &oIDCProviderLister{indexer: indexer}
}
// List lists all OIDCProviders in the indexer.
func (s *oIDCProviderLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCProvider, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.OIDCProvider))
})
return ret, err
}
// OIDCProviders returns an object that can list and get OIDCProviders.
func (s *oIDCProviderLister) OIDCProviders(namespace string) OIDCProviderNamespaceLister {
return oIDCProviderNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// OIDCProviderNamespaceLister helps list and get OIDCProviders.
type OIDCProviderNamespaceLister interface {
// List lists all OIDCProviders in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v1alpha1.OIDCProvider, err error)
// Get retrieves the OIDCProvider from the indexer for a given namespace and name.
Get(name string) (*v1alpha1.OIDCProvider, error)
OIDCProviderNamespaceListerExpansion
}
// oIDCProviderNamespaceLister implements the OIDCProviderNamespaceLister
// interface.
type oIDCProviderNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all OIDCProviders in the indexer for a given namespace.
func (s oIDCProviderNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCProvider, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.OIDCProvider))
})
return ret, err
}
// Get retrieves the OIDCProvider from the indexer for a given namespace and name.
func (s oIDCProviderNamespaceLister) Get(name string) (*v1alpha1.OIDCProvider, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("oidcprovider"), name)
}
return obj.(*v1alpha1.OIDCProvider), nil
}

View File

@ -5,10 +5,10 @@
package v1alpha1
// UpstreamOIDCProviderListerExpansion allows custom methods to be added to
// UpstreamOIDCProviderLister.
type UpstreamOIDCProviderListerExpansion interface{}
// OIDCIdentityProviderListerExpansion allows custom methods to be added to
// OIDCIdentityProviderLister.
type OIDCIdentityProviderListerExpansion interface{}
// UpstreamOIDCProviderNamespaceListerExpansion allows custom methods to be added to
// UpstreamOIDCProviderNamespaceLister.
type UpstreamOIDCProviderNamespaceListerExpansion interface{}
// OIDCIdentityProviderNamespaceListerExpansion allows custom methods to be added to
// OIDCIdentityProviderNamespaceLister.
type OIDCIdentityProviderNamespaceListerExpansion interface{}

View File

@ -0,0 +1,81 @@
// 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/supervisor/idp/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// OIDCIdentityProviderLister helps list OIDCIdentityProviders.
type OIDCIdentityProviderLister interface {
// List lists all OIDCIdentityProviders in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.OIDCIdentityProvider, err error)
// OIDCIdentityProviders returns an object that can list and get OIDCIdentityProviders.
OIDCIdentityProviders(namespace string) OIDCIdentityProviderNamespaceLister
OIDCIdentityProviderListerExpansion
}
// oIDCIdentityProviderLister implements the OIDCIdentityProviderLister interface.
type oIDCIdentityProviderLister struct {
indexer cache.Indexer
}
// NewOIDCIdentityProviderLister returns a new OIDCIdentityProviderLister.
func NewOIDCIdentityProviderLister(indexer cache.Indexer) OIDCIdentityProviderLister {
return &oIDCIdentityProviderLister{indexer: indexer}
}
// List lists all OIDCIdentityProviders in the indexer.
func (s *oIDCIdentityProviderLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCIdentityProvider, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.OIDCIdentityProvider))
})
return ret, err
}
// OIDCIdentityProviders returns an object that can list and get OIDCIdentityProviders.
func (s *oIDCIdentityProviderLister) OIDCIdentityProviders(namespace string) OIDCIdentityProviderNamespaceLister {
return oIDCIdentityProviderNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// OIDCIdentityProviderNamespaceLister helps list and get OIDCIdentityProviders.
type OIDCIdentityProviderNamespaceLister interface {
// List lists all OIDCIdentityProviders in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v1alpha1.OIDCIdentityProvider, err error)
// Get retrieves the OIDCIdentityProvider from the indexer for a given namespace and name.
Get(name string) (*v1alpha1.OIDCIdentityProvider, error)
OIDCIdentityProviderNamespaceListerExpansion
}
// oIDCIdentityProviderNamespaceLister implements the OIDCIdentityProviderNamespaceLister
// interface.
type oIDCIdentityProviderNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all OIDCIdentityProviders in the indexer for a given namespace.
func (s oIDCIdentityProviderNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCIdentityProvider, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.OIDCIdentityProvider))
})
return ret, err
}
// Get retrieves the OIDCIdentityProvider from the indexer for a given namespace and name.
func (s oIDCIdentityProviderNamespaceLister) Get(name string) (*v1alpha1.OIDCIdentityProvider, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("oidcidentityprovider"), name)
}
return obj.(*v1alpha1.OIDCIdentityProvider), nil
}

View File

@ -1,81 +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/supervisor/idp/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// UpstreamOIDCProviderLister helps list UpstreamOIDCProviders.
type UpstreamOIDCProviderLister interface {
// List lists all UpstreamOIDCProviders in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.UpstreamOIDCProvider, err error)
// UpstreamOIDCProviders returns an object that can list and get UpstreamOIDCProviders.
UpstreamOIDCProviders(namespace string) UpstreamOIDCProviderNamespaceLister
UpstreamOIDCProviderListerExpansion
}
// upstreamOIDCProviderLister implements the UpstreamOIDCProviderLister interface.
type upstreamOIDCProviderLister struct {
indexer cache.Indexer
}
// NewUpstreamOIDCProviderLister returns a new UpstreamOIDCProviderLister.
func NewUpstreamOIDCProviderLister(indexer cache.Indexer) UpstreamOIDCProviderLister {
return &upstreamOIDCProviderLister{indexer: indexer}
}
// List lists all UpstreamOIDCProviders in the indexer.
func (s *upstreamOIDCProviderLister) List(selector labels.Selector) (ret []*v1alpha1.UpstreamOIDCProvider, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.UpstreamOIDCProvider))
})
return ret, err
}
// UpstreamOIDCProviders returns an object that can list and get UpstreamOIDCProviders.
func (s *upstreamOIDCProviderLister) UpstreamOIDCProviders(namespace string) UpstreamOIDCProviderNamespaceLister {
return upstreamOIDCProviderNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// UpstreamOIDCProviderNamespaceLister helps list and get UpstreamOIDCProviders.
type UpstreamOIDCProviderNamespaceLister interface {
// List lists all UpstreamOIDCProviders in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v1alpha1.UpstreamOIDCProvider, err error)
// Get retrieves the UpstreamOIDCProvider from the indexer for a given namespace and name.
Get(name string) (*v1alpha1.UpstreamOIDCProvider, error)
UpstreamOIDCProviderNamespaceListerExpansion
}
// upstreamOIDCProviderNamespaceLister implements the UpstreamOIDCProviderNamespaceLister
// interface.
type upstreamOIDCProviderNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all UpstreamOIDCProviders in the indexer for a given namespace.
func (s upstreamOIDCProviderNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.UpstreamOIDCProvider, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.UpstreamOIDCProvider))
})
return ret, err
}
// Get retrieves the UpstreamOIDCProvider from the indexer for a given namespace and name.
func (s upstreamOIDCProviderNamespaceLister) Get(name string) (*v1alpha1.UpstreamOIDCProvider, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("upstreamoidcprovider"), name)
}
return obj.(*v1alpha1.UpstreamOIDCProvider), nil
}

View File

@ -6,22 +6,22 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
creationTimestamp: null
name: oidcproviders.config.supervisor.pinniped.dev
name: federationdomains.config.supervisor.pinniped.dev
spec:
group: config.supervisor.pinniped.dev
names:
categories:
- pinniped
kind: OIDCProvider
listKind: OIDCProviderList
plural: oidcproviders
singular: oidcprovider
kind: FederationDomain
listKind: FederationDomainList
plural: federationdomains
singular: federationdomain
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: OIDCProvider describes the configuration of an OIDC provider.
description: FederationDomain describes the configuration of an OIDC provider.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
@ -50,14 +50,14 @@ spec:
minLength: 1
type: string
tls:
description: TLS configures how this OIDCProvider is served over Transport
Layer Security (TLS).
description: TLS configures how this FederationDomain is served over
Transport Layer Security (TLS).
properties:
secretName:
description: "SecretName is an optional name of a Secret in the
same namespace, of type `kubernetes.io/tls`, which contains
the TLS serving certificate for the HTTPS endpoints served by
this OIDCProvider. When provided, the TLS Secret named here
this FederationDomain. When provided, the TLS Secret named here
must contain keys named `tls.crt` and `tls.key` that contain
the certificate and private key to use for TLS. \n Server Name
Indication (SNI) is an extension to the Transport Layer Security

View File

@ -6,7 +6,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
creationTimestamp: null
name: upstreamoidcproviders.idp.supervisor.pinniped.dev
name: oidcidentityproviders.idp.supervisor.pinniped.dev
spec:
group: idp.supervisor.pinniped.dev
names:
@ -14,10 +14,10 @@ spec:
- pinniped
- pinniped-idp
- pinniped-idps
kind: UpstreamOIDCProvider
listKind: UpstreamOIDCProviderList
plural: upstreamoidcproviders
singular: upstreamoidcprovider
kind: OIDCIdentityProvider
listKind: OIDCIdentityProviderList
plural: oidcidentityproviders
singular: oidcidentityprovider
scope: Namespaced
versions:
- additionalPrinterColumns:
@ -33,7 +33,7 @@ spec:
name: v1alpha1
schema:
openAPIV3Schema:
description: UpstreamOIDCProvider describes the configuration of an upstream
description: OIDCIdentityProvider describes the configuration of an upstream
OpenID Connect identity provider.
properties:
apiVersion:
@ -183,7 +183,7 @@ spec:
x-kubernetes-list-type: map
phase:
default: Pending
description: Phase summarizes the overall status of the UpstreamOIDCProvider.
description: Phase summarizes the overall status of the OIDCIdentityProvider.
enum:
- Pending
- Ready

View File

@ -301,14 +301,14 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcprovider"]
==== OIDCProvider
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomain"]
==== FederationDomain
OIDCProvider describes the configuration of an OIDC provider.
FederationDomain describes the configuration of an OIDC provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcproviderlist[$$OIDCProviderList$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomainlist[$$FederationDomainList$$]
****
[cols="25a,75a", options="header"]
@ -316,21 +316,21 @@ OIDCProvider describes the configuration of an OIDC provider.
| 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-supervisor-config-v1alpha1-oidcproviderspec[$$OIDCProviderSpec$$]__ | Spec of the OIDC provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcproviderstatus[$$OIDCProviderStatus$$]__ | Status of the OIDC provider.
| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomainspec[$$FederationDomainSpec$$]__ | Spec of the OIDC provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomainstatus[$$FederationDomainStatus$$]__ | Status of the OIDC provider.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcprovidersecrets"]
==== OIDCProviderSecrets
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomainsecrets"]
==== FederationDomainSecrets
OIDCProviderSecrets holds information about this OIDC Provider's secrets.
FederationDomainSecrets holds information about this OIDC Provider's secrets.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcproviderstatus[$$OIDCProviderStatus$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomainstatus[$$FederationDomainStatus$$]
****
[cols="25a,75a", options="header"]
@ -343,14 +343,14 @@ OIDCProviderSecrets holds information about this OIDC Provider's secrets.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcproviderspec"]
==== OIDCProviderSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomainspec"]
==== FederationDomainSpec
OIDCProviderSpec is a struct that describes an OIDC Provider.
FederationDomainSpec is a struct that describes an OIDC Provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcprovider[$$OIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomain[$$FederationDomain$$]
****
[cols="25a,75a", options="header"]
@ -358,44 +358,44 @@ OIDCProviderSpec is a struct that describes an OIDC Provider.
| Field | Description
| *`issuer`* __string__ | Issuer is the OIDC Provider's issuer, per the OIDC Discovery Metadata document, as well as the identifier that it will use for the iss claim in issued JWTs. This field will also be used as the base URL for any endpoints used by the OIDC Provider (e.g., if your issuer is https://example.com/foo, then your authorization endpoint will look like https://example.com/foo/some/path/to/auth/endpoint).
See https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.3 for more information.
| *`tls`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcprovidertlsspec[$$OIDCProviderTLSSpec$$]__ | TLS configures how this OIDCProvider is served over Transport Layer Security (TLS).
| *`tls`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomaintlsspec[$$FederationDomainTLSSpec$$]__ | TLS configures how this FederationDomain is served over Transport Layer Security (TLS).
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcproviderstatus"]
==== OIDCProviderStatus
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomainstatus"]
==== FederationDomainStatus
OIDCProviderStatus is a struct that describes the actual state of an OIDC Provider.
FederationDomainStatus is a struct that describes the actual state of an OIDC Provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcprovider[$$OIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomain[$$FederationDomain$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`status`* __OIDCProviderStatusCondition__ | Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure.
| *`status`* __FederationDomainStatusCondition__ | Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure.
| *`message`* __string__ | Message provides human-readable details about the Status.
| *`lastUpdateTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta[$$Time$$]__ | LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get around some undesirable behavior with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811).
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcprovidersecrets[$$OIDCProviderSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcprovidertlsspec"]
==== OIDCProviderTLSSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomaintlsspec"]
==== FederationDomainTLSSpec
OIDCProviderTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
FederationDomainTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcproviderspec[$$OIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomainspec[$$FederationDomainSpec$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`secretName`* __string__ | SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains the TLS serving certificate for the HTTPS endpoints served by this OIDCProvider. When provided, the TLS Secret named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use for TLS.
| *`secretName`* __string__ | SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains the TLS serving certificate for the HTTPS endpoints served by this FederationDomain. When provided, the TLS Secret named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use for TLS.
Server Name Indication (SNI) is an extension to the Transport Layer Security (TLS) supported by all major browsers.
SecretName is required if you would like to use different TLS certificates for issuers of different hostnames. SNI requests do not include port numbers, so all issuers with the same DNS hostname must use the same SecretName value even if they have different port numbers.
SecretName is not required when you would like to use only the HTTP endpoints (e.g. when terminating TLS at an Ingress). It is also not required when you would like all requests to this OIDC Provider's HTTPS endpoints to use the default TLS certificate, which is configured elsewhere.
@ -418,7 +418,7 @@ Condition status of a resource (mirrored from the metav1.Condition type added in
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcproviderstatus[$$UpstreamOIDCProviderStatus$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderstatus[$$OIDCIdentityProviderStatus$$]
****
[cols="25a,75a", options="header"]
@ -440,7 +440,7 @@ OIDCAuthorizationConfig provides information about how to form the OAuth2 author
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
@ -457,7 +457,7 @@ OIDCClaims provides a mapping from upstream claims into identities.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
@ -475,7 +475,7 @@ OIDCClient contains information about an OIDC client (e.g., client ID and client
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
@ -485,31 +485,14 @@ OIDCClient contains information about an OIDC client (e.g., client ID and client
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-tlsspec"]
==== TLSSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityprovider"]
==== OIDCIdentityProvider
Configuration for TLS parameters related to identity provider integration.
OIDCIdentityProvider describes the configuration of an upstream OpenID Connect identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`certificateAuthorityData`* __string__ | X.509 Certificate Authority (base64-encoded PEM bundle). If omitted, a default set of system roots will be trusted.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcprovider"]
==== UpstreamOIDCProvider
UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcproviderlist[$$UpstreamOIDCProviderList$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderlist[$$OIDCIdentityProviderList$$]
****
[cols="25a,75a", options="header"]
@ -517,21 +500,21 @@ UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect i
| 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-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]__ | Spec for configuring the identity provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcproviderstatus[$$UpstreamOIDCProviderStatus$$]__ | Status of the identity provider.
| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]__ | Spec for configuring the identity provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderstatus[$$OIDCIdentityProviderStatus$$]__ | Status of the identity provider.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec"]
==== UpstreamOIDCProviderSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec"]
==== OIDCIdentityProviderSpec
Spec for configuring an OIDC identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcprovider[$$UpstreamOIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityprovider[$$OIDCIdentityProvider$$]
****
[cols="25a,75a", options="header"]
@ -545,24 +528,41 @@ Spec for configuring an OIDC identity provider.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcproviderstatus"]
==== UpstreamOIDCProviderStatus
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderstatus"]
==== OIDCIdentityProviderStatus
Status of an OIDC identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-upstreamoidcprovider[$$UpstreamOIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityprovider[$$OIDCIdentityProvider$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`phase`* __UpstreamOIDCProviderPhase__ | Phase summarizes the overall status of the UpstreamOIDCProvider.
| *`phase`* __OIDCIdentityProviderPhase__ | Phase summarizes the overall status of the OIDCIdentityProvider.
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-condition[$$Condition$$]__ | Represents the observations of an identity provider's current state.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-tlsspec"]
==== TLSSpec
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`certificateAuthorityData`* __string__ | X.509 Certificate Authority (base64-encoded PEM bundle). If omitted, a default set of system roots will be trusted.
|===
[id="{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1"]
=== login.concierge.pinniped.dev/v1alpha1

View File

@ -30,8 +30,8 @@ func init() {
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&OIDCProvider{},
&OIDCProviderList{},
&FederationDomain{},
&FederationDomainList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View File

@ -9,19 +9,19 @@ import (
)
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid;SameIssuerHostMustUseSameSecret
type OIDCProviderStatusCondition string
type FederationDomainStatusCondition string
const (
SuccessOIDCProviderStatusCondition = OIDCProviderStatusCondition("Success")
DuplicateOIDCProviderStatusCondition = OIDCProviderStatusCondition("Duplicate")
SameIssuerHostMustUseSameSecretOIDCProviderStatusCondition = OIDCProviderStatusCondition("SameIssuerHostMustUseSameSecret")
InvalidOIDCProviderStatusCondition = OIDCProviderStatusCondition("Invalid")
SuccessFederationDomainStatusCondition = FederationDomainStatusCondition("Success")
DuplicateFederationDomainStatusCondition = FederationDomainStatusCondition("Duplicate")
SameIssuerHostMustUseSameSecretFederationDomainStatusCondition = FederationDomainStatusCondition("SameIssuerHostMustUseSameSecret")
InvalidFederationDomainStatusCondition = FederationDomainStatusCondition("Invalid")
)
// OIDCProviderTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
type OIDCProviderTLSSpec struct {
// FederationDomainTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
type FederationDomainTLSSpec struct {
// SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains
// the TLS serving certificate for the HTTPS endpoints served by this OIDCProvider. When provided, the TLS Secret
// the TLS serving certificate for the HTTPS endpoints served by this FederationDomain. When provided, the TLS Secret
// named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use
// for TLS.
//
@ -41,8 +41,8 @@ type OIDCProviderTLSSpec struct {
SecretName string `json:"secretName,omitempty"`
}
// OIDCProviderSpec is a struct that describes an OIDC Provider.
type OIDCProviderSpec struct {
// FederationDomainSpec is a struct that describes an OIDC Provider.
type FederationDomainSpec struct {
// Issuer is the OIDC Provider's issuer, per the OIDC Discovery Metadata document, as well as the
// identifier that it will use for the iss claim in issued JWTs. This field will also be used as
// the base URL for any endpoints used by the OIDC Provider (e.g., if your issuer is
@ -54,13 +54,13 @@ type OIDCProviderSpec struct {
// +kubebuilder:validation:MinLength=1
Issuer string `json:"issuer"`
// TLS configures how this OIDCProvider is served over Transport Layer Security (TLS).
// TLS configures how this FederationDomain is served over Transport Layer Security (TLS).
// +optional
TLS *OIDCProviderTLSSpec `json:"tls,omitempty"`
TLS *FederationDomainTLSSpec `json:"tls,omitempty"`
}
// OIDCProviderSecrets holds information about this OIDC Provider's secrets.
type OIDCProviderSecrets struct {
// FederationDomainSecrets holds information about this OIDC Provider's secrets.
type FederationDomainSecrets struct {
// JWKS holds the name of the corev1.Secret in which this OIDC Provider's signing/verification keys are
// stored. If it is empty, then the signing/verification keys are either unknown or they don't
// exist.
@ -83,12 +83,12 @@ type OIDCProviderSecrets struct {
StateEncryptionKey corev1.LocalObjectReference `json:"stateEncryptionKey,omitempty"`
}
// OIDCProviderStatus is a struct that describes the actual state of an OIDC Provider.
type OIDCProviderStatus struct {
// FederationDomainStatus is a struct that describes the actual state of an OIDC Provider.
type FederationDomainStatus struct {
// Status holds an enum that describes the state of this OIDC Provider. Note that this Status can
// represent success or failure.
// +optional
Status OIDCProviderStatusCondition `json:"status,omitempty"`
Status FederationDomainStatusCondition `json:"status,omitempty"`
// Message provides human-readable details about the Status.
// +optional
@ -102,29 +102,29 @@ type OIDCProviderStatus struct {
// Secrets contains information about this OIDC Provider's secrets.
// +optional
Secrets OIDCProviderSecrets `json:"secrets,omitempty"`
Secrets FederationDomainSecrets `json:"secrets,omitempty"`
}
// OIDCProvider describes the configuration of an OIDC provider.
// FederationDomain describes the configuration of an OIDC provider.
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=pinniped
type OIDCProvider struct {
type FederationDomain struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec of the OIDC provider.
Spec OIDCProviderSpec `json:"spec"`
Spec FederationDomainSpec `json:"spec"`
// Status of the OIDC provider.
Status OIDCProviderStatus `json:"status,omitempty"`
Status FederationDomainStatus `json:"status,omitempty"`
}
// List of OIDCProvider objects.
// List of FederationDomain objects.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type OIDCProviderList struct {
type FederationDomainList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []OIDCProvider `json:"items"`
Items []FederationDomain `json:"items"`
}

View File

@ -12,7 +12,7 @@ import (
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProvider) DeepCopyInto(out *OIDCProvider) {
func (in *FederationDomain) DeepCopyInto(out *FederationDomain) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
@ -21,18 +21,18 @@ func (in *OIDCProvider) DeepCopyInto(out *OIDCProvider) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProvider.
func (in *OIDCProvider) DeepCopy() *OIDCProvider {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomain.
func (in *FederationDomain) DeepCopy() *FederationDomain {
if in == nil {
return nil
}
out := new(OIDCProvider)
out := new(FederationDomain)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCProvider) DeepCopyObject() runtime.Object {
func (in *FederationDomain) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
@ -40,13 +40,13 @@ func (in *OIDCProvider) DeepCopyObject() runtime.Object {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderList) DeepCopyInto(out *OIDCProviderList) {
func (in *FederationDomainList) DeepCopyInto(out *FederationDomainList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]OIDCProvider, len(*in))
*out = make([]FederationDomain, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -54,18 +54,18 @@ func (in *OIDCProviderList) DeepCopyInto(out *OIDCProviderList) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderList.
func (in *OIDCProviderList) DeepCopy() *OIDCProviderList {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainList.
func (in *FederationDomainList) DeepCopy() *FederationDomainList {
if in == nil {
return nil
}
out := new(OIDCProviderList)
out := new(FederationDomainList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCProviderList) DeepCopyObject() runtime.Object {
func (in *FederationDomainList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
@ -73,7 +73,7 @@ func (in *OIDCProviderList) DeepCopyObject() runtime.Object {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderSecrets) DeepCopyInto(out *OIDCProviderSecrets) {
func (in *FederationDomainSecrets) DeepCopyInto(out *FederationDomainSecrets) {
*out = *in
out.JWKS = in.JWKS
out.TokenSigningKey = in.TokenSigningKey
@ -82,39 +82,39 @@ func (in *OIDCProviderSecrets) DeepCopyInto(out *OIDCProviderSecrets) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderSecrets.
func (in *OIDCProviderSecrets) DeepCopy() *OIDCProviderSecrets {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainSecrets.
func (in *FederationDomainSecrets) DeepCopy() *FederationDomainSecrets {
if in == nil {
return nil
}
out := new(OIDCProviderSecrets)
out := new(FederationDomainSecrets)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderSpec) DeepCopyInto(out *OIDCProviderSpec) {
func (in *FederationDomainSpec) DeepCopyInto(out *FederationDomainSpec) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(OIDCProviderTLSSpec)
*out = new(FederationDomainTLSSpec)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderSpec.
func (in *OIDCProviderSpec) DeepCopy() *OIDCProviderSpec {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainSpec.
func (in *FederationDomainSpec) DeepCopy() *FederationDomainSpec {
if in == nil {
return nil
}
out := new(OIDCProviderSpec)
out := new(FederationDomainSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderStatus) DeepCopyInto(out *OIDCProviderStatus) {
func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
*out = *in
if in.LastUpdateTime != nil {
in, out := &in.LastUpdateTime, &out.LastUpdateTime
@ -124,28 +124,28 @@ func (in *OIDCProviderStatus) DeepCopyInto(out *OIDCProviderStatus) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderStatus.
func (in *OIDCProviderStatus) DeepCopy() *OIDCProviderStatus {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainStatus.
func (in *FederationDomainStatus) DeepCopy() *FederationDomainStatus {
if in == nil {
return nil
}
out := new(OIDCProviderStatus)
out := new(FederationDomainStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderTLSSpec) DeepCopyInto(out *OIDCProviderTLSSpec) {
func (in *FederationDomainTLSSpec) DeepCopyInto(out *FederationDomainTLSSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderTLSSpec.
func (in *OIDCProviderTLSSpec) DeepCopy() *OIDCProviderTLSSpec {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainTLSSpec.
func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec {
if in == nil {
return nil
}
out := new(OIDCProviderTLSSpec)
out := new(FederationDomainTLSSpec)
in.DeepCopyInto(out)
return out
}

View File

@ -30,8 +30,8 @@ func init() {
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&UpstreamOIDCProvider{},
&UpstreamOIDCProviderList{},
&OIDCIdentityProvider{},
&OIDCIdentityProviderList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View File

@ -7,25 +7,25 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type UpstreamOIDCProviderPhase string
type OIDCIdentityProviderPhase string
const (
// PhasePending is the default phase for newly-created UpstreamOIDCProvider resources.
PhasePending UpstreamOIDCProviderPhase = "Pending"
// PhasePending is the default phase for newly-created OIDCIdentityProvider resources.
PhasePending OIDCIdentityProviderPhase = "Pending"
// PhaseReady is the phase for an UpstreamOIDCProvider resource in a healthy state.
PhaseReady UpstreamOIDCProviderPhase = "Ready"
// PhaseReady is the phase for an OIDCIdentityProvider resource in a healthy state.
PhaseReady OIDCIdentityProviderPhase = "Ready"
// PhaseError is the phase for an UpstreamOIDCProvider in an unhealthy state.
PhaseError UpstreamOIDCProviderPhase = "Error"
// PhaseError is the phase for an OIDCIdentityProvider in an unhealthy state.
PhaseError OIDCIdentityProviderPhase = "Error"
)
// Status of an OIDC identity provider.
type UpstreamOIDCProviderStatus struct {
// Phase summarizes the overall status of the UpstreamOIDCProvider.
type OIDCIdentityProviderStatus struct {
// Phase summarizes the overall status of the OIDCIdentityProvider.
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Ready;Error
Phase UpstreamOIDCProviderPhase `json:"phase,omitempty"`
Phase OIDCIdentityProviderPhase `json:"phase,omitempty"`
// Represents the observations of an identity provider's current state.
// +patchMergeKey=type
@ -68,7 +68,7 @@ type OIDCClient struct {
}
// Spec for configuring an OIDC identity provider.
type UpstreamOIDCProviderSpec struct {
type OIDCIdentityProviderSpec struct {
// Issuer is the issuer URL of this OIDC identity provider, i.e., where to fetch
// /.well-known/openid-configuration.
// +kubebuilder:validation:MinLength=1
@ -94,7 +94,7 @@ type UpstreamOIDCProviderSpec struct {
Client OIDCClient `json:"client"`
}
// UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect identity provider.
// OIDCIdentityProvider describes the configuration of an upstream OpenID Connect identity provider.
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=pinniped;pinniped-idp;pinniped-idps
@ -102,22 +102,22 @@ type UpstreamOIDCProviderSpec struct {
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:subresource:status
type UpstreamOIDCProvider struct {
type OIDCIdentityProvider struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec for configuring the identity provider.
Spec UpstreamOIDCProviderSpec `json:"spec"`
Spec OIDCIdentityProviderSpec `json:"spec"`
// Status of the identity provider.
Status UpstreamOIDCProviderStatus `json:"status,omitempty"`
Status OIDCIdentityProviderStatus `json:"status,omitempty"`
}
// List of UpstreamOIDCProvider objects.
// List of OIDCIdentityProvider objects.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type UpstreamOIDCProviderList struct {
type OIDCIdentityProviderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []UpstreamOIDCProvider `json:"items"`
Items []OIDCIdentityProvider `json:"items"`
}

View File

@ -81,6 +81,114 @@ func (in *OIDCClient) DeepCopy() *OIDCClient {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProvider) DeepCopyInto(out *OIDCIdentityProvider) {
*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 OIDCIdentityProvider.
func (in *OIDCIdentityProvider) DeepCopy() *OIDCIdentityProvider {
if in == nil {
return nil
}
out := new(OIDCIdentityProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCIdentityProvider) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProviderList) DeepCopyInto(out *OIDCIdentityProviderList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]OIDCIdentityProvider, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityProviderList.
func (in *OIDCIdentityProviderList) DeepCopy() *OIDCIdentityProviderList {
if in == nil {
return nil
}
out := new(OIDCIdentityProviderList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCIdentityProviderList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProviderSpec) DeepCopyInto(out *OIDCIdentityProviderSpec) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(TLSSpec)
**out = **in
}
in.AuthorizationConfig.DeepCopyInto(&out.AuthorizationConfig)
out.Claims = in.Claims
out.Client = in.Client
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityProviderSpec.
func (in *OIDCIdentityProviderSpec) DeepCopy() *OIDCIdentityProviderSpec {
if in == nil {
return nil
}
out := new(OIDCIdentityProviderSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProviderStatus) DeepCopyInto(out *OIDCIdentityProviderStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityProviderStatus.
func (in *OIDCIdentityProviderStatus) DeepCopy() *OIDCIdentityProviderStatus {
if in == nil {
return nil
}
out := new(OIDCIdentityProviderStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TLSSpec) DeepCopyInto(out *TLSSpec) {
*out = *in
@ -96,111 +204,3 @@ func (in *TLSSpec) DeepCopy() *TLSSpec {
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProvider) DeepCopyInto(out *UpstreamOIDCProvider) {
*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 UpstreamOIDCProvider.
func (in *UpstreamOIDCProvider) DeepCopy() *UpstreamOIDCProvider {
if in == nil {
return nil
}
out := new(UpstreamOIDCProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *UpstreamOIDCProvider) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProviderList) DeepCopyInto(out *UpstreamOIDCProviderList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]UpstreamOIDCProvider, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOIDCProviderList.
func (in *UpstreamOIDCProviderList) DeepCopy() *UpstreamOIDCProviderList {
if in == nil {
return nil
}
out := new(UpstreamOIDCProviderList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *UpstreamOIDCProviderList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProviderSpec) DeepCopyInto(out *UpstreamOIDCProviderSpec) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(TLSSpec)
**out = **in
}
in.AuthorizationConfig.DeepCopyInto(&out.AuthorizationConfig)
out.Claims = in.Claims
out.Client = in.Client
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOIDCProviderSpec.
func (in *UpstreamOIDCProviderSpec) DeepCopy() *UpstreamOIDCProviderSpec {
if in == nil {
return nil
}
out := new(UpstreamOIDCProviderSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProviderStatus) DeepCopyInto(out *UpstreamOIDCProviderStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOIDCProviderStatus.
func (in *UpstreamOIDCProviderStatus) DeepCopy() *UpstreamOIDCProviderStatus {
if in == nil {
return nil
}
out := new(UpstreamOIDCProviderStatus)
in.DeepCopyInto(out)
return out
}

View File

@ -13,7 +13,7 @@ import (
type ConfigV1alpha1Interface interface {
RESTClient() rest.Interface
OIDCProvidersGetter
FederationDomainsGetter
}
// ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group.
@ -21,8 +21,8 @@ type ConfigV1alpha1Client struct {
restClient rest.Interface
}
func (c *ConfigV1alpha1Client) OIDCProviders(namespace string) OIDCProviderInterface {
return newOIDCProviders(c, namespace)
func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDomainInterface {
return newFederationDomains(c, namespace)
}
// NewForConfig creates a new ConfigV1alpha1Client for the given config.

View File

@ -15,8 +15,8 @@ type FakeConfigV1alpha1 struct {
*testing.Fake
}
func (c *FakeConfigV1alpha1) OIDCProviders(namespace string) v1alpha1.OIDCProviderInterface {
return &FakeOIDCProviders{c, namespace}
func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.FederationDomainInterface {
return &FakeFederationDomains{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate

View File

@ -0,0 +1,129 @@
// 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/supervisor/config/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"
)
// FakeFederationDomains implements FederationDomainInterface
type FakeFederationDomains struct {
Fake *FakeConfigV1alpha1
ns string
}
var federationdomainsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "federationdomains"}
var federationdomainsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "FederationDomain"}
// Get takes name of the federationDomain, and returns the corresponding federationDomain object, and an error if there is any.
func (c *FakeFederationDomains) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(federationdomainsResource, c.ns, name), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}
// List takes label and field selectors, and returns the list of FederationDomains that match those selectors.
func (c *FakeFederationDomains) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FederationDomainList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(federationdomainsResource, federationdomainsKind, c.ns, opts), &v1alpha1.FederationDomainList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.FederationDomainList{ListMeta: obj.(*v1alpha1.FederationDomainList).ListMeta}
for _, item := range obj.(*v1alpha1.FederationDomainList).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 federationDomains.
func (c *FakeFederationDomains) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(federationdomainsResource, c.ns, opts))
}
// Create takes the representation of a federationDomain and creates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *FakeFederationDomains) Create(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.CreateOptions) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(federationdomainsResource, c.ns, federationDomain), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}
// Update takes the representation of a federationDomain and updates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *FakeFederationDomains) Update(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(federationdomainsResource, c.ns, federationDomain), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), 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 *FakeFederationDomains) UpdateStatus(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (*v1alpha1.FederationDomain, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(federationdomainsResource, "status", c.ns, federationDomain), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}
// Delete takes name of the federationDomain and deletes it. Returns an error if one occurs.
func (c *FakeFederationDomains) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(federationdomainsResource, c.ns, name), &v1alpha1.FederationDomain{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeFederationDomains) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(federationdomainsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.FederationDomainList{})
return err
}
// Patch applies the patch and returns the patched federationDomain.
func (c *FakeFederationDomains) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(federationdomainsResource, c.ns, name, pt, data, subresources...), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}

View File

@ -1,129 +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/supervisor/config/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"
)
// FakeOIDCProviders implements OIDCProviderInterface
type FakeOIDCProviders struct {
Fake *FakeConfigV1alpha1
ns string
}
var oidcprovidersResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcproviders"}
var oidcprovidersKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCProvider"}
// Get takes name of the oIDCProvider, and returns the corresponding oIDCProvider object, and an error if there is any.
func (c *FakeOIDCProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(oidcprovidersResource, c.ns, name), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}
// List takes label and field selectors, and returns the list of OIDCProviders that match those selectors.
func (c *FakeOIDCProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCProviderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(oidcprovidersResource, oidcprovidersKind, c.ns, opts), &v1alpha1.OIDCProviderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.OIDCProviderList{ListMeta: obj.(*v1alpha1.OIDCProviderList).ListMeta}
for _, item := range obj.(*v1alpha1.OIDCProviderList).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 oIDCProviders.
func (c *FakeOIDCProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(oidcprovidersResource, c.ns, opts))
}
// Create takes the representation of a oIDCProvider and creates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *FakeOIDCProviders) Create(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.CreateOptions) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(oidcprovidersResource, c.ns, oIDCProvider), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}
// Update takes the representation of a oIDCProvider and updates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *FakeOIDCProviders) Update(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(oidcprovidersResource, c.ns, oIDCProvider), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), 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 *FakeOIDCProviders) UpdateStatus(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCProvider, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(oidcprovidersResource, "status", c.ns, oIDCProvider), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}
// Delete takes name of the oIDCProvider and deletes it. Returns an error if one occurs.
func (c *FakeOIDCProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(oidcprovidersResource, c.ns, name), &v1alpha1.OIDCProvider{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeOIDCProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(oidcprovidersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.OIDCProviderList{})
return err
}
// Patch applies the patch and returns the patched oIDCProvider.
func (c *FakeOIDCProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(oidcprovidersResource, c.ns, name, pt, data, subresources...), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}

View File

@ -0,0 +1,182 @@
// 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/supervisor/config/v1alpha1"
scheme "go.pinniped.dev/generated/1.18/client/supervisor/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"
)
// FederationDomainsGetter has a method to return a FederationDomainInterface.
// A group's client should implement this interface.
type FederationDomainsGetter interface {
FederationDomains(namespace string) FederationDomainInterface
}
// FederationDomainInterface has methods to work with FederationDomain resources.
type FederationDomainInterface interface {
Create(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.CreateOptions) (*v1alpha1.FederationDomain, error)
Update(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (*v1alpha1.FederationDomain, error)
UpdateStatus(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (*v1alpha1.FederationDomain, 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.FederationDomain, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FederationDomainList, 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.FederationDomain, err error)
FederationDomainExpansion
}
// federationDomains implements FederationDomainInterface
type federationDomains struct {
client rest.Interface
ns string
}
// newFederationDomains returns a FederationDomains
func newFederationDomains(c *ConfigV1alpha1Client, namespace string) *federationDomains {
return &federationDomains{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the federationDomain, and returns the corresponding federationDomain object, and an error if there is any.
func (c *federationDomains) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Get().
Namespace(c.ns).
Resource("federationdomains").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of FederationDomains that match those selectors.
func (c *federationDomains) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FederationDomainList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.FederationDomainList{}
err = c.client.Get().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested federationDomains.
func (c *federationDomains) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a federationDomain and creates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *federationDomains) Create(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.CreateOptions) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Post().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&opts, scheme.ParameterCodec).
Body(federationDomain).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a federationDomain and updates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *federationDomains) Update(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Put().
Namespace(c.ns).
Resource("federationdomains").
Name(federationDomain.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(federationDomain).
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 *federationDomains) UpdateStatus(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Put().
Namespace(c.ns).
Resource("federationdomains").
Name(federationDomain.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(federationDomain).
Do(ctx).
Into(result)
return
}
// Delete takes name of the federationDomain and deletes it. Returns an error if one occurs.
func (c *federationDomains) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("federationdomains").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *federationDomains) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched federationDomain.
func (c *federationDomains) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("federationdomains").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -5,4 +5,4 @@
package v1alpha1
type OIDCProviderExpansion interface{}
type FederationDomainExpansion interface{}

View File

@ -1,182 +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/supervisor/config/v1alpha1"
scheme "go.pinniped.dev/generated/1.18/client/supervisor/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"
)
// OIDCProvidersGetter has a method to return a OIDCProviderInterface.
// A group's client should implement this interface.
type OIDCProvidersGetter interface {
OIDCProviders(namespace string) OIDCProviderInterface
}
// OIDCProviderInterface has methods to work with OIDCProvider resources.
type OIDCProviderInterface interface {
Create(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.CreateOptions) (*v1alpha1.OIDCProvider, error)
Update(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCProvider, error)
UpdateStatus(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCProvider, 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.OIDCProvider, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.OIDCProviderList, 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.OIDCProvider, err error)
OIDCProviderExpansion
}
// oIDCProviders implements OIDCProviderInterface
type oIDCProviders struct {
client rest.Interface
ns string
}
// newOIDCProviders returns a OIDCProviders
func newOIDCProviders(c *ConfigV1alpha1Client, namespace string) *oIDCProviders {
return &oIDCProviders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the oIDCProvider, and returns the corresponding oIDCProvider object, and an error if there is any.
func (c *oIDCProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcproviders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of OIDCProviders that match those selectors.
func (c *oIDCProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCProviderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.OIDCProviderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested oIDCProviders.
func (c *oIDCProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a oIDCProvider and creates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *oIDCProviders) Create(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.CreateOptions) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Post().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCProvider).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a oIDCProvider and updates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *oIDCProviders) Update(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcproviders").
Name(oIDCProvider.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCProvider).
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 *oIDCProviders) UpdateStatus(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcproviders").
Name(oIDCProvider.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCProvider).
Do(ctx).
Into(result)
return
}
// Delete takes name of the oIDCProvider and deletes it. Returns an error if one occurs.
func (c *oIDCProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("oidcproviders").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *oIDCProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched oIDCProvider.
func (c *oIDCProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("oidcproviders").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -15,8 +15,8 @@ type FakeIDPV1alpha1 struct {
*testing.Fake
}
func (c *FakeIDPV1alpha1) UpstreamOIDCProviders(namespace string) v1alpha1.UpstreamOIDCProviderInterface {
return &FakeUpstreamOIDCProviders{c, namespace}
func (c *FakeIDPV1alpha1) OIDCIdentityProviders(namespace string) v1alpha1.OIDCIdentityProviderInterface {
return &FakeOIDCIdentityProviders{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate

View File

@ -0,0 +1,129 @@
// 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/supervisor/idp/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"
)
// FakeOIDCIdentityProviders implements OIDCIdentityProviderInterface
type FakeOIDCIdentityProviders struct {
Fake *FakeIDPV1alpha1
ns string
}
var oidcidentityprovidersResource = schema.GroupVersionResource{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcidentityproviders"}
var oidcidentityprovidersKind = schema.GroupVersionKind{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCIdentityProvider"}
// Get takes name of the oIDCIdentityProvider, and returns the corresponding oIDCIdentityProvider object, and an error if there is any.
func (c *FakeOIDCIdentityProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(oidcidentityprovidersResource, c.ns, name), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}
// List takes label and field selectors, and returns the list of OIDCIdentityProviders that match those selectors.
func (c *FakeOIDCIdentityProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCIdentityProviderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(oidcidentityprovidersResource, oidcidentityprovidersKind, c.ns, opts), &v1alpha1.OIDCIdentityProviderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.OIDCIdentityProviderList{ListMeta: obj.(*v1alpha1.OIDCIdentityProviderList).ListMeta}
for _, item := range obj.(*v1alpha1.OIDCIdentityProviderList).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 oIDCIdentityProviders.
func (c *FakeOIDCIdentityProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(oidcidentityprovidersResource, c.ns, opts))
}
// Create takes the representation of a oIDCIdentityProvider and creates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *FakeOIDCIdentityProviders) Create(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.CreateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(oidcidentityprovidersResource, c.ns, oIDCIdentityProvider), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}
// Update takes the representation of a oIDCIdentityProvider and updates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *FakeOIDCIdentityProviders) Update(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(oidcidentityprovidersResource, c.ns, oIDCIdentityProvider), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), 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 *FakeOIDCIdentityProviders) UpdateStatus(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCIdentityProvider, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(oidcidentityprovidersResource, "status", c.ns, oIDCIdentityProvider), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}
// Delete takes name of the oIDCIdentityProvider and deletes it. Returns an error if one occurs.
func (c *FakeOIDCIdentityProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(oidcidentityprovidersResource, c.ns, name), &v1alpha1.OIDCIdentityProvider{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeOIDCIdentityProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(oidcidentityprovidersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.OIDCIdentityProviderList{})
return err
}
// Patch applies the patch and returns the patched oIDCIdentityProvider.
func (c *FakeOIDCIdentityProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(oidcidentityprovidersResource, c.ns, name, pt, data, subresources...), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}

View File

@ -1,129 +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/supervisor/idp/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"
)
// FakeUpstreamOIDCProviders implements UpstreamOIDCProviderInterface
type FakeUpstreamOIDCProviders struct {
Fake *FakeIDPV1alpha1
ns string
}
var upstreamoidcprovidersResource = schema.GroupVersionResource{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "upstreamoidcproviders"}
var upstreamoidcprovidersKind = schema.GroupVersionKind{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "UpstreamOIDCProvider"}
// Get takes name of the upstreamOIDCProvider, and returns the corresponding upstreamOIDCProvider object, and an error if there is any.
func (c *FakeUpstreamOIDCProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(upstreamoidcprovidersResource, c.ns, name), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}
// List takes label and field selectors, and returns the list of UpstreamOIDCProviders that match those selectors.
func (c *FakeUpstreamOIDCProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.UpstreamOIDCProviderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(upstreamoidcprovidersResource, upstreamoidcprovidersKind, c.ns, opts), &v1alpha1.UpstreamOIDCProviderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.UpstreamOIDCProviderList{ListMeta: obj.(*v1alpha1.UpstreamOIDCProviderList).ListMeta}
for _, item := range obj.(*v1alpha1.UpstreamOIDCProviderList).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 upstreamOIDCProviders.
func (c *FakeUpstreamOIDCProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(upstreamoidcprovidersResource, c.ns, opts))
}
// Create takes the representation of a upstreamOIDCProvider and creates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *FakeUpstreamOIDCProviders) Create(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.CreateOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(upstreamoidcprovidersResource, c.ns, upstreamOIDCProvider), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}
// Update takes the representation of a upstreamOIDCProvider and updates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *FakeUpstreamOIDCProviders) Update(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(upstreamoidcprovidersResource, c.ns, upstreamOIDCProvider), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), 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 *FakeUpstreamOIDCProviders) UpdateStatus(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.UpdateOptions) (*v1alpha1.UpstreamOIDCProvider, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(upstreamoidcprovidersResource, "status", c.ns, upstreamOIDCProvider), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}
// Delete takes name of the upstreamOIDCProvider and deletes it. Returns an error if one occurs.
func (c *FakeUpstreamOIDCProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(upstreamoidcprovidersResource, c.ns, name), &v1alpha1.UpstreamOIDCProvider{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeUpstreamOIDCProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(upstreamoidcprovidersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.UpstreamOIDCProviderList{})
return err
}
// Patch applies the patch and returns the patched upstreamOIDCProvider.
func (c *FakeUpstreamOIDCProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(upstreamoidcprovidersResource, c.ns, name, pt, data, subresources...), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}

View File

@ -5,4 +5,4 @@
package v1alpha1
type UpstreamOIDCProviderExpansion interface{}
type OIDCIdentityProviderExpansion interface{}

View File

@ -13,7 +13,7 @@ import (
type IDPV1alpha1Interface interface {
RESTClient() rest.Interface
UpstreamOIDCProvidersGetter
OIDCIdentityProvidersGetter
}
// IDPV1alpha1Client is used to interact with features provided by the idp.supervisor.pinniped.dev group.
@ -21,8 +21,8 @@ type IDPV1alpha1Client struct {
restClient rest.Interface
}
func (c *IDPV1alpha1Client) UpstreamOIDCProviders(namespace string) UpstreamOIDCProviderInterface {
return newUpstreamOIDCProviders(c, namespace)
func (c *IDPV1alpha1Client) OIDCIdentityProviders(namespace string) OIDCIdentityProviderInterface {
return newOIDCIdentityProviders(c, namespace)
}
// NewForConfig creates a new IDPV1alpha1Client for the given config.

View File

@ -0,0 +1,182 @@
// 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/supervisor/idp/v1alpha1"
scheme "go.pinniped.dev/generated/1.18/client/supervisor/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"
)
// OIDCIdentityProvidersGetter has a method to return a OIDCIdentityProviderInterface.
// A group's client should implement this interface.
type OIDCIdentityProvidersGetter interface {
OIDCIdentityProviders(namespace string) OIDCIdentityProviderInterface
}
// OIDCIdentityProviderInterface has methods to work with OIDCIdentityProvider resources.
type OIDCIdentityProviderInterface interface {
Create(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.CreateOptions) (*v1alpha1.OIDCIdentityProvider, error)
Update(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCIdentityProvider, error)
UpdateStatus(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCIdentityProvider, 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.OIDCIdentityProvider, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.OIDCIdentityProviderList, 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.OIDCIdentityProvider, err error)
OIDCIdentityProviderExpansion
}
// oIDCIdentityProviders implements OIDCIdentityProviderInterface
type oIDCIdentityProviders struct {
client rest.Interface
ns string
}
// newOIDCIdentityProviders returns a OIDCIdentityProviders
func newOIDCIdentityProviders(c *IDPV1alpha1Client, namespace string) *oIDCIdentityProviders {
return &oIDCIdentityProviders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the oIDCIdentityProvider, and returns the corresponding oIDCIdentityProvider object, and an error if there is any.
func (c *oIDCIdentityProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of OIDCIdentityProviders that match those selectors.
func (c *oIDCIdentityProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCIdentityProviderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.OIDCIdentityProviderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested oIDCIdentityProviders.
func (c *oIDCIdentityProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a oIDCIdentityProvider and creates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *oIDCIdentityProviders) Create(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.CreateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Post().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCIdentityProvider).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a oIDCIdentityProvider and updates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *oIDCIdentityProviders) Update(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(oIDCIdentityProvider.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCIdentityProvider).
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 *oIDCIdentityProviders) UpdateStatus(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(oIDCIdentityProvider.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCIdentityProvider).
Do(ctx).
Into(result)
return
}
// Delete takes name of the oIDCIdentityProvider and deletes it. Returns an error if one occurs.
func (c *oIDCIdentityProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *oIDCIdentityProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched oIDCIdentityProvider.
func (c *oIDCIdentityProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -1,182 +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/supervisor/idp/v1alpha1"
scheme "go.pinniped.dev/generated/1.18/client/supervisor/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"
)
// UpstreamOIDCProvidersGetter has a method to return a UpstreamOIDCProviderInterface.
// A group's client should implement this interface.
type UpstreamOIDCProvidersGetter interface {
UpstreamOIDCProviders(namespace string) UpstreamOIDCProviderInterface
}
// UpstreamOIDCProviderInterface has methods to work with UpstreamOIDCProvider resources.
type UpstreamOIDCProviderInterface interface {
Create(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.CreateOptions) (*v1alpha1.UpstreamOIDCProvider, error)
Update(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.UpdateOptions) (*v1alpha1.UpstreamOIDCProvider, error)
UpdateStatus(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.UpdateOptions) (*v1alpha1.UpstreamOIDCProvider, 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.UpstreamOIDCProvider, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.UpstreamOIDCProviderList, 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.UpstreamOIDCProvider, err error)
UpstreamOIDCProviderExpansion
}
// upstreamOIDCProviders implements UpstreamOIDCProviderInterface
type upstreamOIDCProviders struct {
client rest.Interface
ns string
}
// newUpstreamOIDCProviders returns a UpstreamOIDCProviders
func newUpstreamOIDCProviders(c *IDPV1alpha1Client, namespace string) *upstreamOIDCProviders {
return &upstreamOIDCProviders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the upstreamOIDCProvider, and returns the corresponding upstreamOIDCProvider object, and an error if there is any.
func (c *upstreamOIDCProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Get().
Namespace(c.ns).
Resource("upstreamoidcproviders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of UpstreamOIDCProviders that match those selectors.
func (c *upstreamOIDCProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.UpstreamOIDCProviderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.UpstreamOIDCProviderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("upstreamoidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested upstreamOIDCProviders.
func (c *upstreamOIDCProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("upstreamoidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a upstreamOIDCProvider and creates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *upstreamOIDCProviders) Create(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.CreateOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Post().
Namespace(c.ns).
Resource("upstreamoidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Body(upstreamOIDCProvider).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a upstreamOIDCProvider and updates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *upstreamOIDCProviders) Update(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("upstreamoidcproviders").
Name(upstreamOIDCProvider.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(upstreamOIDCProvider).
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 *upstreamOIDCProviders) UpdateStatus(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("upstreamoidcproviders").
Name(upstreamOIDCProvider.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(upstreamOIDCProvider).
Do(ctx).
Into(result)
return
}
// Delete takes name of the upstreamOIDCProvider and deletes it. Returns an error if one occurs.
func (c *upstreamOIDCProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("upstreamoidcproviders").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *upstreamOIDCProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("upstreamoidcproviders").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched upstreamOIDCProvider.
func (c *upstreamOIDCProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.UpstreamOIDCProvider, err error) {
result = &v1alpha1.UpstreamOIDCProvider{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("upstreamoidcproviders").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -0,0 +1,77 @@
// 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"
configv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/config/v1alpha1"
versioned "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned"
internalinterfaces "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/internalinterfaces"
v1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/listers/config/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"
)
// FederationDomainInformer provides access to a shared informer and lister for
// FederationDomains.
type FederationDomainInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.FederationDomainLister
}
type federationDomainInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewFederationDomainInformer constructs a new informer for FederationDomain 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 NewFederationDomainInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredFederationDomainInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredFederationDomainInformer constructs a new informer for FederationDomain 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 NewFilteredFederationDomainInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha1().FederationDomains(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha1().FederationDomains(namespace).Watch(context.TODO(), options)
},
},
&configv1alpha1.FederationDomain{},
resyncPeriod,
indexers,
)
}
func (f *federationDomainInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredFederationDomainInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *federationDomainInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha1.FederationDomain{}, f.defaultInformer)
}
func (f *federationDomainInformer) Lister() v1alpha1.FederationDomainLister {
return v1alpha1.NewFederationDomainLister(f.Informer().GetIndexer())
}

View File

@ -11,8 +11,8 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
// OIDCProviders returns a OIDCProviderInformer.
OIDCProviders() OIDCProviderInformer
// FederationDomains returns a FederationDomainInformer.
FederationDomains() FederationDomainInformer
}
type version struct {
@ -26,7 +26,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// OIDCProviders returns a OIDCProviderInformer.
func (v *version) OIDCProviders() OIDCProviderInformer {
return &oIDCProviderInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
// FederationDomains returns a FederationDomainInformer.
func (v *version) FederationDomains() FederationDomainInformer {
return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@ -1,77 +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"
configv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/config/v1alpha1"
versioned "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned"
internalinterfaces "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/internalinterfaces"
v1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/listers/config/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"
)
// OIDCProviderInformer provides access to a shared informer and lister for
// OIDCProviders.
type OIDCProviderInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.OIDCProviderLister
}
type oIDCProviderInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewOIDCProviderInformer constructs a new informer for OIDCProvider 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 NewOIDCProviderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredOIDCProviderInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredOIDCProviderInformer constructs a new informer for OIDCProvider 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 NewFilteredOIDCProviderInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha1().OIDCProviders(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha1().OIDCProviders(namespace).Watch(context.TODO(), options)
},
},
&configv1alpha1.OIDCProvider{},
resyncPeriod,
indexers,
)
}
func (f *oIDCProviderInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredOIDCProviderInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *oIDCProviderInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha1.OIDCProvider{}, f.defaultInformer)
}
func (f *oIDCProviderInformer) Lister() v1alpha1.OIDCProviderLister {
return v1alpha1.NewOIDCProviderLister(f.Informer().GetIndexer())
}

View File

@ -41,12 +41,12 @@ func (f *genericInformer) Lister() cache.GenericLister {
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
switch resource {
// Group=config.supervisor.pinniped.dev, Version=v1alpha1
case v1alpha1.SchemeGroupVersion.WithResource("oidcproviders"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCProviders().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil
// Group=idp.supervisor.pinniped.dev, Version=v1alpha1
case idpv1alpha1.SchemeGroupVersion.WithResource("upstreamoidcproviders"):
return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().UpstreamOIDCProviders().Informer()}, nil
case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"):
return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil
}

View File

@ -11,8 +11,8 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
// UpstreamOIDCProviders returns a UpstreamOIDCProviderInformer.
UpstreamOIDCProviders() UpstreamOIDCProviderInformer
// OIDCIdentityProviders returns a OIDCIdentityProviderInformer.
OIDCIdentityProviders() OIDCIdentityProviderInformer
}
type version struct {
@ -26,7 +26,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// UpstreamOIDCProviders returns a UpstreamOIDCProviderInformer.
func (v *version) UpstreamOIDCProviders() UpstreamOIDCProviderInformer {
return &upstreamOIDCProviderInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
// OIDCIdentityProviders returns a OIDCIdentityProviderInformer.
func (v *version) OIDCIdentityProviders() OIDCIdentityProviderInformer {
return &oIDCIdentityProviderInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@ -19,59 +19,59 @@ import (
cache "k8s.io/client-go/tools/cache"
)
// UpstreamOIDCProviderInformer provides access to a shared informer and lister for
// UpstreamOIDCProviders.
type UpstreamOIDCProviderInformer interface {
// OIDCIdentityProviderInformer provides access to a shared informer and lister for
// OIDCIdentityProviders.
type OIDCIdentityProviderInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.UpstreamOIDCProviderLister
Lister() v1alpha1.OIDCIdentityProviderLister
}
type upstreamOIDCProviderInformer struct {
type oIDCIdentityProviderInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewUpstreamOIDCProviderInformer constructs a new informer for UpstreamOIDCProvider type.
// NewOIDCIdentityProviderInformer constructs a new informer for OIDCIdentityProvider 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 NewUpstreamOIDCProviderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredUpstreamOIDCProviderInformer(client, namespace, resyncPeriod, indexers, nil)
func NewOIDCIdentityProviderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredOIDCIdentityProviderInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredUpstreamOIDCProviderInformer constructs a new informer for UpstreamOIDCProvider type.
// NewFilteredOIDCIdentityProviderInformer constructs a new informer for OIDCIdentityProvider 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 NewFilteredUpstreamOIDCProviderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
func NewFilteredOIDCIdentityProviderInformer(client versioned.Interface, namespace string, 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.IDPV1alpha1().UpstreamOIDCProviders(namespace).List(context.TODO(), options)
return client.IDPV1alpha1().OIDCIdentityProviders(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.IDPV1alpha1().UpstreamOIDCProviders(namespace).Watch(context.TODO(), options)
return client.IDPV1alpha1().OIDCIdentityProviders(namespace).Watch(context.TODO(), options)
},
},
&idpv1alpha1.UpstreamOIDCProvider{},
&idpv1alpha1.OIDCIdentityProvider{},
resyncPeriod,
indexers,
)
}
func (f *upstreamOIDCProviderInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredUpstreamOIDCProviderInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
func (f *oIDCIdentityProviderInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredOIDCIdentityProviderInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *upstreamOIDCProviderInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&idpv1alpha1.UpstreamOIDCProvider{}, f.defaultInformer)
func (f *oIDCIdentityProviderInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&idpv1alpha1.OIDCIdentityProvider{}, f.defaultInformer)
}
func (f *upstreamOIDCProviderInformer) Lister() v1alpha1.UpstreamOIDCProviderLister {
return v1alpha1.NewUpstreamOIDCProviderLister(f.Informer().GetIndexer())
func (f *oIDCIdentityProviderInformer) Lister() v1alpha1.OIDCIdentityProviderLister {
return v1alpha1.NewOIDCIdentityProviderLister(f.Informer().GetIndexer())
}

View File

@ -5,10 +5,10 @@
package v1alpha1
// OIDCProviderListerExpansion allows custom methods to be added to
// OIDCProviderLister.
type OIDCProviderListerExpansion interface{}
// FederationDomainListerExpansion allows custom methods to be added to
// FederationDomainLister.
type FederationDomainListerExpansion interface{}
// OIDCProviderNamespaceListerExpansion allows custom methods to be added to
// OIDCProviderNamespaceLister.
type OIDCProviderNamespaceListerExpansion interface{}
// FederationDomainNamespaceListerExpansion allows custom methods to be added to
// FederationDomainNamespaceLister.
type FederationDomainNamespaceListerExpansion interface{}

View File

@ -0,0 +1,81 @@
// 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/supervisor/config/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// FederationDomainLister helps list FederationDomains.
type FederationDomainLister interface {
// List lists all FederationDomains in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.FederationDomain, err error)
// FederationDomains returns an object that can list and get FederationDomains.
FederationDomains(namespace string) FederationDomainNamespaceLister
FederationDomainListerExpansion
}
// federationDomainLister implements the FederationDomainLister interface.
type federationDomainLister struct {
indexer cache.Indexer
}
// NewFederationDomainLister returns a new FederationDomainLister.
func NewFederationDomainLister(indexer cache.Indexer) FederationDomainLister {
return &federationDomainLister{indexer: indexer}
}
// List lists all FederationDomains in the indexer.
func (s *federationDomainLister) List(selector labels.Selector) (ret []*v1alpha1.FederationDomain, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.FederationDomain))
})
return ret, err
}
// FederationDomains returns an object that can list and get FederationDomains.
func (s *federationDomainLister) FederationDomains(namespace string) FederationDomainNamespaceLister {
return federationDomainNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// FederationDomainNamespaceLister helps list and get FederationDomains.
type FederationDomainNamespaceLister interface {
// List lists all FederationDomains in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v1alpha1.FederationDomain, err error)
// Get retrieves the FederationDomain from the indexer for a given namespace and name.
Get(name string) (*v1alpha1.FederationDomain, error)
FederationDomainNamespaceListerExpansion
}
// federationDomainNamespaceLister implements the FederationDomainNamespaceLister
// interface.
type federationDomainNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all FederationDomains in the indexer for a given namespace.
func (s federationDomainNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.FederationDomain, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.FederationDomain))
})
return ret, err
}
// Get retrieves the FederationDomain from the indexer for a given namespace and name.
func (s federationDomainNamespaceLister) Get(name string) (*v1alpha1.FederationDomain, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("federationdomain"), name)
}
return obj.(*v1alpha1.FederationDomain), nil
}

View File

@ -1,81 +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/supervisor/config/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// OIDCProviderLister helps list OIDCProviders.
type OIDCProviderLister interface {
// List lists all OIDCProviders in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.OIDCProvider, err error)
// OIDCProviders returns an object that can list and get OIDCProviders.
OIDCProviders(namespace string) OIDCProviderNamespaceLister
OIDCProviderListerExpansion
}
// oIDCProviderLister implements the OIDCProviderLister interface.
type oIDCProviderLister struct {
indexer cache.Indexer
}
// NewOIDCProviderLister returns a new OIDCProviderLister.
func NewOIDCProviderLister(indexer cache.Indexer) OIDCProviderLister {
return &oIDCProviderLister{indexer: indexer}
}
// List lists all OIDCProviders in the indexer.
func (s *oIDCProviderLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCProvider, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.OIDCProvider))
})
return ret, err
}
// OIDCProviders returns an object that can list and get OIDCProviders.
func (s *oIDCProviderLister) OIDCProviders(namespace string) OIDCProviderNamespaceLister {
return oIDCProviderNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// OIDCProviderNamespaceLister helps list and get OIDCProviders.
type OIDCProviderNamespaceLister interface {
// List lists all OIDCProviders in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v1alpha1.OIDCProvider, err error)
// Get retrieves the OIDCProvider from the indexer for a given namespace and name.
Get(name string) (*v1alpha1.OIDCProvider, error)
OIDCProviderNamespaceListerExpansion
}
// oIDCProviderNamespaceLister implements the OIDCProviderNamespaceLister
// interface.
type oIDCProviderNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all OIDCProviders in the indexer for a given namespace.
func (s oIDCProviderNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCProvider, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.OIDCProvider))
})
return ret, err
}
// Get retrieves the OIDCProvider from the indexer for a given namespace and name.
func (s oIDCProviderNamespaceLister) Get(name string) (*v1alpha1.OIDCProvider, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("oidcprovider"), name)
}
return obj.(*v1alpha1.OIDCProvider), nil
}

View File

@ -5,10 +5,10 @@
package v1alpha1
// UpstreamOIDCProviderListerExpansion allows custom methods to be added to
// UpstreamOIDCProviderLister.
type UpstreamOIDCProviderListerExpansion interface{}
// OIDCIdentityProviderListerExpansion allows custom methods to be added to
// OIDCIdentityProviderLister.
type OIDCIdentityProviderListerExpansion interface{}
// UpstreamOIDCProviderNamespaceListerExpansion allows custom methods to be added to
// UpstreamOIDCProviderNamespaceLister.
type UpstreamOIDCProviderNamespaceListerExpansion interface{}
// OIDCIdentityProviderNamespaceListerExpansion allows custom methods to be added to
// OIDCIdentityProviderNamespaceLister.
type OIDCIdentityProviderNamespaceListerExpansion interface{}

View File

@ -0,0 +1,81 @@
// 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/supervisor/idp/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// OIDCIdentityProviderLister helps list OIDCIdentityProviders.
type OIDCIdentityProviderLister interface {
// List lists all OIDCIdentityProviders in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.OIDCIdentityProvider, err error)
// OIDCIdentityProviders returns an object that can list and get OIDCIdentityProviders.
OIDCIdentityProviders(namespace string) OIDCIdentityProviderNamespaceLister
OIDCIdentityProviderListerExpansion
}
// oIDCIdentityProviderLister implements the OIDCIdentityProviderLister interface.
type oIDCIdentityProviderLister struct {
indexer cache.Indexer
}
// NewOIDCIdentityProviderLister returns a new OIDCIdentityProviderLister.
func NewOIDCIdentityProviderLister(indexer cache.Indexer) OIDCIdentityProviderLister {
return &oIDCIdentityProviderLister{indexer: indexer}
}
// List lists all OIDCIdentityProviders in the indexer.
func (s *oIDCIdentityProviderLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCIdentityProvider, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.OIDCIdentityProvider))
})
return ret, err
}
// OIDCIdentityProviders returns an object that can list and get OIDCIdentityProviders.
func (s *oIDCIdentityProviderLister) OIDCIdentityProviders(namespace string) OIDCIdentityProviderNamespaceLister {
return oIDCIdentityProviderNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// OIDCIdentityProviderNamespaceLister helps list and get OIDCIdentityProviders.
type OIDCIdentityProviderNamespaceLister interface {
// List lists all OIDCIdentityProviders in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v1alpha1.OIDCIdentityProvider, err error)
// Get retrieves the OIDCIdentityProvider from the indexer for a given namespace and name.
Get(name string) (*v1alpha1.OIDCIdentityProvider, error)
OIDCIdentityProviderNamespaceListerExpansion
}
// oIDCIdentityProviderNamespaceLister implements the OIDCIdentityProviderNamespaceLister
// interface.
type oIDCIdentityProviderNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all OIDCIdentityProviders in the indexer for a given namespace.
func (s oIDCIdentityProviderNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCIdentityProvider, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.OIDCIdentityProvider))
})
return ret, err
}
// Get retrieves the OIDCIdentityProvider from the indexer for a given namespace and name.
func (s oIDCIdentityProviderNamespaceLister) Get(name string) (*v1alpha1.OIDCIdentityProvider, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("oidcidentityprovider"), name)
}
return obj.(*v1alpha1.OIDCIdentityProvider), nil
}

View File

@ -1,81 +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/supervisor/idp/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// UpstreamOIDCProviderLister helps list UpstreamOIDCProviders.
type UpstreamOIDCProviderLister interface {
// List lists all UpstreamOIDCProviders in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.UpstreamOIDCProvider, err error)
// UpstreamOIDCProviders returns an object that can list and get UpstreamOIDCProviders.
UpstreamOIDCProviders(namespace string) UpstreamOIDCProviderNamespaceLister
UpstreamOIDCProviderListerExpansion
}
// upstreamOIDCProviderLister implements the UpstreamOIDCProviderLister interface.
type upstreamOIDCProviderLister struct {
indexer cache.Indexer
}
// NewUpstreamOIDCProviderLister returns a new UpstreamOIDCProviderLister.
func NewUpstreamOIDCProviderLister(indexer cache.Indexer) UpstreamOIDCProviderLister {
return &upstreamOIDCProviderLister{indexer: indexer}
}
// List lists all UpstreamOIDCProviders in the indexer.
func (s *upstreamOIDCProviderLister) List(selector labels.Selector) (ret []*v1alpha1.UpstreamOIDCProvider, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.UpstreamOIDCProvider))
})
return ret, err
}
// UpstreamOIDCProviders returns an object that can list and get UpstreamOIDCProviders.
func (s *upstreamOIDCProviderLister) UpstreamOIDCProviders(namespace string) UpstreamOIDCProviderNamespaceLister {
return upstreamOIDCProviderNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// UpstreamOIDCProviderNamespaceLister helps list and get UpstreamOIDCProviders.
type UpstreamOIDCProviderNamespaceLister interface {
// List lists all UpstreamOIDCProviders in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v1alpha1.UpstreamOIDCProvider, err error)
// Get retrieves the UpstreamOIDCProvider from the indexer for a given namespace and name.
Get(name string) (*v1alpha1.UpstreamOIDCProvider, error)
UpstreamOIDCProviderNamespaceListerExpansion
}
// upstreamOIDCProviderNamespaceLister implements the UpstreamOIDCProviderNamespaceLister
// interface.
type upstreamOIDCProviderNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all UpstreamOIDCProviders in the indexer for a given namespace.
func (s upstreamOIDCProviderNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.UpstreamOIDCProvider, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.UpstreamOIDCProvider))
})
return ret, err
}
// Get retrieves the UpstreamOIDCProvider from the indexer for a given namespace and name.
func (s upstreamOIDCProviderNamespaceLister) Get(name string) (*v1alpha1.UpstreamOIDCProvider, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("upstreamoidcprovider"), name)
}
return obj.(*v1alpha1.UpstreamOIDCProvider), nil
}

View File

@ -6,22 +6,22 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
creationTimestamp: null
name: oidcproviders.config.supervisor.pinniped.dev
name: federationdomains.config.supervisor.pinniped.dev
spec:
group: config.supervisor.pinniped.dev
names:
categories:
- pinniped
kind: OIDCProvider
listKind: OIDCProviderList
plural: oidcproviders
singular: oidcprovider
kind: FederationDomain
listKind: FederationDomainList
plural: federationdomains
singular: federationdomain
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: OIDCProvider describes the configuration of an OIDC provider.
description: FederationDomain describes the configuration of an OIDC provider.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
@ -50,14 +50,14 @@ spec:
minLength: 1
type: string
tls:
description: TLS configures how this OIDCProvider is served over Transport
Layer Security (TLS).
description: TLS configures how this FederationDomain is served over
Transport Layer Security (TLS).
properties:
secretName:
description: "SecretName is an optional name of a Secret in the
same namespace, of type `kubernetes.io/tls`, which contains
the TLS serving certificate for the HTTPS endpoints served by
this OIDCProvider. When provided, the TLS Secret named here
this FederationDomain. When provided, the TLS Secret named here
must contain keys named `tls.crt` and `tls.key` that contain
the certificate and private key to use for TLS. \n Server Name
Indication (SNI) is an extension to the Transport Layer Security

View File

@ -6,7 +6,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
creationTimestamp: null
name: upstreamoidcproviders.idp.supervisor.pinniped.dev
name: oidcidentityproviders.idp.supervisor.pinniped.dev
spec:
group: idp.supervisor.pinniped.dev
names:
@ -14,10 +14,10 @@ spec:
- pinniped
- pinniped-idp
- pinniped-idps
kind: UpstreamOIDCProvider
listKind: UpstreamOIDCProviderList
plural: upstreamoidcproviders
singular: upstreamoidcprovider
kind: OIDCIdentityProvider
listKind: OIDCIdentityProviderList
plural: oidcidentityproviders
singular: oidcidentityprovider
scope: Namespaced
versions:
- additionalPrinterColumns:
@ -33,7 +33,7 @@ spec:
name: v1alpha1
schema:
openAPIV3Schema:
description: UpstreamOIDCProvider describes the configuration of an upstream
description: OIDCIdentityProvider describes the configuration of an upstream
OpenID Connect identity provider.
properties:
apiVersion:
@ -183,7 +183,7 @@ spec:
x-kubernetes-list-type: map
phase:
default: Pending
description: Phase summarizes the overall status of the UpstreamOIDCProvider.
description: Phase summarizes the overall status of the OIDCIdentityProvider.
enum:
- Pending
- Ready

View File

@ -301,14 +301,14 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcprovider"]
==== OIDCProvider
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomain"]
==== FederationDomain
OIDCProvider describes the configuration of an OIDC provider.
FederationDomain describes the configuration of an OIDC provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcproviderlist[$$OIDCProviderList$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomainlist[$$FederationDomainList$$]
****
[cols="25a,75a", options="header"]
@ -316,21 +316,21 @@ OIDCProvider describes the configuration of an OIDC provider.
| 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-supervisor-config-v1alpha1-oidcproviderspec[$$OIDCProviderSpec$$]__ | Spec of the OIDC provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcproviderstatus[$$OIDCProviderStatus$$]__ | Status of the OIDC provider.
| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomainspec[$$FederationDomainSpec$$]__ | Spec of the OIDC provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomainstatus[$$FederationDomainStatus$$]__ | Status of the OIDC provider.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcprovidersecrets"]
==== OIDCProviderSecrets
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomainsecrets"]
==== FederationDomainSecrets
OIDCProviderSecrets holds information about this OIDC Provider's secrets.
FederationDomainSecrets holds information about this OIDC Provider's secrets.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcproviderstatus[$$OIDCProviderStatus$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomainstatus[$$FederationDomainStatus$$]
****
[cols="25a,75a", options="header"]
@ -343,14 +343,14 @@ OIDCProviderSecrets holds information about this OIDC Provider's secrets.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcproviderspec"]
==== OIDCProviderSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomainspec"]
==== FederationDomainSpec
OIDCProviderSpec is a struct that describes an OIDC Provider.
FederationDomainSpec is a struct that describes an OIDC Provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcprovider[$$OIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomain[$$FederationDomain$$]
****
[cols="25a,75a", options="header"]
@ -358,44 +358,44 @@ OIDCProviderSpec is a struct that describes an OIDC Provider.
| Field | Description
| *`issuer`* __string__ | Issuer is the OIDC Provider's issuer, per the OIDC Discovery Metadata document, as well as the identifier that it will use for the iss claim in issued JWTs. This field will also be used as the base URL for any endpoints used by the OIDC Provider (e.g., if your issuer is https://example.com/foo, then your authorization endpoint will look like https://example.com/foo/some/path/to/auth/endpoint).
See https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.3 for more information.
| *`tls`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcprovidertlsspec[$$OIDCProviderTLSSpec$$]__ | TLS configures how this OIDCProvider is served over Transport Layer Security (TLS).
| *`tls`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomaintlsspec[$$FederationDomainTLSSpec$$]__ | TLS configures how this FederationDomain is served over Transport Layer Security (TLS).
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcproviderstatus"]
==== OIDCProviderStatus
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomainstatus"]
==== FederationDomainStatus
OIDCProviderStatus is a struct that describes the actual state of an OIDC Provider.
FederationDomainStatus is a struct that describes the actual state of an OIDC Provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcprovider[$$OIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomain[$$FederationDomain$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`status`* __OIDCProviderStatusCondition__ | Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure.
| *`status`* __FederationDomainStatusCondition__ | Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure.
| *`message`* __string__ | Message provides human-readable details about the Status.
| *`lastUpdateTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#time-v1-meta[$$Time$$]__ | LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get around some undesirable behavior with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811).
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcprovidersecrets[$$OIDCProviderSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcprovidertlsspec"]
==== OIDCProviderTLSSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomaintlsspec"]
==== FederationDomainTLSSpec
OIDCProviderTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
FederationDomainTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcproviderspec[$$OIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomainspec[$$FederationDomainSpec$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`secretName`* __string__ | SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains the TLS serving certificate for the HTTPS endpoints served by this OIDCProvider. When provided, the TLS Secret named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use for TLS.
| *`secretName`* __string__ | SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains the TLS serving certificate for the HTTPS endpoints served by this FederationDomain. When provided, the TLS Secret named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use for TLS.
Server Name Indication (SNI) is an extension to the Transport Layer Security (TLS) supported by all major browsers.
SecretName is required if you would like to use different TLS certificates for issuers of different hostnames. SNI requests do not include port numbers, so all issuers with the same DNS hostname must use the same SecretName value even if they have different port numbers.
SecretName is not required when you would like to use only the HTTP endpoints (e.g. when terminating TLS at an Ingress). It is also not required when you would like all requests to this OIDC Provider's HTTPS endpoints to use the default TLS certificate, which is configured elsewhere.
@ -418,7 +418,7 @@ Condition status of a resource (mirrored from the metav1.Condition type added in
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcproviderstatus[$$UpstreamOIDCProviderStatus$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderstatus[$$OIDCIdentityProviderStatus$$]
****
[cols="25a,75a", options="header"]
@ -440,7 +440,7 @@ OIDCAuthorizationConfig provides information about how to form the OAuth2 author
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
@ -457,7 +457,7 @@ OIDCClaims provides a mapping from upstream claims into identities.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
@ -475,7 +475,7 @@ OIDCClient contains information about an OIDC client (e.g., client ID and client
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
@ -485,31 +485,14 @@ OIDCClient contains information about an OIDC client (e.g., client ID and client
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-tlsspec"]
==== TLSSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityprovider"]
==== OIDCIdentityProvider
Configuration for TLS parameters related to identity provider integration.
OIDCIdentityProvider describes the configuration of an upstream OpenID Connect identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`certificateAuthorityData`* __string__ | X.509 Certificate Authority (base64-encoded PEM bundle). If omitted, a default set of system roots will be trusted.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcprovider"]
==== UpstreamOIDCProvider
UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcproviderlist[$$UpstreamOIDCProviderList$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderlist[$$OIDCIdentityProviderList$$]
****
[cols="25a,75a", options="header"]
@ -517,21 +500,21 @@ UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect i
| 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-supervisor-idp-v1alpha1-upstreamoidcproviderspec[$$UpstreamOIDCProviderSpec$$]__ | Spec for configuring the identity provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcproviderstatus[$$UpstreamOIDCProviderStatus$$]__ | Status of the identity provider.
| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]__ | Spec for configuring the identity provider.
| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderstatus[$$OIDCIdentityProviderStatus$$]__ | Status of the identity provider.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcproviderspec"]
==== UpstreamOIDCProviderSpec
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec"]
==== OIDCIdentityProviderSpec
Spec for configuring an OIDC identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcprovider[$$UpstreamOIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityprovider[$$OIDCIdentityProvider$$]
****
[cols="25a,75a", options="header"]
@ -545,24 +528,41 @@ Spec for configuring an OIDC identity provider.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcproviderstatus"]
==== UpstreamOIDCProviderStatus
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderstatus"]
==== OIDCIdentityProviderStatus
Status of an OIDC identity provider.
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-upstreamoidcprovider[$$UpstreamOIDCProvider$$]
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityprovider[$$OIDCIdentityProvider$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`phase`* __UpstreamOIDCProviderPhase__ | Phase summarizes the overall status of the UpstreamOIDCProvider.
| *`phase`* __OIDCIdentityProviderPhase__ | Phase summarizes the overall status of the OIDCIdentityProvider.
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-condition[$$Condition$$]__ | Represents the observations of an identity provider's current state.
|===
[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-tlsspec"]
==== TLSSpec
.Appears In:
****
- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-idp-v1alpha1-oidcidentityproviderspec[$$OIDCIdentityProviderSpec$$]
****
[cols="25a,75a", options="header"]
|===
| Field | Description
| *`certificateAuthorityData`* __string__ | X.509 Certificate Authority (base64-encoded PEM bundle). If omitted, a default set of system roots will be trusted.
|===
[id="{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1"]
=== login.concierge.pinniped.dev/v1alpha1

View File

@ -30,8 +30,8 @@ func init() {
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&OIDCProvider{},
&OIDCProviderList{},
&FederationDomain{},
&FederationDomainList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View File

@ -9,19 +9,19 @@ import (
)
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid;SameIssuerHostMustUseSameSecret
type OIDCProviderStatusCondition string
type FederationDomainStatusCondition string
const (
SuccessOIDCProviderStatusCondition = OIDCProviderStatusCondition("Success")
DuplicateOIDCProviderStatusCondition = OIDCProviderStatusCondition("Duplicate")
SameIssuerHostMustUseSameSecretOIDCProviderStatusCondition = OIDCProviderStatusCondition("SameIssuerHostMustUseSameSecret")
InvalidOIDCProviderStatusCondition = OIDCProviderStatusCondition("Invalid")
SuccessFederationDomainStatusCondition = FederationDomainStatusCondition("Success")
DuplicateFederationDomainStatusCondition = FederationDomainStatusCondition("Duplicate")
SameIssuerHostMustUseSameSecretFederationDomainStatusCondition = FederationDomainStatusCondition("SameIssuerHostMustUseSameSecret")
InvalidFederationDomainStatusCondition = FederationDomainStatusCondition("Invalid")
)
// OIDCProviderTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
type OIDCProviderTLSSpec struct {
// FederationDomainTLSSpec is a struct that describes the TLS configuration for an OIDC Provider.
type FederationDomainTLSSpec struct {
// SecretName is an optional name of a Secret in the same namespace, of type `kubernetes.io/tls`, which contains
// the TLS serving certificate for the HTTPS endpoints served by this OIDCProvider. When provided, the TLS Secret
// the TLS serving certificate for the HTTPS endpoints served by this FederationDomain. When provided, the TLS Secret
// named here must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use
// for TLS.
//
@ -41,8 +41,8 @@ type OIDCProviderTLSSpec struct {
SecretName string `json:"secretName,omitempty"`
}
// OIDCProviderSpec is a struct that describes an OIDC Provider.
type OIDCProviderSpec struct {
// FederationDomainSpec is a struct that describes an OIDC Provider.
type FederationDomainSpec struct {
// Issuer is the OIDC Provider's issuer, per the OIDC Discovery Metadata document, as well as the
// identifier that it will use for the iss claim in issued JWTs. This field will also be used as
// the base URL for any endpoints used by the OIDC Provider (e.g., if your issuer is
@ -54,13 +54,13 @@ type OIDCProviderSpec struct {
// +kubebuilder:validation:MinLength=1
Issuer string `json:"issuer"`
// TLS configures how this OIDCProvider is served over Transport Layer Security (TLS).
// TLS configures how this FederationDomain is served over Transport Layer Security (TLS).
// +optional
TLS *OIDCProviderTLSSpec `json:"tls,omitempty"`
TLS *FederationDomainTLSSpec `json:"tls,omitempty"`
}
// OIDCProviderSecrets holds information about this OIDC Provider's secrets.
type OIDCProviderSecrets struct {
// FederationDomainSecrets holds information about this OIDC Provider's secrets.
type FederationDomainSecrets struct {
// JWKS holds the name of the corev1.Secret in which this OIDC Provider's signing/verification keys are
// stored. If it is empty, then the signing/verification keys are either unknown or they don't
// exist.
@ -83,12 +83,12 @@ type OIDCProviderSecrets struct {
StateEncryptionKey corev1.LocalObjectReference `json:"stateEncryptionKey,omitempty"`
}
// OIDCProviderStatus is a struct that describes the actual state of an OIDC Provider.
type OIDCProviderStatus struct {
// FederationDomainStatus is a struct that describes the actual state of an OIDC Provider.
type FederationDomainStatus struct {
// Status holds an enum that describes the state of this OIDC Provider. Note that this Status can
// represent success or failure.
// +optional
Status OIDCProviderStatusCondition `json:"status,omitempty"`
Status FederationDomainStatusCondition `json:"status,omitempty"`
// Message provides human-readable details about the Status.
// +optional
@ -102,29 +102,29 @@ type OIDCProviderStatus struct {
// Secrets contains information about this OIDC Provider's secrets.
// +optional
Secrets OIDCProviderSecrets `json:"secrets,omitempty"`
Secrets FederationDomainSecrets `json:"secrets,omitempty"`
}
// OIDCProvider describes the configuration of an OIDC provider.
// FederationDomain describes the configuration of an OIDC provider.
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=pinniped
type OIDCProvider struct {
type FederationDomain struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec of the OIDC provider.
Spec OIDCProviderSpec `json:"spec"`
Spec FederationDomainSpec `json:"spec"`
// Status of the OIDC provider.
Status OIDCProviderStatus `json:"status,omitempty"`
Status FederationDomainStatus `json:"status,omitempty"`
}
// List of OIDCProvider objects.
// List of FederationDomain objects.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type OIDCProviderList struct {
type FederationDomainList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []OIDCProvider `json:"items"`
Items []FederationDomain `json:"items"`
}

View File

@ -12,7 +12,7 @@ import (
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProvider) DeepCopyInto(out *OIDCProvider) {
func (in *FederationDomain) DeepCopyInto(out *FederationDomain) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
@ -21,18 +21,18 @@ func (in *OIDCProvider) DeepCopyInto(out *OIDCProvider) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProvider.
func (in *OIDCProvider) DeepCopy() *OIDCProvider {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomain.
func (in *FederationDomain) DeepCopy() *FederationDomain {
if in == nil {
return nil
}
out := new(OIDCProvider)
out := new(FederationDomain)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCProvider) DeepCopyObject() runtime.Object {
func (in *FederationDomain) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
@ -40,13 +40,13 @@ func (in *OIDCProvider) DeepCopyObject() runtime.Object {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderList) DeepCopyInto(out *OIDCProviderList) {
func (in *FederationDomainList) DeepCopyInto(out *FederationDomainList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]OIDCProvider, len(*in))
*out = make([]FederationDomain, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -54,18 +54,18 @@ func (in *OIDCProviderList) DeepCopyInto(out *OIDCProviderList) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderList.
func (in *OIDCProviderList) DeepCopy() *OIDCProviderList {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainList.
func (in *FederationDomainList) DeepCopy() *FederationDomainList {
if in == nil {
return nil
}
out := new(OIDCProviderList)
out := new(FederationDomainList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCProviderList) DeepCopyObject() runtime.Object {
func (in *FederationDomainList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
@ -73,7 +73,7 @@ func (in *OIDCProviderList) DeepCopyObject() runtime.Object {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderSecrets) DeepCopyInto(out *OIDCProviderSecrets) {
func (in *FederationDomainSecrets) DeepCopyInto(out *FederationDomainSecrets) {
*out = *in
out.JWKS = in.JWKS
out.TokenSigningKey = in.TokenSigningKey
@ -82,39 +82,39 @@ func (in *OIDCProviderSecrets) DeepCopyInto(out *OIDCProviderSecrets) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderSecrets.
func (in *OIDCProviderSecrets) DeepCopy() *OIDCProviderSecrets {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainSecrets.
func (in *FederationDomainSecrets) DeepCopy() *FederationDomainSecrets {
if in == nil {
return nil
}
out := new(OIDCProviderSecrets)
out := new(FederationDomainSecrets)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderSpec) DeepCopyInto(out *OIDCProviderSpec) {
func (in *FederationDomainSpec) DeepCopyInto(out *FederationDomainSpec) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(OIDCProviderTLSSpec)
*out = new(FederationDomainTLSSpec)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderSpec.
func (in *OIDCProviderSpec) DeepCopy() *OIDCProviderSpec {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainSpec.
func (in *FederationDomainSpec) DeepCopy() *FederationDomainSpec {
if in == nil {
return nil
}
out := new(OIDCProviderSpec)
out := new(FederationDomainSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderStatus) DeepCopyInto(out *OIDCProviderStatus) {
func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
*out = *in
if in.LastUpdateTime != nil {
in, out := &in.LastUpdateTime, &out.LastUpdateTime
@ -124,28 +124,28 @@ func (in *OIDCProviderStatus) DeepCopyInto(out *OIDCProviderStatus) {
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderStatus.
func (in *OIDCProviderStatus) DeepCopy() *OIDCProviderStatus {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainStatus.
func (in *FederationDomainStatus) DeepCopy() *FederationDomainStatus {
if in == nil {
return nil
}
out := new(OIDCProviderStatus)
out := new(FederationDomainStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCProviderTLSSpec) DeepCopyInto(out *OIDCProviderTLSSpec) {
func (in *FederationDomainTLSSpec) DeepCopyInto(out *FederationDomainTLSSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderTLSSpec.
func (in *OIDCProviderTLSSpec) DeepCopy() *OIDCProviderTLSSpec {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederationDomainTLSSpec.
func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec {
if in == nil {
return nil
}
out := new(OIDCProviderTLSSpec)
out := new(FederationDomainTLSSpec)
in.DeepCopyInto(out)
return out
}

View File

@ -30,8 +30,8 @@ func init() {
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&UpstreamOIDCProvider{},
&UpstreamOIDCProviderList{},
&OIDCIdentityProvider{},
&OIDCIdentityProviderList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View File

@ -7,25 +7,25 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type UpstreamOIDCProviderPhase string
type OIDCIdentityProviderPhase string
const (
// PhasePending is the default phase for newly-created UpstreamOIDCProvider resources.
PhasePending UpstreamOIDCProviderPhase = "Pending"
// PhasePending is the default phase for newly-created OIDCIdentityProvider resources.
PhasePending OIDCIdentityProviderPhase = "Pending"
// PhaseReady is the phase for an UpstreamOIDCProvider resource in a healthy state.
PhaseReady UpstreamOIDCProviderPhase = "Ready"
// PhaseReady is the phase for an OIDCIdentityProvider resource in a healthy state.
PhaseReady OIDCIdentityProviderPhase = "Ready"
// PhaseError is the phase for an UpstreamOIDCProvider in an unhealthy state.
PhaseError UpstreamOIDCProviderPhase = "Error"
// PhaseError is the phase for an OIDCIdentityProvider in an unhealthy state.
PhaseError OIDCIdentityProviderPhase = "Error"
)
// Status of an OIDC identity provider.
type UpstreamOIDCProviderStatus struct {
// Phase summarizes the overall status of the UpstreamOIDCProvider.
type OIDCIdentityProviderStatus struct {
// Phase summarizes the overall status of the OIDCIdentityProvider.
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Ready;Error
Phase UpstreamOIDCProviderPhase `json:"phase,omitempty"`
Phase OIDCIdentityProviderPhase `json:"phase,omitempty"`
// Represents the observations of an identity provider's current state.
// +patchMergeKey=type
@ -68,7 +68,7 @@ type OIDCClient struct {
}
// Spec for configuring an OIDC identity provider.
type UpstreamOIDCProviderSpec struct {
type OIDCIdentityProviderSpec struct {
// Issuer is the issuer URL of this OIDC identity provider, i.e., where to fetch
// /.well-known/openid-configuration.
// +kubebuilder:validation:MinLength=1
@ -94,7 +94,7 @@ type UpstreamOIDCProviderSpec struct {
Client OIDCClient `json:"client"`
}
// UpstreamOIDCProvider describes the configuration of an upstream OpenID Connect identity provider.
// OIDCIdentityProvider describes the configuration of an upstream OpenID Connect identity provider.
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=pinniped;pinniped-idp;pinniped-idps
@ -102,22 +102,22 @@ type UpstreamOIDCProviderSpec struct {
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:subresource:status
type UpstreamOIDCProvider struct {
type OIDCIdentityProvider struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec for configuring the identity provider.
Spec UpstreamOIDCProviderSpec `json:"spec"`
Spec OIDCIdentityProviderSpec `json:"spec"`
// Status of the identity provider.
Status UpstreamOIDCProviderStatus `json:"status,omitempty"`
Status OIDCIdentityProviderStatus `json:"status,omitempty"`
}
// List of UpstreamOIDCProvider objects.
// List of OIDCIdentityProvider objects.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type UpstreamOIDCProviderList struct {
type OIDCIdentityProviderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []UpstreamOIDCProvider `json:"items"`
Items []OIDCIdentityProvider `json:"items"`
}

View File

@ -81,6 +81,114 @@ func (in *OIDCClient) DeepCopy() *OIDCClient {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProvider) DeepCopyInto(out *OIDCIdentityProvider) {
*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 OIDCIdentityProvider.
func (in *OIDCIdentityProvider) DeepCopy() *OIDCIdentityProvider {
if in == nil {
return nil
}
out := new(OIDCIdentityProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCIdentityProvider) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProviderList) DeepCopyInto(out *OIDCIdentityProviderList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]OIDCIdentityProvider, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityProviderList.
func (in *OIDCIdentityProviderList) DeepCopy() *OIDCIdentityProviderList {
if in == nil {
return nil
}
out := new(OIDCIdentityProviderList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *OIDCIdentityProviderList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProviderSpec) DeepCopyInto(out *OIDCIdentityProviderSpec) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(TLSSpec)
**out = **in
}
in.AuthorizationConfig.DeepCopyInto(&out.AuthorizationConfig)
out.Claims = in.Claims
out.Client = in.Client
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityProviderSpec.
func (in *OIDCIdentityProviderSpec) DeepCopy() *OIDCIdentityProviderSpec {
if in == nil {
return nil
}
out := new(OIDCIdentityProviderSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OIDCIdentityProviderStatus) DeepCopyInto(out *OIDCIdentityProviderStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCIdentityProviderStatus.
func (in *OIDCIdentityProviderStatus) DeepCopy() *OIDCIdentityProviderStatus {
if in == nil {
return nil
}
out := new(OIDCIdentityProviderStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TLSSpec) DeepCopyInto(out *TLSSpec) {
*out = *in
@ -96,111 +204,3 @@ func (in *TLSSpec) DeepCopy() *TLSSpec {
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProvider) DeepCopyInto(out *UpstreamOIDCProvider) {
*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 UpstreamOIDCProvider.
func (in *UpstreamOIDCProvider) DeepCopy() *UpstreamOIDCProvider {
if in == nil {
return nil
}
out := new(UpstreamOIDCProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *UpstreamOIDCProvider) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProviderList) DeepCopyInto(out *UpstreamOIDCProviderList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]UpstreamOIDCProvider, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOIDCProviderList.
func (in *UpstreamOIDCProviderList) DeepCopy() *UpstreamOIDCProviderList {
if in == nil {
return nil
}
out := new(UpstreamOIDCProviderList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *UpstreamOIDCProviderList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProviderSpec) DeepCopyInto(out *UpstreamOIDCProviderSpec) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(TLSSpec)
**out = **in
}
in.AuthorizationConfig.DeepCopyInto(&out.AuthorizationConfig)
out.Claims = in.Claims
out.Client = in.Client
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOIDCProviderSpec.
func (in *UpstreamOIDCProviderSpec) DeepCopy() *UpstreamOIDCProviderSpec {
if in == nil {
return nil
}
out := new(UpstreamOIDCProviderSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpstreamOIDCProviderStatus) DeepCopyInto(out *UpstreamOIDCProviderStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOIDCProviderStatus.
func (in *UpstreamOIDCProviderStatus) DeepCopy() *UpstreamOIDCProviderStatus {
if in == nil {
return nil
}
out := new(UpstreamOIDCProviderStatus)
in.DeepCopyInto(out)
return out
}

View File

@ -13,7 +13,7 @@ import (
type ConfigV1alpha1Interface interface {
RESTClient() rest.Interface
OIDCProvidersGetter
FederationDomainsGetter
}
// ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group.
@ -21,8 +21,8 @@ type ConfigV1alpha1Client struct {
restClient rest.Interface
}
func (c *ConfigV1alpha1Client) OIDCProviders(namespace string) OIDCProviderInterface {
return newOIDCProviders(c, namespace)
func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDomainInterface {
return newFederationDomains(c, namespace)
}
// NewForConfig creates a new ConfigV1alpha1Client for the given config.

View File

@ -15,8 +15,8 @@ type FakeConfigV1alpha1 struct {
*testing.Fake
}
func (c *FakeConfigV1alpha1) OIDCProviders(namespace string) v1alpha1.OIDCProviderInterface {
return &FakeOIDCProviders{c, namespace}
func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.FederationDomainInterface {
return &FakeFederationDomains{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate

View File

@ -0,0 +1,129 @@
// 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/supervisor/config/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"
)
// FakeFederationDomains implements FederationDomainInterface
type FakeFederationDomains struct {
Fake *FakeConfigV1alpha1
ns string
}
var federationdomainsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "federationdomains"}
var federationdomainsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "FederationDomain"}
// Get takes name of the federationDomain, and returns the corresponding federationDomain object, and an error if there is any.
func (c *FakeFederationDomains) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(federationdomainsResource, c.ns, name), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}
// List takes label and field selectors, and returns the list of FederationDomains that match those selectors.
func (c *FakeFederationDomains) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FederationDomainList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(federationdomainsResource, federationdomainsKind, c.ns, opts), &v1alpha1.FederationDomainList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.FederationDomainList{ListMeta: obj.(*v1alpha1.FederationDomainList).ListMeta}
for _, item := range obj.(*v1alpha1.FederationDomainList).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 federationDomains.
func (c *FakeFederationDomains) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(federationdomainsResource, c.ns, opts))
}
// Create takes the representation of a federationDomain and creates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *FakeFederationDomains) Create(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.CreateOptions) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(federationdomainsResource, c.ns, federationDomain), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}
// Update takes the representation of a federationDomain and updates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *FakeFederationDomains) Update(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(federationdomainsResource, c.ns, federationDomain), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), 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 *FakeFederationDomains) UpdateStatus(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (*v1alpha1.FederationDomain, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(federationdomainsResource, "status", c.ns, federationDomain), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}
// Delete takes name of the federationDomain and deletes it. Returns an error if one occurs.
func (c *FakeFederationDomains) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(federationdomainsResource, c.ns, name), &v1alpha1.FederationDomain{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeFederationDomains) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(federationdomainsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.FederationDomainList{})
return err
}
// Patch applies the patch and returns the patched federationDomain.
func (c *FakeFederationDomains) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FederationDomain, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(federationdomainsResource, c.ns, name, pt, data, subresources...), &v1alpha1.FederationDomain{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.FederationDomain), err
}

View File

@ -1,129 +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/supervisor/config/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"
)
// FakeOIDCProviders implements OIDCProviderInterface
type FakeOIDCProviders struct {
Fake *FakeConfigV1alpha1
ns string
}
var oidcprovidersResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcproviders"}
var oidcprovidersKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCProvider"}
// Get takes name of the oIDCProvider, and returns the corresponding oIDCProvider object, and an error if there is any.
func (c *FakeOIDCProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(oidcprovidersResource, c.ns, name), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}
// List takes label and field selectors, and returns the list of OIDCProviders that match those selectors.
func (c *FakeOIDCProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCProviderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(oidcprovidersResource, oidcprovidersKind, c.ns, opts), &v1alpha1.OIDCProviderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.OIDCProviderList{ListMeta: obj.(*v1alpha1.OIDCProviderList).ListMeta}
for _, item := range obj.(*v1alpha1.OIDCProviderList).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 oIDCProviders.
func (c *FakeOIDCProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(oidcprovidersResource, c.ns, opts))
}
// Create takes the representation of a oIDCProvider and creates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *FakeOIDCProviders) Create(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.CreateOptions) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(oidcprovidersResource, c.ns, oIDCProvider), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}
// Update takes the representation of a oIDCProvider and updates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *FakeOIDCProviders) Update(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(oidcprovidersResource, c.ns, oIDCProvider), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), 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 *FakeOIDCProviders) UpdateStatus(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCProvider, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(oidcprovidersResource, "status", c.ns, oIDCProvider), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}
// Delete takes name of the oIDCProvider and deletes it. Returns an error if one occurs.
func (c *FakeOIDCProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(oidcprovidersResource, c.ns, name), &v1alpha1.OIDCProvider{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeOIDCProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(oidcprovidersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.OIDCProviderList{})
return err
}
// Patch applies the patch and returns the patched oIDCProvider.
func (c *FakeOIDCProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(oidcprovidersResource, c.ns, name, pt, data, subresources...), &v1alpha1.OIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCProvider), err
}

View File

@ -0,0 +1,182 @@
// 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/supervisor/config/v1alpha1"
scheme "go.pinniped.dev/generated/1.19/client/supervisor/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"
)
// FederationDomainsGetter has a method to return a FederationDomainInterface.
// A group's client should implement this interface.
type FederationDomainsGetter interface {
FederationDomains(namespace string) FederationDomainInterface
}
// FederationDomainInterface has methods to work with FederationDomain resources.
type FederationDomainInterface interface {
Create(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.CreateOptions) (*v1alpha1.FederationDomain, error)
Update(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (*v1alpha1.FederationDomain, error)
UpdateStatus(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (*v1alpha1.FederationDomain, 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.FederationDomain, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FederationDomainList, 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.FederationDomain, err error)
FederationDomainExpansion
}
// federationDomains implements FederationDomainInterface
type federationDomains struct {
client rest.Interface
ns string
}
// newFederationDomains returns a FederationDomains
func newFederationDomains(c *ConfigV1alpha1Client, namespace string) *federationDomains {
return &federationDomains{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the federationDomain, and returns the corresponding federationDomain object, and an error if there is any.
func (c *federationDomains) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Get().
Namespace(c.ns).
Resource("federationdomains").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of FederationDomains that match those selectors.
func (c *federationDomains) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FederationDomainList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.FederationDomainList{}
err = c.client.Get().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested federationDomains.
func (c *federationDomains) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a federationDomain and creates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *federationDomains) Create(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.CreateOptions) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Post().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&opts, scheme.ParameterCodec).
Body(federationDomain).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a federationDomain and updates it. Returns the server's representation of the federationDomain, and an error, if there is any.
func (c *federationDomains) Update(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Put().
Namespace(c.ns).
Resource("federationdomains").
Name(federationDomain.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(federationDomain).
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 *federationDomains) UpdateStatus(ctx context.Context, federationDomain *v1alpha1.FederationDomain, opts v1.UpdateOptions) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Put().
Namespace(c.ns).
Resource("federationdomains").
Name(federationDomain.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(federationDomain).
Do(ctx).
Into(result)
return
}
// Delete takes name of the federationDomain and deletes it. Returns an error if one occurs.
func (c *federationDomains) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("federationdomains").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *federationDomains) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("federationdomains").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched federationDomain.
func (c *federationDomains) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FederationDomain, err error) {
result = &v1alpha1.FederationDomain{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("federationdomains").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -5,4 +5,4 @@
package v1alpha1
type OIDCProviderExpansion interface{}
type FederationDomainExpansion interface{}

View File

@ -1,182 +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/supervisor/config/v1alpha1"
scheme "go.pinniped.dev/generated/1.19/client/supervisor/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"
)
// OIDCProvidersGetter has a method to return a OIDCProviderInterface.
// A group's client should implement this interface.
type OIDCProvidersGetter interface {
OIDCProviders(namespace string) OIDCProviderInterface
}
// OIDCProviderInterface has methods to work with OIDCProvider resources.
type OIDCProviderInterface interface {
Create(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.CreateOptions) (*v1alpha1.OIDCProvider, error)
Update(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCProvider, error)
UpdateStatus(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCProvider, 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.OIDCProvider, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.OIDCProviderList, 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.OIDCProvider, err error)
OIDCProviderExpansion
}
// oIDCProviders implements OIDCProviderInterface
type oIDCProviders struct {
client rest.Interface
ns string
}
// newOIDCProviders returns a OIDCProviders
func newOIDCProviders(c *ConfigV1alpha1Client, namespace string) *oIDCProviders {
return &oIDCProviders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the oIDCProvider, and returns the corresponding oIDCProvider object, and an error if there is any.
func (c *oIDCProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcproviders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of OIDCProviders that match those selectors.
func (c *oIDCProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCProviderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.OIDCProviderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested oIDCProviders.
func (c *oIDCProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a oIDCProvider and creates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *oIDCProviders) Create(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.CreateOptions) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Post().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCProvider).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a oIDCProvider and updates it. Returns the server's representation of the oIDCProvider, and an error, if there is any.
func (c *oIDCProviders) Update(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcproviders").
Name(oIDCProvider.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCProvider).
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 *oIDCProviders) UpdateStatus(ctx context.Context, oIDCProvider *v1alpha1.OIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcproviders").
Name(oIDCProvider.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCProvider).
Do(ctx).
Into(result)
return
}
// Delete takes name of the oIDCProvider and deletes it. Returns an error if one occurs.
func (c *oIDCProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("oidcproviders").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *oIDCProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("oidcproviders").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched oIDCProvider.
func (c *oIDCProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCProvider, err error) {
result = &v1alpha1.OIDCProvider{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("oidcproviders").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -15,8 +15,8 @@ type FakeIDPV1alpha1 struct {
*testing.Fake
}
func (c *FakeIDPV1alpha1) UpstreamOIDCProviders(namespace string) v1alpha1.UpstreamOIDCProviderInterface {
return &FakeUpstreamOIDCProviders{c, namespace}
func (c *FakeIDPV1alpha1) OIDCIdentityProviders(namespace string) v1alpha1.OIDCIdentityProviderInterface {
return &FakeOIDCIdentityProviders{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate

View File

@ -0,0 +1,129 @@
// 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/supervisor/idp/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"
)
// FakeOIDCIdentityProviders implements OIDCIdentityProviderInterface
type FakeOIDCIdentityProviders struct {
Fake *FakeIDPV1alpha1
ns string
}
var oidcidentityprovidersResource = schema.GroupVersionResource{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcidentityproviders"}
var oidcidentityprovidersKind = schema.GroupVersionKind{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCIdentityProvider"}
// Get takes name of the oIDCIdentityProvider, and returns the corresponding oIDCIdentityProvider object, and an error if there is any.
func (c *FakeOIDCIdentityProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(oidcidentityprovidersResource, c.ns, name), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}
// List takes label and field selectors, and returns the list of OIDCIdentityProviders that match those selectors.
func (c *FakeOIDCIdentityProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCIdentityProviderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(oidcidentityprovidersResource, oidcidentityprovidersKind, c.ns, opts), &v1alpha1.OIDCIdentityProviderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.OIDCIdentityProviderList{ListMeta: obj.(*v1alpha1.OIDCIdentityProviderList).ListMeta}
for _, item := range obj.(*v1alpha1.OIDCIdentityProviderList).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 oIDCIdentityProviders.
func (c *FakeOIDCIdentityProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(oidcidentityprovidersResource, c.ns, opts))
}
// Create takes the representation of a oIDCIdentityProvider and creates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *FakeOIDCIdentityProviders) Create(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.CreateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(oidcidentityprovidersResource, c.ns, oIDCIdentityProvider), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}
// Update takes the representation of a oIDCIdentityProvider and updates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *FakeOIDCIdentityProviders) Update(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(oidcidentityprovidersResource, c.ns, oIDCIdentityProvider), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), 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 *FakeOIDCIdentityProviders) UpdateStatus(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCIdentityProvider, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(oidcidentityprovidersResource, "status", c.ns, oIDCIdentityProvider), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}
// Delete takes name of the oIDCIdentityProvider and deletes it. Returns an error if one occurs.
func (c *FakeOIDCIdentityProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(oidcidentityprovidersResource, c.ns, name), &v1alpha1.OIDCIdentityProvider{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeOIDCIdentityProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(oidcidentityprovidersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.OIDCIdentityProviderList{})
return err
}
// Patch applies the patch and returns the patched oIDCIdentityProvider.
func (c *FakeOIDCIdentityProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCIdentityProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(oidcidentityprovidersResource, c.ns, name, pt, data, subresources...), &v1alpha1.OIDCIdentityProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.OIDCIdentityProvider), err
}

View File

@ -1,129 +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/supervisor/idp/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"
)
// FakeUpstreamOIDCProviders implements UpstreamOIDCProviderInterface
type FakeUpstreamOIDCProviders struct {
Fake *FakeIDPV1alpha1
ns string
}
var upstreamoidcprovidersResource = schema.GroupVersionResource{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "upstreamoidcproviders"}
var upstreamoidcprovidersKind = schema.GroupVersionKind{Group: "idp.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "UpstreamOIDCProvider"}
// Get takes name of the upstreamOIDCProvider, and returns the corresponding upstreamOIDCProvider object, and an error if there is any.
func (c *FakeUpstreamOIDCProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(upstreamoidcprovidersResource, c.ns, name), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}
// List takes label and field selectors, and returns the list of UpstreamOIDCProviders that match those selectors.
func (c *FakeUpstreamOIDCProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.UpstreamOIDCProviderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(upstreamoidcprovidersResource, upstreamoidcprovidersKind, c.ns, opts), &v1alpha1.UpstreamOIDCProviderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.UpstreamOIDCProviderList{ListMeta: obj.(*v1alpha1.UpstreamOIDCProviderList).ListMeta}
for _, item := range obj.(*v1alpha1.UpstreamOIDCProviderList).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 upstreamOIDCProviders.
func (c *FakeUpstreamOIDCProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(upstreamoidcprovidersResource, c.ns, opts))
}
// Create takes the representation of a upstreamOIDCProvider and creates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *FakeUpstreamOIDCProviders) Create(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.CreateOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(upstreamoidcprovidersResource, c.ns, upstreamOIDCProvider), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}
// Update takes the representation of a upstreamOIDCProvider and updates it. Returns the server's representation of the upstreamOIDCProvider, and an error, if there is any.
func (c *FakeUpstreamOIDCProviders) Update(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.UpdateOptions) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(upstreamoidcprovidersResource, c.ns, upstreamOIDCProvider), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), 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 *FakeUpstreamOIDCProviders) UpdateStatus(ctx context.Context, upstreamOIDCProvider *v1alpha1.UpstreamOIDCProvider, opts v1.UpdateOptions) (*v1alpha1.UpstreamOIDCProvider, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(upstreamoidcprovidersResource, "status", c.ns, upstreamOIDCProvider), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}
// Delete takes name of the upstreamOIDCProvider and deletes it. Returns an error if one occurs.
func (c *FakeUpstreamOIDCProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(upstreamoidcprovidersResource, c.ns, name), &v1alpha1.UpstreamOIDCProvider{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeUpstreamOIDCProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(upstreamoidcprovidersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.UpstreamOIDCProviderList{})
return err
}
// Patch applies the patch and returns the patched upstreamOIDCProvider.
func (c *FakeUpstreamOIDCProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.UpstreamOIDCProvider, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(upstreamoidcprovidersResource, c.ns, name, pt, data, subresources...), &v1alpha1.UpstreamOIDCProvider{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UpstreamOIDCProvider), err
}

View File

@ -5,4 +5,4 @@
package v1alpha1
type UpstreamOIDCProviderExpansion interface{}
type OIDCIdentityProviderExpansion interface{}

View File

@ -13,7 +13,7 @@ import (
type IDPV1alpha1Interface interface {
RESTClient() rest.Interface
UpstreamOIDCProvidersGetter
OIDCIdentityProvidersGetter
}
// IDPV1alpha1Client is used to interact with features provided by the idp.supervisor.pinniped.dev group.
@ -21,8 +21,8 @@ type IDPV1alpha1Client struct {
restClient rest.Interface
}
func (c *IDPV1alpha1Client) UpstreamOIDCProviders(namespace string) UpstreamOIDCProviderInterface {
return newUpstreamOIDCProviders(c, namespace)
func (c *IDPV1alpha1Client) OIDCIdentityProviders(namespace string) OIDCIdentityProviderInterface {
return newOIDCIdentityProviders(c, namespace)
}
// NewForConfig creates a new IDPV1alpha1Client for the given config.

View File

@ -0,0 +1,182 @@
// 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/supervisor/idp/v1alpha1"
scheme "go.pinniped.dev/generated/1.19/client/supervisor/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"
)
// OIDCIdentityProvidersGetter has a method to return a OIDCIdentityProviderInterface.
// A group's client should implement this interface.
type OIDCIdentityProvidersGetter interface {
OIDCIdentityProviders(namespace string) OIDCIdentityProviderInterface
}
// OIDCIdentityProviderInterface has methods to work with OIDCIdentityProvider resources.
type OIDCIdentityProviderInterface interface {
Create(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.CreateOptions) (*v1alpha1.OIDCIdentityProvider, error)
Update(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCIdentityProvider, error)
UpdateStatus(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (*v1alpha1.OIDCIdentityProvider, 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.OIDCIdentityProvider, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.OIDCIdentityProviderList, 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.OIDCIdentityProvider, err error)
OIDCIdentityProviderExpansion
}
// oIDCIdentityProviders implements OIDCIdentityProviderInterface
type oIDCIdentityProviders struct {
client rest.Interface
ns string
}
// newOIDCIdentityProviders returns a OIDCIdentityProviders
func newOIDCIdentityProviders(c *IDPV1alpha1Client, namespace string) *oIDCIdentityProviders {
return &oIDCIdentityProviders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the oIDCIdentityProvider, and returns the corresponding oIDCIdentityProvider object, and an error if there is any.
func (c *oIDCIdentityProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of OIDCIdentityProviders that match those selectors.
func (c *oIDCIdentityProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCIdentityProviderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.OIDCIdentityProviderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested oIDCIdentityProviders.
func (c *oIDCIdentityProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a oIDCIdentityProvider and creates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *oIDCIdentityProviders) Create(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.CreateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Post().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCIdentityProvider).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a oIDCIdentityProvider and updates it. Returns the server's representation of the oIDCIdentityProvider, and an error, if there is any.
func (c *oIDCIdentityProviders) Update(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(oIDCIdentityProvider.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCIdentityProvider).
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 *oIDCIdentityProviders) UpdateStatus(ctx context.Context, oIDCIdentityProvider *v1alpha1.OIDCIdentityProvider, opts v1.UpdateOptions) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Put().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(oIDCIdentityProvider.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(oIDCIdentityProvider).
Do(ctx).
Into(result)
return
}
// Delete takes name of the oIDCIdentityProvider and deletes it. Returns an error if one occurs.
func (c *oIDCIdentityProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *oIDCIdentityProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("oidcidentityproviders").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched oIDCIdentityProvider.
func (c *oIDCIdentityProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCIdentityProvider, err error) {
result = &v1alpha1.OIDCIdentityProvider{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("oidcidentityproviders").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

Some files were not shown because too many files have changed in this diff Show More