update FederationDomain.status.conditions to come from metav1
This commit is contained in:
parent
b6f0dc3ba7
commit
a7bd494ec3
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -352,9 +352,15 @@ spec:
|
|||||||
description: Conditions represent the observations of an FederationDomain's
|
description: Conditions represent the observations of an FederationDomain's
|
||||||
current state.
|
current state.
|
||||||
items:
|
items:
|
||||||
description: Condition status of a resource (mirrored from the metav1.Condition
|
description: "Condition contains details for one aspect of the current
|
||||||
type added in Kubernetes 1.19). In a future API version we can
|
state of this API Resource. --- This struct is intended for direct
|
||||||
switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413.
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
\n type FooStatus struct{ // Represents the observations of a
|
||||||
|
foo's current state. // Known .status.conditions.type are: \"Available\",
|
||||||
|
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
|
||||||
|
// +listType=map // +listMapKey=type Conditions []metav1.Condition
|
||||||
|
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
|
||||||
|
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||||
properties:
|
properties:
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: lastTransitionTime is the last time the condition
|
description: lastTransitionTime is the last time the condition
|
||||||
|
2
generated/1.21/README.adoc
generated
2
generated/1.21/README.adoc
generated
@ -741,7 +741,7 @@ FederationDomainStatus is a struct that describes the actual state of an OIDC Pr
|
|||||||
|===
|
|===
|
||||||
| Field | Description
|
| Field | Description
|
||||||
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
||||||
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
| *`conditions`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#condition-v1-meta[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
||||||
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -145,7 +145,7 @@ func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
|
|||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -352,9 +352,15 @@ spec:
|
|||||||
description: Conditions represent the observations of an FederationDomain's
|
description: Conditions represent the observations of an FederationDomain's
|
||||||
current state.
|
current state.
|
||||||
items:
|
items:
|
||||||
description: Condition status of a resource (mirrored from the metav1.Condition
|
description: "Condition contains details for one aspect of the current
|
||||||
type added in Kubernetes 1.19). In a future API version we can
|
state of this API Resource. --- This struct is intended for direct
|
||||||
switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413.
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
type FooStatus struct{ // Represents the observations of a foo's
|
||||||
|
current state. // Known .status.conditions.type are: \"Available\",
|
||||||
|
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
|
||||||
|
// +listType=map // +listMapKey=type Conditions []metav1.Condition
|
||||||
|
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
|
||||||
|
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||||
properties:
|
properties:
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: lastTransitionTime is the last time the condition
|
description: lastTransitionTime is the last time the condition
|
||||||
|
2
generated/1.22/README.adoc
generated
2
generated/1.22/README.adoc
generated
@ -741,7 +741,7 @@ FederationDomainStatus is a struct that describes the actual state of an OIDC Pr
|
|||||||
|===
|
|===
|
||||||
| Field | Description
|
| Field | Description
|
||||||
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
||||||
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
| *`conditions`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#condition-v1-meta[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
||||||
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -145,7 +145,7 @@ func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
|
|||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -352,9 +352,15 @@ spec:
|
|||||||
description: Conditions represent the observations of an FederationDomain's
|
description: Conditions represent the observations of an FederationDomain's
|
||||||
current state.
|
current state.
|
||||||
items:
|
items:
|
||||||
description: Condition status of a resource (mirrored from the metav1.Condition
|
description: "Condition contains details for one aspect of the current
|
||||||
type added in Kubernetes 1.19). In a future API version we can
|
state of this API Resource. --- This struct is intended for direct
|
||||||
switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413.
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
type FooStatus struct{ // Represents the observations of a foo's
|
||||||
|
current state. // Known .status.conditions.type are: \"Available\",
|
||||||
|
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
|
||||||
|
// +listType=map // +listMapKey=type Conditions []metav1.Condition
|
||||||
|
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
|
||||||
|
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||||
properties:
|
properties:
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: lastTransitionTime is the last time the condition
|
description: lastTransitionTime is the last time the condition
|
||||||
|
2
generated/1.23/README.adoc
generated
2
generated/1.23/README.adoc
generated
@ -741,7 +741,7 @@ FederationDomainStatus is a struct that describes the actual state of an OIDC Pr
|
|||||||
|===
|
|===
|
||||||
| Field | Description
|
| Field | Description
|
||||||
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
||||||
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
| *`conditions`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#condition-v1-meta[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
||||||
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -145,7 +145,7 @@ func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
|
|||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -352,9 +352,15 @@ spec:
|
|||||||
description: Conditions represent the observations of an FederationDomain's
|
description: Conditions represent the observations of an FederationDomain's
|
||||||
current state.
|
current state.
|
||||||
items:
|
items:
|
||||||
description: Condition status of a resource (mirrored from the metav1.Condition
|
description: "Condition contains details for one aspect of the current
|
||||||
type added in Kubernetes 1.19). In a future API version we can
|
state of this API Resource. --- This struct is intended for direct
|
||||||
switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413.
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
\n type FooStatus struct{ // Represents the observations of a
|
||||||
|
foo's current state. // Known .status.conditions.type are: \"Available\",
|
||||||
|
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
|
||||||
|
// +listType=map // +listMapKey=type Conditions []metav1.Condition
|
||||||
|
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
|
||||||
|
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||||
properties:
|
properties:
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: lastTransitionTime is the last time the condition
|
description: lastTransitionTime is the last time the condition
|
||||||
|
2
generated/1.24/README.adoc
generated
2
generated/1.24/README.adoc
generated
@ -741,7 +741,7 @@ FederationDomainStatus is a struct that describes the actual state of an OIDC Pr
|
|||||||
|===
|
|===
|
||||||
| Field | Description
|
| Field | Description
|
||||||
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
||||||
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
| *`conditions`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#condition-v1-meta[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
||||||
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -145,7 +145,7 @@ func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
|
|||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -352,9 +352,15 @@ spec:
|
|||||||
description: Conditions represent the observations of an FederationDomain's
|
description: Conditions represent the observations of an FederationDomain's
|
||||||
current state.
|
current state.
|
||||||
items:
|
items:
|
||||||
description: Condition status of a resource (mirrored from the metav1.Condition
|
description: "Condition contains details for one aspect of the current
|
||||||
type added in Kubernetes 1.19). In a future API version we can
|
state of this API Resource. --- This struct is intended for direct
|
||||||
switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413.
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
\n type FooStatus struct{ // Represents the observations of a
|
||||||
|
foo's current state. // Known .status.conditions.type are: \"Available\",
|
||||||
|
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
|
||||||
|
// +listType=map // +listMapKey=type Conditions []metav1.Condition
|
||||||
|
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
|
||||||
|
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||||
properties:
|
properties:
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: lastTransitionTime is the last time the condition
|
description: lastTransitionTime is the last time the condition
|
||||||
|
2
generated/1.25/README.adoc
generated
2
generated/1.25/README.adoc
generated
@ -739,7 +739,7 @@ FederationDomainStatus is a struct that describes the actual state of an OIDC Pr
|
|||||||
|===
|
|===
|
||||||
| Field | Description
|
| Field | Description
|
||||||
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-25-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-25-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
||||||
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-25-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
| *`conditions`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#condition-v1-meta[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
||||||
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-25-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-25-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -145,7 +145,7 @@ func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
|
|||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -352,9 +352,15 @@ spec:
|
|||||||
description: Conditions represent the observations of an FederationDomain's
|
description: Conditions represent the observations of an FederationDomain's
|
||||||
current state.
|
current state.
|
||||||
items:
|
items:
|
||||||
description: Condition status of a resource (mirrored from the metav1.Condition
|
description: "Condition contains details for one aspect of the current
|
||||||
type added in Kubernetes 1.19). In a future API version we can
|
state of this API Resource. --- This struct is intended for direct
|
||||||
switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413.
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
\n type FooStatus struct{ // Represents the observations of a
|
||||||
|
foo's current state. // Known .status.conditions.type are: \"Available\",
|
||||||
|
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
|
||||||
|
// +listType=map // +listMapKey=type Conditions []metav1.Condition
|
||||||
|
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
|
||||||
|
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||||
properties:
|
properties:
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: lastTransitionTime is the last time the condition
|
description: lastTransitionTime is the last time the condition
|
||||||
|
2
generated/1.26/README.adoc
generated
2
generated/1.26/README.adoc
generated
@ -739,7 +739,7 @@ FederationDomainStatus is a struct that describes the actual state of an OIDC Pr
|
|||||||
|===
|
|===
|
||||||
| Field | Description
|
| Field | Description
|
||||||
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-26-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-26-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
||||||
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-26-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
| *`conditions`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#condition-v1-meta[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
||||||
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-26-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-26-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -145,7 +145,7 @@ func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
|
|||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -352,9 +352,15 @@ spec:
|
|||||||
description: Conditions represent the observations of an FederationDomain's
|
description: Conditions represent the observations of an FederationDomain's
|
||||||
current state.
|
current state.
|
||||||
items:
|
items:
|
||||||
description: Condition status of a resource (mirrored from the metav1.Condition
|
description: "Condition contains details for one aspect of the current
|
||||||
type added in Kubernetes 1.19). In a future API version we can
|
state of this API Resource. --- This struct is intended for direct
|
||||||
switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413.
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
\n type FooStatus struct{ // Represents the observations of a
|
||||||
|
foo's current state. // Known .status.conditions.type are: \"Available\",
|
||||||
|
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
|
||||||
|
// +listType=map // +listMapKey=type Conditions []metav1.Condition
|
||||||
|
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
|
||||||
|
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||||
properties:
|
properties:
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: lastTransitionTime is the last time the condition
|
description: lastTransitionTime is the last time the condition
|
||||||
|
2
generated/1.27/README.adoc
generated
2
generated/1.27/README.adoc
generated
@ -739,7 +739,7 @@ FederationDomainStatus is a struct that describes the actual state of an OIDC Pr
|
|||||||
|===
|
|===
|
||||||
| Field | Description
|
| Field | Description
|
||||||
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-27-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-27-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
||||||
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-27-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
| *`conditions`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#condition-v1-meta[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
||||||
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-27-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-27-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -145,7 +145,7 @@ func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
|
|||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -352,9 +352,15 @@ spec:
|
|||||||
description: Conditions represent the observations of an FederationDomain's
|
description: Conditions represent the observations of an FederationDomain's
|
||||||
current state.
|
current state.
|
||||||
items:
|
items:
|
||||||
description: Condition status of a resource (mirrored from the metav1.Condition
|
description: "Condition contains details for one aspect of the current
|
||||||
type added in Kubernetes 1.19). In a future API version we can
|
state of this API Resource. --- This struct is intended for direct
|
||||||
switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413.
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
\n type FooStatus struct{ // Represents the observations of a
|
||||||
|
foo's current state. // Known .status.conditions.type are: \"Available\",
|
||||||
|
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
|
||||||
|
// +listType=map // +listMapKey=type Conditions []metav1.Condition
|
||||||
|
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
|
||||||
|
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||||
properties:
|
properties:
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: lastTransitionTime is the last time the condition
|
description: lastTransitionTime is the last time the condition
|
||||||
|
2
generated/1.28/README.adoc
generated
2
generated/1.28/README.adoc
generated
@ -739,7 +739,7 @@ FederationDomainStatus is a struct that describes the actual state of an OIDC Pr
|
|||||||
|===
|
|===
|
||||||
| Field | Description
|
| Field | Description
|
||||||
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-28-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
| *`phase`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-28-apis-supervisor-config-v1alpha1-federationdomainphase[$$FederationDomainPhase$$]__ | Phase summarizes the overall status of the FederationDomain.
|
||||||
| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-28-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
| *`conditions`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta[$$Condition$$] array__ | Conditions represent the observations of an FederationDomain's current state.
|
||||||
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-28-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
| *`secrets`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-28-apis-supervisor-config-v1alpha1-federationdomainsecrets[$$FederationDomainSecrets$$]__ | Secrets contains information about this OIDC Provider's secrets.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -145,7 +145,7 @@ func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
|
|||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -352,9 +352,15 @@ spec:
|
|||||||
description: Conditions represent the observations of an FederationDomain's
|
description: Conditions represent the observations of an FederationDomain's
|
||||||
current state.
|
current state.
|
||||||
items:
|
items:
|
||||||
description: Condition status of a resource (mirrored from the metav1.Condition
|
description: "Condition contains details for one aspect of the current
|
||||||
type added in Kubernetes 1.19). In a future API version we can
|
state of this API Resource. --- This struct is intended for direct
|
||||||
switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413.
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
\n type FooStatus struct{ // Represents the observations of a
|
||||||
|
foo's current state. // Known .status.conditions.type are: \"Available\",
|
||||||
|
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
|
||||||
|
// +listType=map // +listMapKey=type Conditions []metav1.Condition
|
||||||
|
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
|
||||||
|
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
|
||||||
properties:
|
properties:
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: lastTransitionTime is the last time the condition
|
description: lastTransitionTime is the last time the condition
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -276,7 +276,7 @@ type FederationDomainStatus struct {
|
|||||||
// +patchStrategy=merge
|
// +patchStrategy=merge
|
||||||
// +listType=map
|
// +listType=map
|
||||||
// +listMapKey=type
|
// +listMapKey=type
|
||||||
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// Secrets contains information about this OIDC Provider's secrets.
|
// Secrets contains information about this OIDC Provider's secrets.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
@ -144,7 +145,7 @@ func (in *FederationDomainStatus) DeepCopyInto(out *FederationDomainStatus) {
|
|||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//go:build !ignore_autogenerated
|
//go:build !ignore_autogenerated
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -191,13 +191,13 @@ func (c *federationDomainWatcherController) Sync(ctx controllerlib.Context) erro
|
|||||||
func (c *federationDomainWatcherController) processAllFederationDomains(
|
func (c *federationDomainWatcherController) processAllFederationDomains(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
federationDomains []*configv1alpha1.FederationDomain,
|
federationDomains []*configv1alpha1.FederationDomain,
|
||||||
) ([]*federationdomainproviders.FederationDomainIssuer, map[*configv1alpha1.FederationDomain][]*configv1alpha1.Condition, error) {
|
) ([]*federationdomainproviders.FederationDomainIssuer, map[*configv1alpha1.FederationDomain][]*metav1.Condition, error) {
|
||||||
federationDomainIssuers := make([]*federationdomainproviders.FederationDomainIssuer, 0)
|
federationDomainIssuers := make([]*federationdomainproviders.FederationDomainIssuer, 0)
|
||||||
fdToConditionsMap := map[*configv1alpha1.FederationDomain][]*configv1alpha1.Condition{}
|
fdToConditionsMap := map[*configv1alpha1.FederationDomain][]*metav1.Condition{}
|
||||||
crossDomainConfigValidator := newCrossFederationDomainConfigValidator(federationDomains)
|
crossDomainConfigValidator := newCrossFederationDomainConfigValidator(federationDomains)
|
||||||
|
|
||||||
for _, federationDomain := range federationDomains {
|
for _, federationDomain := range federationDomains {
|
||||||
conditions := make([]*configv1alpha1.Condition, 0)
|
conditions := make([]*metav1.Condition, 0)
|
||||||
|
|
||||||
conditions = crossDomainConfigValidator.Validate(federationDomain, conditions)
|
conditions = crossDomainConfigValidator.Validate(federationDomain, conditions)
|
||||||
|
|
||||||
@ -223,8 +223,8 @@ func (c *federationDomainWatcherController) processAllFederationDomains(
|
|||||||
func (c *federationDomainWatcherController) makeFederationDomainIssuer(
|
func (c *federationDomainWatcherController) makeFederationDomainIssuer(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
federationDomain *configv1alpha1.FederationDomain,
|
federationDomain *configv1alpha1.FederationDomain,
|
||||||
conditions []*configv1alpha1.Condition,
|
conditions []*metav1.Condition,
|
||||||
) (*federationdomainproviders.FederationDomainIssuer, []*configv1alpha1.Condition, error) {
|
) (*federationdomainproviders.FederationDomainIssuer, []*metav1.Condition, error) {
|
||||||
var err error
|
var err error
|
||||||
// Create the list of IDPs for this FederationDomain.
|
// Create the list of IDPs for this FederationDomain.
|
||||||
// Don't worry if the IDP CRs themselves is phase=Ready because those which are not ready will not be loaded
|
// Don't worry if the IDP CRs themselves is phase=Ready because those which are not ready will not be loaded
|
||||||
@ -247,8 +247,8 @@ func (c *federationDomainWatcherController) makeFederationDomainIssuer(
|
|||||||
|
|
||||||
func (c *federationDomainWatcherController) makeLegacyFederationDomainIssuer(
|
func (c *federationDomainWatcherController) makeLegacyFederationDomainIssuer(
|
||||||
federationDomain *configv1alpha1.FederationDomain,
|
federationDomain *configv1alpha1.FederationDomain,
|
||||||
conditions []*configv1alpha1.Condition,
|
conditions []*metav1.Condition,
|
||||||
) (*federationdomainproviders.FederationDomainIssuer, []*configv1alpha1.Condition, error) {
|
) (*federationdomainproviders.FederationDomainIssuer, []*metav1.Condition, error) {
|
||||||
var defaultFederationDomainIdentityProvider *federationdomainproviders.FederationDomainIdentityProvider
|
var defaultFederationDomainIdentityProvider *federationdomainproviders.FederationDomainIdentityProvider
|
||||||
|
|
||||||
// When the FederationDomain does not list any IDPs, then we might be in backwards compatibility mode.
|
// When the FederationDomain does not list any IDPs, then we might be in backwards compatibility mode.
|
||||||
@ -290,9 +290,9 @@ func (c *federationDomainWatcherController) makeLegacyFederationDomainIssuer(
|
|||||||
// Backwards compatibility mode always uses an empty identity transformation pipeline since no
|
// Backwards compatibility mode always uses an empty identity transformation pipeline since no
|
||||||
// transformations are defined on the FederationDomain.
|
// transformations are defined on the FederationDomain.
|
||||||
defaultFederationDomainIdentityProvider.Transforms = idtransform.NewTransformationPipeline()
|
defaultFederationDomainIdentityProvider.Transforms = idtransform.NewTransformationPipeline()
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersFound,
|
Type: typeIdentityProvidersFound,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonLegacyConfigurationSuccess,
|
Reason: reasonLegacyConfigurationSuccess,
|
||||||
Message: fmt.Sprintf("no resources were specified by .spec.identityProviders[].objectRef but exactly one "+
|
Message: fmt.Sprintf("no resources were specified by .spec.identityProviders[].objectRef but exactly one "+
|
||||||
"identity provider resource has been found: using %q as "+
|
"identity provider resource has been found: using %q as "+
|
||||||
@ -300,9 +300,9 @@ func (c *federationDomainWatcherController) makeLegacyFederationDomainIssuer(
|
|||||||
"(this legacy configuration mode may be removed in a future version of Pinniped)", foundIDPName),
|
"(this legacy configuration mode may be removed in a future version of Pinniped)", foundIDPName),
|
||||||
})
|
})
|
||||||
case idpCRsCount > 1:
|
case idpCRsCount > 1:
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersFound,
|
Type: typeIdentityProvidersFound,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonIdentityProviderNotSpecified, // vs LegacyConfigurationIdentityProviderNotFound as this is more specific
|
Reason: reasonIdentityProviderNotSpecified, // vs LegacyConfigurationIdentityProviderNotFound as this is more specific
|
||||||
Message: fmt.Sprintf("no resources were specified by .spec.identityProviders[].objectRef "+
|
Message: fmt.Sprintf("no resources were specified by .spec.identityProviders[].objectRef "+
|
||||||
"and %d identity provider resources have been found: "+
|
"and %d identity provider resources have been found: "+
|
||||||
@ -310,9 +310,9 @@ func (c *federationDomainWatcherController) makeLegacyFederationDomainIssuer(
|
|||||||
"this federation domain should use", idpCRsCount),
|
"this federation domain should use", idpCRsCount),
|
||||||
})
|
})
|
||||||
default:
|
default:
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersFound,
|
Type: typeIdentityProvidersFound,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonLegacyConfigurationIdentityProviderNotFound,
|
Reason: reasonLegacyConfigurationIdentityProviderNotFound,
|
||||||
Message: "no resources were specified by .spec.identityProviders[].objectRef and no identity provider " +
|
Message: "no resources were specified by .spec.identityProviders[].objectRef and no identity provider " +
|
||||||
"resources have been found: please create an identity provider resource",
|
"resources have been found: please create an identity provider resource",
|
||||||
@ -338,8 +338,8 @@ func (c *federationDomainWatcherController) makeLegacyFederationDomainIssuer(
|
|||||||
func (c *federationDomainWatcherController) makeFederationDomainIssuerWithExplicitIDPs(
|
func (c *federationDomainWatcherController) makeFederationDomainIssuerWithExplicitIDPs(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
federationDomain *configv1alpha1.FederationDomain,
|
federationDomain *configv1alpha1.FederationDomain,
|
||||||
conditions []*configv1alpha1.Condition,
|
conditions []*metav1.Condition,
|
||||||
) (*federationdomainproviders.FederationDomainIssuer, []*configv1alpha1.Condition, error) {
|
) (*federationdomainproviders.FederationDomainIssuer, []*metav1.Condition, error) {
|
||||||
federationDomainIdentityProviders := []*federationdomainproviders.FederationDomainIdentityProvider{}
|
federationDomainIdentityProviders := []*federationdomainproviders.FederationDomainIdentityProvider{}
|
||||||
idpNotFoundIndices := []int{}
|
idpNotFoundIndices := []int{}
|
||||||
displayNames := sets.Set[string]{}
|
displayNames := sets.Set[string]{}
|
||||||
@ -640,19 +640,19 @@ func (c *federationDomainWatcherController) evaluateExamplesForIdentityProvider(
|
|||||||
return true, ""
|
return true, ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendIdentityProviderObjectRefKindCondition(expectedKinds []string, badSuffixNames []string, conditions []*configv1alpha1.Condition) []*configv1alpha1.Condition {
|
func appendIdentityProviderObjectRefKindCondition(expectedKinds []string, badSuffixNames []string, conditions []*metav1.Condition) []*metav1.Condition {
|
||||||
if len(badSuffixNames) > 0 {
|
if len(badSuffixNames) > 0 {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersObjectRefKindValid,
|
Type: typeIdentityProvidersObjectRefKindValid,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonKindUnrecognized,
|
Reason: reasonKindUnrecognized,
|
||||||
Message: fmt.Sprintf("some kinds specified by .spec.identityProviders[].objectRef.kind are not recognized (should be one of %s): %s",
|
Message: fmt.Sprintf("some kinds specified by .spec.identityProviders[].objectRef.kind are not recognized (should be one of %s): %s",
|
||||||
strings.Join(expectedKinds, ", "), strings.Join(sortAndQuote(badSuffixNames), ", ")),
|
strings.Join(expectedKinds, ", "), strings.Join(sortAndQuote(badSuffixNames), ", ")),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersObjectRefKindValid,
|
Type: typeIdentityProvidersObjectRefKindValid,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: "the kinds specified by .spec.identityProviders[].objectRef.kind are recognized",
|
Message: "the kinds specified by .spec.identityProviders[].objectRef.kind are recognized",
|
||||||
})
|
})
|
||||||
@ -663,24 +663,24 @@ func appendIdentityProviderObjectRefKindCondition(expectedKinds []string, badSuf
|
|||||||
func appendIdentityProvidersFoundCondition(
|
func appendIdentityProvidersFoundCondition(
|
||||||
idpNotFoundIndices []int,
|
idpNotFoundIndices []int,
|
||||||
federationDomainIdentityProviders []configv1alpha1.FederationDomainIdentityProvider,
|
federationDomainIdentityProviders []configv1alpha1.FederationDomainIdentityProvider,
|
||||||
conditions []*configv1alpha1.Condition,
|
conditions []*metav1.Condition,
|
||||||
) []*configv1alpha1.Condition {
|
) []*metav1.Condition {
|
||||||
if len(idpNotFoundIndices) != 0 {
|
if len(idpNotFoundIndices) != 0 {
|
||||||
messages := []string{}
|
messages := []string{}
|
||||||
for _, idpNotFoundIndex := range idpNotFoundIndices {
|
for _, idpNotFoundIndex := range idpNotFoundIndices {
|
||||||
messages = append(messages, fmt.Sprintf("cannot find resource specified by .spec.identityProviders[%d].objectRef (with name %q)",
|
messages = append(messages, fmt.Sprintf("cannot find resource specified by .spec.identityProviders[%d].objectRef (with name %q)",
|
||||||
idpNotFoundIndex, federationDomainIdentityProviders[idpNotFoundIndex].ObjectRef.Name))
|
idpNotFoundIndex, federationDomainIdentityProviders[idpNotFoundIndex].ObjectRef.Name))
|
||||||
}
|
}
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersFound,
|
Type: typeIdentityProvidersFound,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonIdentityProvidersObjectRefsNotFound,
|
Reason: reasonIdentityProvidersObjectRefsNotFound,
|
||||||
Message: strings.Join(messages, "\n\n"),
|
Message: strings.Join(messages, "\n\n"),
|
||||||
})
|
})
|
||||||
} else if len(federationDomainIdentityProviders) != 0 {
|
} else if len(federationDomainIdentityProviders) != 0 {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersFound,
|
Type: typeIdentityProvidersFound,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: "the resources specified by .spec.identityProviders[].objectRef were found",
|
Message: "the resources specified by .spec.identityProviders[].objectRef were found",
|
||||||
})
|
})
|
||||||
@ -688,19 +688,19 @@ func appendIdentityProvidersFoundCondition(
|
|||||||
return conditions
|
return conditions
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendIdentityProviderObjectRefAPIGroupSuffixCondition(expectedSuffixName string, badSuffixNames []string, conditions []*configv1alpha1.Condition) []*configv1alpha1.Condition {
|
func appendIdentityProviderObjectRefAPIGroupSuffixCondition(expectedSuffixName string, badSuffixNames []string, conditions []*metav1.Condition) []*metav1.Condition {
|
||||||
if len(badSuffixNames) > 0 {
|
if len(badSuffixNames) > 0 {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersAPIGroupSuffixValid,
|
Type: typeIdentityProvidersAPIGroupSuffixValid,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonAPIGroupNameUnrecognized,
|
Reason: reasonAPIGroupNameUnrecognized,
|
||||||
Message: fmt.Sprintf("some API groups specified by .spec.identityProviders[].objectRef.apiGroup are not recognized (should be %q): %s",
|
Message: fmt.Sprintf("some API groups specified by .spec.identityProviders[].objectRef.apiGroup are not recognized (should be %q): %s",
|
||||||
expectedSuffixName, strings.Join(sortAndQuote(badSuffixNames), ", ")),
|
expectedSuffixName, strings.Join(sortAndQuote(badSuffixNames), ", ")),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersAPIGroupSuffixValid,
|
Type: typeIdentityProvidersAPIGroupSuffixValid,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: "the API groups specified by .spec.identityProviders[].objectRef.apiGroup are recognized",
|
Message: "the API groups specified by .spec.identityProviders[].objectRef.apiGroup are recognized",
|
||||||
})
|
})
|
||||||
@ -708,18 +708,18 @@ func appendIdentityProviderObjectRefAPIGroupSuffixCondition(expectedSuffixName s
|
|||||||
return conditions
|
return conditions
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendTransformsExpressionsValidCondition(messages []string, conditions []*configv1alpha1.Condition) []*configv1alpha1.Condition {
|
func appendTransformsExpressionsValidCondition(messages []string, conditions []*metav1.Condition) []*metav1.Condition {
|
||||||
if len(messages) > 0 {
|
if len(messages) > 0 {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeTransformsExpressionsValid,
|
Type: typeTransformsExpressionsValid,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonInvalidTransformsExpressions,
|
Reason: reasonInvalidTransformsExpressions,
|
||||||
Message: strings.Join(messages, "\n\n"),
|
Message: strings.Join(messages, "\n\n"),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeTransformsExpressionsValid,
|
Type: typeTransformsExpressionsValid,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: "the expressions specified by .spec.identityProviders[].transforms.expressions[] are valid",
|
Message: "the expressions specified by .spec.identityProviders[].transforms.expressions[] are valid",
|
||||||
})
|
})
|
||||||
@ -727,18 +727,18 @@ func appendTransformsExpressionsValidCondition(messages []string, conditions []*
|
|||||||
return conditions
|
return conditions
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendTransformsExamplesPassedCondition(messages []string, conditions []*configv1alpha1.Condition) []*configv1alpha1.Condition {
|
func appendTransformsExamplesPassedCondition(messages []string, conditions []*metav1.Condition) []*metav1.Condition {
|
||||||
if len(messages) > 0 {
|
if len(messages) > 0 {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeTransformsExamplesPassed,
|
Type: typeTransformsExamplesPassed,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonTransformsExamplesFailed,
|
Reason: reasonTransformsExamplesFailed,
|
||||||
Message: strings.Join(messages, "\n\n"),
|
Message: strings.Join(messages, "\n\n"),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeTransformsExamplesPassed,
|
Type: typeTransformsExamplesPassed,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: "the examples specified by .spec.identityProviders[].transforms.examples[] had no errors",
|
Message: "the examples specified by .spec.identityProviders[].transforms.examples[] had no errors",
|
||||||
})
|
})
|
||||||
@ -746,19 +746,19 @@ func appendTransformsExamplesPassedCondition(messages []string, conditions []*co
|
|||||||
return conditions
|
return conditions
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendIdentityProviderDuplicateDisplayNamesCondition(duplicateDisplayNames sets.Set[string], conditions []*configv1alpha1.Condition) []*configv1alpha1.Condition {
|
func appendIdentityProviderDuplicateDisplayNamesCondition(duplicateDisplayNames sets.Set[string], conditions []*metav1.Condition) []*metav1.Condition {
|
||||||
if duplicateDisplayNames.Len() > 0 {
|
if duplicateDisplayNames.Len() > 0 {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersDisplayNamesUnique,
|
Type: typeIdentityProvidersDisplayNamesUnique,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonDuplicateDisplayNames,
|
Reason: reasonDuplicateDisplayNames,
|
||||||
Message: fmt.Sprintf("the names specified by .spec.identityProviders[].displayName contain duplicates: %s",
|
Message: fmt.Sprintf("the names specified by .spec.identityProviders[].displayName contain duplicates: %s",
|
||||||
strings.Join(sortAndQuote(duplicateDisplayNames.UnsortedList()), ", ")),
|
strings.Join(sortAndQuote(duplicateDisplayNames.UnsortedList()), ", ")),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIdentityProvidersDisplayNamesUnique,
|
Type: typeIdentityProvidersDisplayNamesUnique,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: "the names specified by .spec.identityProviders[].displayName are unique",
|
Message: "the names specified by .spec.identityProviders[].displayName are unique",
|
||||||
})
|
})
|
||||||
@ -766,20 +766,20 @@ func appendIdentityProviderDuplicateDisplayNamesCondition(duplicateDisplayNames
|
|||||||
return conditions
|
return conditions
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendIssuerURLValidCondition(err error, conditions []*configv1alpha1.Condition) []*configv1alpha1.Condition {
|
func appendIssuerURLValidCondition(err error, conditions []*metav1.Condition) []*metav1.Condition {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Note that the FederationDomainIssuer constructors only validate the Issuer URL,
|
// Note that the FederationDomainIssuer constructors only validate the Issuer URL,
|
||||||
// so these are always issuer URL validation errors.
|
// so these are always issuer URL validation errors.
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIssuerURLValid,
|
Type: typeIssuerURLValid,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonInvalidIssuerURL,
|
Reason: reasonInvalidIssuerURL,
|
||||||
Message: err.Error(),
|
Message: err.Error(),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIssuerURLValid,
|
Type: typeIssuerURLValid,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: "spec.issuer is a valid URL",
|
Message: "spec.issuer is a valid URL",
|
||||||
})
|
})
|
||||||
@ -790,23 +790,23 @@ func appendIssuerURLValidCondition(err error, conditions []*configv1alpha1.Condi
|
|||||||
func (c *federationDomainWatcherController) updateStatus(
|
func (c *federationDomainWatcherController) updateStatus(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
federationDomain *configv1alpha1.FederationDomain,
|
federationDomain *configv1alpha1.FederationDomain,
|
||||||
conditions []*configv1alpha1.Condition,
|
conditions []*metav1.Condition,
|
||||||
) error {
|
) error {
|
||||||
updated := federationDomain.DeepCopy()
|
updated := federationDomain.DeepCopy()
|
||||||
|
|
||||||
if hadErrorCondition(conditions) {
|
if hadErrorCondition(conditions) {
|
||||||
updated.Status.Phase = configv1alpha1.FederationDomainPhaseError
|
updated.Status.Phase = configv1alpha1.FederationDomainPhaseError
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeReady,
|
Type: typeReady,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonNotReady,
|
Reason: reasonNotReady,
|
||||||
Message: "the FederationDomain is not ready: see other conditions for details",
|
Message: "the FederationDomain is not ready: see other conditions for details",
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
updated.Status.Phase = configv1alpha1.FederationDomainPhaseReady
|
updated.Status.Phase = configv1alpha1.FederationDomainPhaseReady
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeReady,
|
Type: typeReady,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: fmt.Sprintf("the FederationDomain is ready and its endpoints are available: "+
|
Message: fmt.Sprintf("the FederationDomain is ready and its endpoints are available: "+
|
||||||
"the discovery endpoint is %s/.well-known/openid-configuration", federationDomain.Spec.Issuer),
|
"the discovery endpoint is %s/.well-known/openid-configuration", federationDomain.Spec.Issuer),
|
||||||
@ -858,20 +858,20 @@ func issuerURLToIssuerKey(issuerURL *url.URL) string {
|
|||||||
return fmt.Sprintf("%s://%s%s", issuerURL.Scheme, strings.ToLower(issuerURL.Host), issuerURL.Path)
|
return fmt.Sprintf("%s://%s%s", issuerURL.Scheme, strings.ToLower(issuerURL.Host), issuerURL.Path)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *crossFederationDomainConfigValidator) Validate(federationDomain *configv1alpha1.FederationDomain, conditions []*configv1alpha1.Condition) []*configv1alpha1.Condition {
|
func (v *crossFederationDomainConfigValidator) Validate(federationDomain *configv1alpha1.FederationDomain, conditions []*metav1.Condition) []*metav1.Condition {
|
||||||
issuerURL, urlParseErr := url.Parse(federationDomain.Spec.Issuer)
|
issuerURL, urlParseErr := url.Parse(federationDomain.Spec.Issuer)
|
||||||
|
|
||||||
if urlParseErr != nil {
|
if urlParseErr != nil {
|
||||||
// Don't write a condition about the issuer URL being invalid because that is added elsewhere in the controller.
|
// Don't write a condition about the issuer URL being invalid because that is added elsewhere in the controller.
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIssuerIsUnique,
|
Type: typeIssuerIsUnique,
|
||||||
Status: configv1alpha1.ConditionUnknown,
|
Status: metav1.ConditionUnknown,
|
||||||
Reason: reasonUnableToValidate,
|
Reason: reasonUnableToValidate,
|
||||||
Message: "unable to check if spec.issuer is unique among all FederationDomains because URL cannot be parsed",
|
Message: "unable to check if spec.issuer is unique among all FederationDomains because URL cannot be parsed",
|
||||||
})
|
})
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeOneTLSSecretPerIssuerHostname,
|
Type: typeOneTLSSecretPerIssuerHostname,
|
||||||
Status: configv1alpha1.ConditionUnknown,
|
Status: metav1.ConditionUnknown,
|
||||||
Reason: reasonUnableToValidate,
|
Reason: reasonUnableToValidate,
|
||||||
Message: "unable to check if all FederationDomains are using the same TLS secret when using the same hostname in the spec.issuer URL because URL cannot be parsed",
|
Message: "unable to check if all FederationDomains are using the same TLS secret when using the same hostname in the spec.issuer URL because URL cannot be parsed",
|
||||||
})
|
})
|
||||||
@ -879,32 +879,32 @@ func (v *crossFederationDomainConfigValidator) Validate(federationDomain *config
|
|||||||
}
|
}
|
||||||
|
|
||||||
if issuerCount := v.issuerCounts[issuerURLToIssuerKey(issuerURL)]; issuerCount > 1 {
|
if issuerCount := v.issuerCounts[issuerURLToIssuerKey(issuerURL)]; issuerCount > 1 {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIssuerIsUnique,
|
Type: typeIssuerIsUnique,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonDuplicateIssuer,
|
Reason: reasonDuplicateIssuer,
|
||||||
Message: "multiple FederationDomains have the same spec.issuer URL: these URLs must be unique (can use different hosts or paths)",
|
Message: "multiple FederationDomains have the same spec.issuer URL: these URLs must be unique (can use different hosts or paths)",
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeIssuerIsUnique,
|
Type: typeIssuerIsUnique,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: "spec.issuer is unique among all FederationDomains",
|
Message: "spec.issuer is unique among all FederationDomains",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(v.uniqueSecretNamesPerIssuerAddress[issuerURLToHostnameKey(issuerURL)]) > 1 {
|
if len(v.uniqueSecretNamesPerIssuerAddress[issuerURLToHostnameKey(issuerURL)]) > 1 {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeOneTLSSecretPerIssuerHostname,
|
Type: typeOneTLSSecretPerIssuerHostname,
|
||||||
Status: configv1alpha1.ConditionFalse,
|
Status: metav1.ConditionFalse,
|
||||||
Reason: reasonDifferentSecretRefsFound,
|
Reason: reasonDifferentSecretRefsFound,
|
||||||
Message: "when different FederationDomains are using the same hostname in the spec.issuer URL then they must also use the same TLS secretRef: different secretRefs found",
|
Message: "when different FederationDomains are using the same hostname in the spec.issuer URL then they must also use the same TLS secretRef: different secretRefs found",
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
conditions = append(conditions, &configv1alpha1.Condition{
|
conditions = append(conditions, &metav1.Condition{
|
||||||
Type: typeOneTLSSecretPerIssuerHostname,
|
Type: typeOneTLSSecretPerIssuerHostname,
|
||||||
Status: configv1alpha1.ConditionTrue,
|
Status: metav1.ConditionTrue,
|
||||||
Reason: reasonSuccess,
|
Reason: reasonSuccess,
|
||||||
Message: "all FederationDomains are using the same TLS secret when using the same hostname in the spec.issuer URL",
|
Message: "all FederationDomains are using the same TLS secret when using the same hostname in the spec.issuer URL",
|
||||||
})
|
})
|
||||||
@ -950,9 +950,9 @@ func newCrossFederationDomainConfigValidator(federationDomains []*configv1alpha1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func hadErrorCondition(conditions []*configv1alpha1.Condition) bool {
|
func hadErrorCondition(conditions []*metav1.Condition) bool {
|
||||||
for _, c := range conditions {
|
for _, c := range conditions {
|
||||||
if c.Status != configv1alpha1.ConditionTrue {
|
if c.Status != metav1.ConditionTrue {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,8 +194,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
return fdIssuer
|
return fdIssuer
|
||||||
}
|
}
|
||||||
|
|
||||||
happyReadyCondition := func(issuer string, time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyReadyCondition := func(issuer string, time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "Ready",
|
Type: "Ready",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -206,8 +206,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadReadyCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadReadyCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "Ready",
|
Type: "Ready",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -217,8 +217,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyIssuerIsUniqueCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyIssuerIsUniqueCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IssuerIsUnique",
|
Type: "IssuerIsUnique",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -228,8 +228,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unknownIssuerIsUniqueCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
unknownIssuerIsUniqueCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IssuerIsUnique",
|
Type: "IssuerIsUnique",
|
||||||
Status: "Unknown",
|
Status: "Unknown",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -239,8 +239,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadIssuerIsUniqueCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadIssuerIsUniqueCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IssuerIsUnique",
|
Type: "IssuerIsUnique",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -250,8 +250,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyOneTLSSecretPerIssuerHostnameCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyOneTLSSecretPerIssuerHostnameCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "OneTLSSecretPerIssuerHostname",
|
Type: "OneTLSSecretPerIssuerHostname",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -261,8 +261,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unknownOneTLSSecretPerIssuerHostnameCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
unknownOneTLSSecretPerIssuerHostnameCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "OneTLSSecretPerIssuerHostname",
|
Type: "OneTLSSecretPerIssuerHostname",
|
||||||
Status: "Unknown",
|
Status: "Unknown",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -272,8 +272,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadOneTLSSecretPerIssuerHostnameCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadOneTLSSecretPerIssuerHostnameCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "OneTLSSecretPerIssuerHostname",
|
Type: "OneTLSSecretPerIssuerHostname",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -283,8 +283,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyIssuerURLValidCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyIssuerURLValidCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IssuerURLValid",
|
Type: "IssuerURLValid",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -294,8 +294,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadIssuerURLValidConditionCannotHaveQuery := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadIssuerURLValidConditionCannotHaveQuery := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IssuerURLValid",
|
Type: "IssuerURLValid",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -305,8 +305,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadIssuerURLValidConditionCannotParse := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadIssuerURLValidConditionCannotParse := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IssuerURLValid",
|
Type: "IssuerURLValid",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -316,8 +316,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyIdentityProvidersFoundConditionLegacyConfigurationSuccess := func(idpName string, time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyIdentityProvidersFoundConditionLegacyConfigurationSuccess := func(idpName string, time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersFound",
|
Type: "IdentityProvidersFound",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -330,8 +330,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyIdentityProvidersFoundConditionSuccess := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyIdentityProvidersFoundConditionSuccess := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersFound",
|
Type: "IdentityProvidersFound",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -341,8 +341,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadIdentityProvidersFoundConditionLegacyConfigurationIdentityProviderNotFound := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadIdentityProvidersFoundConditionLegacyConfigurationIdentityProviderNotFound := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersFound",
|
Type: "IdentityProvidersFound",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -353,8 +353,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadIdentityProvidersFoundConditionIdentityProviderNotSpecified := func(idpCRsCount int, time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadIdentityProvidersFoundConditionIdentityProviderNotSpecified := func(idpCRsCount int, time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersFound",
|
Type: "IdentityProvidersFound",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -367,8 +367,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound := func(errorMessages string, time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound := func(errorMessages string, time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersFound",
|
Type: "IdentityProvidersFound",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -378,8 +378,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyDisplayNamesUniqueCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyDisplayNamesUniqueCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersDisplayNamesUnique",
|
Type: "IdentityProvidersDisplayNamesUnique",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -389,8 +389,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadDisplayNamesUniqueCondition := func(duplicateNames string, time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadDisplayNamesUniqueCondition := func(duplicateNames string, time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersDisplayNamesUnique",
|
Type: "IdentityProvidersDisplayNamesUnique",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -400,8 +400,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyTransformationExpressionsCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyTransformationExpressionsCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "TransformsExpressionsValid",
|
Type: "TransformsExpressionsValid",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -411,8 +411,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadTransformationExpressionsCondition := func(errorMessages string, time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadTransformationExpressionsCondition := func(errorMessages string, time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "TransformsExpressionsValid",
|
Type: "TransformsExpressionsValid",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -422,8 +422,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyTransformationExamplesCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyTransformationExamplesCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "TransformsExamplesPassed",
|
Type: "TransformsExamplesPassed",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -433,8 +433,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadTransformationExamplesCondition := func(errorMessages string, time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadTransformationExamplesCondition := func(errorMessages string, time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "TransformsExamplesPassed",
|
Type: "TransformsExamplesPassed",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -444,8 +444,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyAPIGroupSuffixCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyAPIGroupSuffixCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersObjectRefAPIGroupSuffixValid",
|
Type: "IdentityProvidersObjectRefAPIGroupSuffixValid",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -455,8 +455,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadAPIGroupSuffixCondition := func(badApiGroups string, time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadAPIGroupSuffixCondition := func(badApiGroups string, time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersObjectRefAPIGroupSuffixValid",
|
Type: "IdentityProvidersObjectRefAPIGroupSuffixValid",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -467,8 +467,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
happyKindCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
happyKindCondition := func(time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersObjectRefKindValid",
|
Type: "IdentityProvidersObjectRefKindValid",
|
||||||
Status: "True",
|
Status: "True",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -478,8 +478,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sadKindCondition := func(badKinds string, time metav1.Time, observedGeneration int64) configv1alpha1.Condition {
|
sadKindCondition := func(badKinds string, time metav1.Time, observedGeneration int64) metav1.Condition {
|
||||||
return configv1alpha1.Condition{
|
return metav1.Condition{
|
||||||
Type: "IdentityProvidersObjectRefKindValid",
|
Type: "IdentityProvidersObjectRefKindValid",
|
||||||
Status: "False",
|
Status: "False",
|
||||||
ObservedGeneration: observedGeneration,
|
ObservedGeneration: observedGeneration,
|
||||||
@ -490,8 +490,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sortConditionsByType := func(c []configv1alpha1.Condition) []configv1alpha1.Condition {
|
sortConditionsByType := func(c []metav1.Condition) []metav1.Condition {
|
||||||
cp := make([]configv1alpha1.Condition, len(c))
|
cp := make([]metav1.Condition, len(c))
|
||||||
copy(cp, c)
|
copy(cp, c)
|
||||||
sort.SliceStable(cp, func(i, j int) bool {
|
sort.SliceStable(cp, func(i, j int) bool {
|
||||||
return cp[i].Type < cp[j].Type
|
return cp[i].Type < cp[j].Type
|
||||||
@ -499,7 +499,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
return cp
|
return cp
|
||||||
}
|
}
|
||||||
|
|
||||||
replaceConditions := func(conditions []configv1alpha1.Condition, sadConditions []configv1alpha1.Condition) []configv1alpha1.Condition {
|
replaceConditions := func(conditions []metav1.Condition, sadConditions []metav1.Condition) []metav1.Condition {
|
||||||
for _, sadReplaceCondition := range sadConditions {
|
for _, sadReplaceCondition := range sadConditions {
|
||||||
for origIndex, origCondition := range conditions {
|
for origIndex, origCondition := range conditions {
|
||||||
if origCondition.Type == sadReplaceCondition.Type {
|
if origCondition.Type == sadReplaceCondition.Type {
|
||||||
@ -511,8 +511,8 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
return conditions
|
return conditions
|
||||||
}
|
}
|
||||||
|
|
||||||
allHappyConditionsSuccess := func(issuer string, time metav1.Time, observedGeneration int64) []configv1alpha1.Condition {
|
allHappyConditionsSuccess := func(issuer string, time metav1.Time, observedGeneration int64) []metav1.Condition {
|
||||||
return sortConditionsByType([]configv1alpha1.Condition{
|
return sortConditionsByType([]metav1.Condition{
|
||||||
happyTransformationExamplesCondition(frozenMetav1Now, 123),
|
happyTransformationExamplesCondition(frozenMetav1Now, 123),
|
||||||
happyTransformationExpressionsCondition(frozenMetav1Now, 123),
|
happyTransformationExpressionsCondition(frozenMetav1Now, 123),
|
||||||
happyKindCondition(frozenMetav1Now, 123),
|
happyKindCondition(frozenMetav1Now, 123),
|
||||||
@ -526,10 +526,10 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
allHappyConditionsLegacyConfigurationSuccess := func(issuer string, idpName string, time metav1.Time, observedGeneration int64) []configv1alpha1.Condition {
|
allHappyConditionsLegacyConfigurationSuccess := func(issuer string, idpName string, time metav1.Time, observedGeneration int64) []metav1.Condition {
|
||||||
return replaceConditions(
|
return replaceConditions(
|
||||||
allHappyConditionsSuccess(issuer, time, observedGeneration),
|
allHappyConditionsSuccess(issuer, time, observedGeneration),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
happyIdentityProvidersFoundConditionLegacyConfigurationSuccess(idpName, time, observedGeneration),
|
happyIdentityProvidersFoundConditionLegacyConfigurationSuccess(idpName, time, observedGeneration),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@ -738,7 +738,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess(federationDomain2.Spec.Issuer, oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess(federationDomain2.Spec.Issuer, oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadIssuerURLValidConditionCannotHaveQuery(frozenMetav1Now, 123),
|
sadIssuerURLValidConditionCannotHaveQuery(frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -780,7 +780,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess(federationDomain2.Spec.Issuer, oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess(federationDomain2.Spec.Issuer, oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadIssuerURLValidConditionCannotHaveQuery(frozenMetav1Now, 123),
|
sadIssuerURLValidConditionCannotHaveQuery(frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -820,7 +820,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess("https://iSSueR-duPlicAte.cOm/a", oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess("https://iSSueR-duPlicAte.cOm/a", oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadIssuerIsUniqueCondition(frozenMetav1Now, 123),
|
sadIssuerIsUniqueCondition(frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -832,7 +832,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess("https://issuer-duplicate.com/a", oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess("https://issuer-duplicate.com/a", oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadIssuerIsUniqueCondition(frozenMetav1Now, 123),
|
sadIssuerIsUniqueCondition(frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -893,7 +893,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess("https://iSSueR-duPlicAte-adDress.cOm/path1", oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess("https://iSSueR-duPlicAte-adDress.cOm/path1", oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadOneTLSSecretPerIssuerHostnameCondition(frozenMetav1Now, 123),
|
sadOneTLSSecretPerIssuerHostnameCondition(frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -905,7 +905,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess("https://issuer-duplicate-address.com:1234/path2", oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess("https://issuer-duplicate-address.com:1234/path2", oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadOneTLSSecretPerIssuerHostnameCondition(frozenMetav1Now, 123),
|
sadOneTLSSecretPerIssuerHostnameCondition(frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -917,7 +917,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess(invalidIssuerURL, oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess(invalidIssuerURL, oidcIdentityProvider.Name, frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
unknownIssuerIsUniqueCondition(frozenMetav1Now, 123),
|
unknownIssuerIsUniqueCondition(frozenMetav1Now, 123),
|
||||||
sadIssuerURLValidConditionCannotParse(frozenMetav1Now, 123),
|
sadIssuerURLValidConditionCannotParse(frozenMetav1Now, 123),
|
||||||
unknownOneTLSSecretPerIssuerHostnameCondition(frozenMetav1Now, 123),
|
unknownOneTLSSecretPerIssuerHostnameCondition(frozenMetav1Now, 123),
|
||||||
@ -945,7 +945,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess(federationDomain1.Spec.Issuer, "", frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess(federationDomain1.Spec.Issuer, "", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadIdentityProvidersFoundConditionLegacyConfigurationIdentityProviderNotFound(frozenMetav1Now, 123),
|
sadIdentityProvidersFoundConditionLegacyConfigurationIdentityProviderNotFound(frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -954,7 +954,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess(federationDomain2.Spec.Issuer, "", frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess(federationDomain2.Spec.Issuer, "", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadIdentityProvidersFoundConditionLegacyConfigurationIdentityProviderNotFound(frozenMetav1Now, 123),
|
sadIdentityProvidersFoundConditionLegacyConfigurationIdentityProviderNotFound(frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -975,7 +975,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsLegacyConfigurationSuccess(federationDomain1.Spec.Issuer, "", frozenMetav1Now, 123),
|
allHappyConditionsLegacyConfigurationSuccess(federationDomain1.Spec.Issuer, "", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadIdentityProvidersFoundConditionIdentityProviderNotSpecified(3, frozenMetav1Now, 123),
|
sadIdentityProvidersFoundConditionIdentityProviderNotSpecified(3, frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -1027,7 +1027,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound(here.Doc(
|
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound(here.Doc(
|
||||||
`cannot find resource specified by .spec.identityProviders[0].objectRef (with name "cant-find-me-name")
|
`cannot find resource specified by .spec.identityProviders[0].objectRef (with name "cant-find-me-name")
|
||||||
|
|
||||||
@ -1181,7 +1181,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadDisplayNamesUniqueCondition(`"duplicate1", "duplicate2"`, frozenMetav1Now, 123),
|
sadDisplayNamesUniqueCondition(`"duplicate1", "duplicate2"`, frozenMetav1Now, 123),
|
||||||
sadReadyCondition(frozenMetav1Now, 123),
|
sadReadyCondition(frozenMetav1Now, 123),
|
||||||
}),
|
}),
|
||||||
@ -1244,7 +1244,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadAPIGroupSuffixCondition(`"", "", "wrong.example.com"`, frozenMetav1Now, 123),
|
sadAPIGroupSuffixCondition(`"", "", "wrong.example.com"`, frozenMetav1Now, 123),
|
||||||
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound(here.Doc(
|
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound(here.Doc(
|
||||||
`cannot find resource specified by .spec.identityProviders[0].objectRef (with name "some-oidc-idp")
|
`cannot find resource specified by .spec.identityProviders[0].objectRef (with name "some-oidc-idp")
|
||||||
@ -1306,7 +1306,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadKindCondition(`"", "wrong"`, frozenMetav1Now, 123),
|
sadKindCondition(`"", "wrong"`, frozenMetav1Now, 123),
|
||||||
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound(here.Doc(
|
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound(here.Doc(
|
||||||
`cannot find resource specified by .spec.identityProviders[1].objectRef (with name "some-ldap-idp")
|
`cannot find resource specified by .spec.identityProviders[1].objectRef (with name "some-ldap-idp")
|
||||||
@ -1356,7 +1356,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadTransformationExpressionsCondition(here.Doc(
|
sadTransformationExpressionsCondition(here.Doc(
|
||||||
`spec.identityProvider[0].transforms.expressions[0].expression was invalid:
|
`spec.identityProvider[0].transforms.expressions[0].expression was invalid:
|
||||||
CEL expression compile error: ERROR: <input>:1:6: Syntax error: mismatched input 'is' expecting <EOF>
|
CEL expression compile error: ERROR: <input>:1:6: Syntax error: mismatched input 'is' expecting <EOF>
|
||||||
@ -1502,7 +1502,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadTransformationExamplesCondition(here.Doc(
|
sadTransformationExamplesCondition(here.Doc(
|
||||||
`.spec.identityProviders[0].transforms.examples[2] example failed:
|
`.spec.identityProviders[0].transforms.examples[2] example failed:
|
||||||
expected: authentication to be rejected
|
expected: authentication to be rejected
|
||||||
@ -1601,7 +1601,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
allHappyConditionsSuccess("https://issuer1.com", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadTransformationExamplesCondition(here.Doc(
|
sadTransformationExamplesCondition(here.Doc(
|
||||||
`.spec.identityProviders[0].transforms.examples[0] example failed:
|
`.spec.identityProviders[0].transforms.examples[0] example failed:
|
||||||
expected: no transformation errors
|
expected: no transformation errors
|
||||||
@ -1748,7 +1748,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsSuccess("https://not-unique.com", frozenMetav1Now, 123),
|
allHappyConditionsSuccess("https://not-unique.com", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadAPIGroupSuffixCondition(`"this is wrong"`, frozenMetav1Now, 123),
|
sadAPIGroupSuffixCondition(`"this is wrong"`, frozenMetav1Now, 123),
|
||||||
sadDisplayNamesUniqueCondition(`"not unique"`, frozenMetav1Now, 123),
|
sadDisplayNamesUniqueCondition(`"not unique"`, frozenMetav1Now, 123),
|
||||||
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound(here.Doc(
|
sadIdentityProvidersFoundConditionIdentityProvidersObjectRefsNotFound(here.Doc(
|
||||||
@ -1808,7 +1808,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
|||||||
configv1alpha1.FederationDomainPhaseError,
|
configv1alpha1.FederationDomainPhaseError,
|
||||||
replaceConditions(
|
replaceConditions(
|
||||||
allHappyConditionsSuccess("https://not-unique.com", frozenMetav1Now, 123),
|
allHappyConditionsSuccess("https://not-unique.com", frozenMetav1Now, 123),
|
||||||
[]configv1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
sadIssuerIsUniqueCondition(frozenMetav1Now, 123),
|
sadIssuerIsUniqueCondition(frozenMetav1Now, 123),
|
||||||
sadTransformationExpressionsCondition(here.Doc(
|
sadTransformationExpressionsCondition(here.Doc(
|
||||||
`spec.identityProvider[0].transforms.expressions[1].expression was invalid:
|
`spec.identityProvider[0].transforms.expressions[1].expression was invalid:
|
||||||
@ -2135,7 +2135,7 @@ func convertToComparableType(fdis []*federationdomainproviders.FederationDomainI
|
|||||||
func expectedFederationDomainStatusUpdate(
|
func expectedFederationDomainStatusUpdate(
|
||||||
fd *configv1alpha1.FederationDomain,
|
fd *configv1alpha1.FederationDomain,
|
||||||
phase configv1alpha1.FederationDomainPhase,
|
phase configv1alpha1.FederationDomainPhase,
|
||||||
conditions []configv1alpha1.Condition,
|
conditions []metav1.Condition,
|
||||||
) *configv1alpha1.FederationDomain {
|
) *configv1alpha1.FederationDomain {
|
||||||
fdCopy := fd.DeepCopy()
|
fdCopy := fd.DeepCopy()
|
||||||
|
|
||||||
|
@ -658,26 +658,26 @@ func requireDelete(t *testing.T, client pinnipedclientset.Interface, ns, name st
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func withAllSuccessfulConditions() map[string]v1alpha1.ConditionStatus {
|
func withAllSuccessfulConditions() map[string]metav1.ConditionStatus {
|
||||||
return map[string]v1alpha1.ConditionStatus{
|
return map[string]metav1.ConditionStatus{
|
||||||
"Ready": v1alpha1.ConditionTrue,
|
"Ready": metav1.ConditionTrue,
|
||||||
"IssuerIsUnique": v1alpha1.ConditionTrue,
|
"IssuerIsUnique": metav1.ConditionTrue,
|
||||||
"IdentityProvidersFound": v1alpha1.ConditionTrue,
|
"IdentityProvidersFound": metav1.ConditionTrue,
|
||||||
"OneTLSSecretPerIssuerHostname": v1alpha1.ConditionTrue,
|
"OneTLSSecretPerIssuerHostname": metav1.ConditionTrue,
|
||||||
"IssuerURLValid": v1alpha1.ConditionTrue,
|
"IssuerURLValid": metav1.ConditionTrue,
|
||||||
"IdentityProvidersObjectRefKindValid": v1alpha1.ConditionTrue,
|
"IdentityProvidersObjectRefKindValid": metav1.ConditionTrue,
|
||||||
"IdentityProvidersObjectRefAPIGroupSuffixValid": v1alpha1.ConditionTrue,
|
"IdentityProvidersObjectRefAPIGroupSuffixValid": metav1.ConditionTrue,
|
||||||
"IdentityProvidersDisplayNamesUnique": v1alpha1.ConditionTrue,
|
"IdentityProvidersDisplayNamesUnique": metav1.ConditionTrue,
|
||||||
"TransformsExpressionsValid": v1alpha1.ConditionTrue,
|
"TransformsExpressionsValid": metav1.ConditionTrue,
|
||||||
"TransformsExamplesPassed": v1alpha1.ConditionTrue,
|
"TransformsExamplesPassed": metav1.ConditionTrue,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func withFalseConditions(falseConditionTypes []string) map[string]v1alpha1.ConditionStatus {
|
func withFalseConditions(falseConditionTypes []string) map[string]metav1.ConditionStatus {
|
||||||
c := map[string]v1alpha1.ConditionStatus{}
|
c := map[string]metav1.ConditionStatus{}
|
||||||
for k, v := range withAllSuccessfulConditions() {
|
for k, v := range withAllSuccessfulConditions() {
|
||||||
if slices.Contains(falseConditionTypes, k) {
|
if slices.Contains(falseConditionTypes, k) {
|
||||||
c[k] = v1alpha1.ConditionFalse
|
c[k] = metav1.ConditionFalse
|
||||||
} else {
|
} else {
|
||||||
c[k] = v
|
c[k] = v
|
||||||
}
|
}
|
||||||
@ -685,7 +685,7 @@ func withFalseConditions(falseConditionTypes []string) map[string]v1alpha1.Condi
|
|||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
func requireStatus(t *testing.T, client pinnipedclientset.Interface, ns, name string, wantPhase v1alpha1.FederationDomainPhase, wantConditionTypeToStatus map[string]v1alpha1.ConditionStatus) {
|
func requireStatus(t *testing.T, client pinnipedclientset.Interface, ns, name string, wantPhase v1alpha1.FederationDomainPhase, wantConditionTypeToStatus map[string]metav1.ConditionStatus) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
|
|
||||||
testlib.RequireEventually(t, func(requireEventually *require.Assertions) {
|
testlib.RequireEventually(t, func(requireEventually *require.Assertions) {
|
||||||
@ -699,7 +699,7 @@ func requireStatus(t *testing.T, client pinnipedclientset.Interface, ns, name st
|
|||||||
t.Logf("found FederationDomain %s/%s with phase %s, wanted phase %s", ns, name, actualPhase, wantPhase)
|
t.Logf("found FederationDomain %s/%s with phase %s, wanted phase %s", ns, name, actualPhase, wantPhase)
|
||||||
requireEventually.Equalf(wantPhase, actualPhase, "unexpected phase (conditions = '%#v')", federationDomain.Status.Conditions)
|
requireEventually.Equalf(wantPhase, actualPhase, "unexpected phase (conditions = '%#v')", federationDomain.Status.Conditions)
|
||||||
|
|
||||||
actualConditionTypeToStatus := map[string]v1alpha1.ConditionStatus{}
|
actualConditionTypeToStatus := map[string]metav1.ConditionStatus{}
|
||||||
for _, c := range federationDomain.Status.Conditions {
|
for _, c := range federationDomain.Status.Conditions {
|
||||||
actualConditionTypeToStatus[c.Type] = c.Status
|
actualConditionTypeToStatus[c.Type] = c.Status
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
|||||||
}, v1alpha1.FederationDomainPhaseError)
|
}, v1alpha1.FederationDomainPhaseError)
|
||||||
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
||||||
allSuccessfulLegacyFederationDomainConditions("", fd.Spec),
|
allSuccessfulLegacyFederationDomainConditions("", fd.Spec),
|
||||||
[]v1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
{
|
{
|
||||||
Type: "IdentityProvidersFound", Status: "False", Reason: "LegacyConfigurationIdentityProviderNotFound",
|
Type: "IdentityProvidersFound", Status: "False", Reason: "LegacyConfigurationIdentityProviderNotFound",
|
||||||
Message: "no resources were specified by .spec.identityProviders[].objectRef and no identity provider resources have been found: please create an identity provider resource",
|
Message: "no resources were specified by .spec.identityProviders[].objectRef and no identity provider resources have been found: please create an identity provider resource",
|
||||||
@ -77,7 +77,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
|||||||
testlib.WaitForFederationDomainStatusPhase(ctx, t, fd.Name, v1alpha1.FederationDomainPhaseError)
|
testlib.WaitForFederationDomainStatusPhase(ctx, t, fd.Name, v1alpha1.FederationDomainPhaseError)
|
||||||
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
||||||
allSuccessfulLegacyFederationDomainConditions(oidcIdentityProvider2.Name, fd.Spec),
|
allSuccessfulLegacyFederationDomainConditions(oidcIdentityProvider2.Name, fd.Spec),
|
||||||
[]v1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
{
|
{
|
||||||
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProviderNotSpecified",
|
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProviderNotSpecified",
|
||||||
Message: "no resources were specified by .spec.identityProviders[].objectRef and 2 identity provider " +
|
Message: "no resources were specified by .spec.identityProviders[].objectRef and 2 identity provider " +
|
||||||
@ -123,7 +123,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
|||||||
}, v1alpha1.FederationDomainPhaseError)
|
}, v1alpha1.FederationDomainPhaseError)
|
||||||
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
||||||
allSuccessfulFederationDomainConditions(fd.Spec),
|
allSuccessfulFederationDomainConditions(fd.Spec),
|
||||||
[]v1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
{
|
{
|
||||||
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProvidersObjectRefsNotFound",
|
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProvidersObjectRefsNotFound",
|
||||||
Message: here.Docf(`
|
Message: here.Docf(`
|
||||||
@ -147,7 +147,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
|||||||
testlib.WaitForFederationDomainStatusPhase(ctx, t, fd.Name, v1alpha1.FederationDomainPhaseError)
|
testlib.WaitForFederationDomainStatusPhase(ctx, t, fd.Name, v1alpha1.FederationDomainPhaseError)
|
||||||
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
||||||
allSuccessfulFederationDomainConditions(fd.Spec),
|
allSuccessfulFederationDomainConditions(fd.Spec),
|
||||||
[]v1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
{
|
{
|
||||||
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProvidersObjectRefsNotFound",
|
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProvidersObjectRefsNotFound",
|
||||||
Message: fmt.Sprintf(`cannot find resource specified by .spec.identityProviders[1].objectRef (with name "%s")`, oidcIDP2Meta.Name),
|
Message: fmt.Sprintf(`cannot find resource specified by .spec.identityProviders[1].objectRef (with name "%s")`, oidcIDP2Meta.Name),
|
||||||
@ -175,7 +175,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
|||||||
testlib.WaitForFederationDomainStatusPhase(ctx, t, fd.Name, v1alpha1.FederationDomainPhaseError)
|
testlib.WaitForFederationDomainStatusPhase(ctx, t, fd.Name, v1alpha1.FederationDomainPhaseError)
|
||||||
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
||||||
allSuccessfulFederationDomainConditions(fd.Spec),
|
allSuccessfulFederationDomainConditions(fd.Spec),
|
||||||
[]v1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
{
|
{
|
||||||
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProvidersObjectRefsNotFound",
|
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProvidersObjectRefsNotFound",
|
||||||
Message: fmt.Sprintf(`cannot find resource specified by .spec.identityProviders[0].objectRef (with name "%s")`, oidcIDP1Meta.Name),
|
Message: fmt.Sprintf(`cannot find resource specified by .spec.identityProviders[0].objectRef (with name "%s")`, oidcIDP1Meta.Name),
|
||||||
@ -342,7 +342,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
|||||||
|
|
||||||
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
||||||
allSuccessfulFederationDomainConditions(fd.Spec),
|
allSuccessfulFederationDomainConditions(fd.Spec),
|
||||||
[]v1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
{
|
{
|
||||||
Type: "IdentityProvidersDisplayNamesUnique", Status: "False", Reason: "DuplicateDisplayNames",
|
Type: "IdentityProvidersDisplayNamesUnique", Status: "False", Reason: "DuplicateDisplayNames",
|
||||||
Message: `the names specified by .spec.identityProviders[].displayName contain duplicates: "not unique"`,
|
Message: `the names specified by .spec.identityProviders[].displayName contain duplicates: "not unique"`,
|
||||||
@ -485,7 +485,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
|||||||
|
|
||||||
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
testlib.WaitForFederationDomainStatusConditions(ctx, t, fd.Name, replaceSomeConditions(
|
||||||
allSuccessfulFederationDomainConditions(fd.Spec),
|
allSuccessfulFederationDomainConditions(fd.Spec),
|
||||||
[]v1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
{
|
{
|
||||||
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProvidersObjectRefsNotFound",
|
Type: "IdentityProvidersFound", Status: "False", Reason: "IdentityProvidersObjectRefsNotFound",
|
||||||
Message: `cannot find resource specified by .spec.identityProviders[2].objectRef (with name "also will not be found")`,
|
Message: `cannot find resource specified by .spec.identityProviders[2].objectRef (with name "also will not be found")`,
|
||||||
@ -950,8 +950,8 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func replaceSomeConditions(conditions []v1alpha1.Condition, replaceWithTheseConditions []v1alpha1.Condition) []v1alpha1.Condition {
|
func replaceSomeConditions(conditions []metav1.Condition, replaceWithTheseConditions []metav1.Condition) []metav1.Condition {
|
||||||
cp := make([]v1alpha1.Condition, len(conditions))
|
cp := make([]metav1.Condition, len(conditions))
|
||||||
copy(cp, conditions)
|
copy(cp, conditions)
|
||||||
for _, replacementCond := range replaceWithTheseConditions {
|
for _, replacementCond := range replaceWithTheseConditions {
|
||||||
for i, cond := range cp {
|
for i, cond := range cp {
|
||||||
@ -964,10 +964,10 @@ func replaceSomeConditions(conditions []v1alpha1.Condition, replaceWithTheseCond
|
|||||||
return cp
|
return cp
|
||||||
}
|
}
|
||||||
|
|
||||||
func allSuccessfulLegacyFederationDomainConditions(idpName string, federationDomainSpec v1alpha1.FederationDomainSpec) []v1alpha1.Condition {
|
func allSuccessfulLegacyFederationDomainConditions(idpName string, federationDomainSpec v1alpha1.FederationDomainSpec) []metav1.Condition {
|
||||||
return replaceSomeConditions(
|
return replaceSomeConditions(
|
||||||
allSuccessfulFederationDomainConditions(federationDomainSpec),
|
allSuccessfulFederationDomainConditions(federationDomainSpec),
|
||||||
[]v1alpha1.Condition{
|
[]metav1.Condition{
|
||||||
{
|
{
|
||||||
Type: "IdentityProvidersFound", Status: "True", Reason: "LegacyConfigurationSuccess",
|
Type: "IdentityProvidersFound", Status: "True", Reason: "LegacyConfigurationSuccess",
|
||||||
Message: fmt.Sprintf(`no resources were specified by .spec.identityProviders[].objectRef but exactly one `+
|
Message: fmt.Sprintf(`no resources were specified by .spec.identityProviders[].objectRef but exactly one `+
|
||||||
@ -979,8 +979,8 @@ func allSuccessfulLegacyFederationDomainConditions(idpName string, federationDom
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func allSuccessfulFederationDomainConditions(federationDomainSpec v1alpha1.FederationDomainSpec) []v1alpha1.Condition {
|
func allSuccessfulFederationDomainConditions(federationDomainSpec v1alpha1.FederationDomainSpec) []metav1.Condition {
|
||||||
return []v1alpha1.Condition{
|
return []metav1.Condition{
|
||||||
{
|
{
|
||||||
Type: "IdentityProvidersDisplayNamesUnique", Status: "True", Reason: "Success",
|
Type: "IdentityProvidersDisplayNamesUnique", Status: "True", Reason: "Success",
|
||||||
Message: "the names specified by .spec.identityProviders[].displayName are unique",
|
Message: "the names specified by .spec.identityProviders[].displayName are unique",
|
||||||
|
@ -329,7 +329,7 @@ func WaitForFederationDomainStatusPhase(ctx context.Context, t *testing.T, feder
|
|||||||
}, 60*time.Second, 1*time.Second, "expected the FederationDomain to have status %q", expectPhase)
|
}, 60*time.Second, 1*time.Second, "expected the FederationDomain to have status %q", expectPhase)
|
||||||
}
|
}
|
||||||
|
|
||||||
func WaitForFederationDomainStatusConditions(ctx context.Context, t *testing.T, federationDomainName string, expectConditions []configv1alpha1.Condition) {
|
func WaitForFederationDomainStatusConditions(ctx context.Context, t *testing.T, federationDomainName string, expectConditions []metav1.Condition) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
testEnv := IntegrationEnv(t)
|
testEnv := IntegrationEnv(t)
|
||||||
federationDomainsClient := NewSupervisorClientset(t).ConfigV1alpha1().FederationDomains(testEnv.SupervisorNamespace)
|
federationDomainsClient := NewSupervisorClientset(t).ConfigV1alpha1().FederationDomains(testEnv.SupervisorNamespace)
|
||||||
|
Loading…
Reference in New Issue
Block a user