SameIssuerHostMustUseSameSecret is a valid OIDCProvider status
I saw this message in our CI logs, which led me to this fix. could not update status: OIDCProvider.config.supervisor.pinniped.dev "acceptance-provider" is invalid: status.status: Unsupported value: "SameIssuerHostMustUseSameSecret": supported values: "Success", "Duplicate", "Invalid" Also - correct an integration test error message that was misleading. Signed-off-by: Andrew Keesler <akeesler@vmware.com>
This commit is contained in:
parent
417e6b1fee
commit
50f9b434e7
@ -8,7 +8,7 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid
|
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid;SameIssuerHostMustUseSameSecret
|
||||||
type OIDCProviderStatusCondition string
|
type OIDCProviderStatusCondition string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -108,6 +108,7 @@ spec:
|
|||||||
- Success
|
- Success
|
||||||
- Duplicate
|
- Duplicate
|
||||||
- Invalid
|
- Invalid
|
||||||
|
- SameIssuerHostMustUseSameSecret
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid
|
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid;SameIssuerHostMustUseSameSecret
|
||||||
type OIDCProviderStatusCondition string
|
type OIDCProviderStatusCondition string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -108,6 +108,7 @@ spec:
|
|||||||
- Success
|
- Success
|
||||||
- Duplicate
|
- Duplicate
|
||||||
- Invalid
|
- Invalid
|
||||||
|
- SameIssuerHostMustUseSameSecret
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid
|
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid;SameIssuerHostMustUseSameSecret
|
||||||
type OIDCProviderStatusCondition string
|
type OIDCProviderStatusCondition string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -108,6 +108,7 @@ spec:
|
|||||||
- Success
|
- Success
|
||||||
- Duplicate
|
- Duplicate
|
||||||
- Invalid
|
- Invalid
|
||||||
|
- SameIssuerHostMustUseSameSecret
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid
|
// +kubebuilder:validation:Enum=Success;Duplicate;Invalid;SameIssuerHostMustUseSameSecret
|
||||||
type OIDCProviderStatusCondition string
|
type OIDCProviderStatusCondition string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -108,6 +108,7 @@ spec:
|
|||||||
- Success
|
- Success
|
||||||
- Duplicate
|
- Duplicate
|
||||||
- Invalid
|
- Invalid
|
||||||
|
- SameIssuerHostMustUseSameSecret
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
@ -15,6 +15,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
@ -265,12 +266,13 @@ func CreateTestOIDCProvider(ctx context.Context, t *testing.T, issuer string, ce
|
|||||||
|
|
||||||
// Wait for the OIDCProvider to enter the expected phase (or time out).
|
// Wait for the OIDCProvider to enter the expected phase (or time out).
|
||||||
var result *configv1alpha1.OIDCProvider
|
var result *configv1alpha1.OIDCProvider
|
||||||
require.Eventuallyf(t, func() bool {
|
assert.Eventuallyf(t, func() bool {
|
||||||
var err error
|
var err error
|
||||||
result, err = opcs.Get(ctx, opc.Name, metav1.GetOptions{})
|
result, err = opcs.Get(ctx, opc.Name, metav1.GetOptions{})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
return result.Status.Status == expectStatus
|
return result.Status.Status == expectStatus
|
||||||
}, 60*time.Second, 1*time.Second, "expected the UpstreamOIDCProvider to go into phase %s", expectStatus)
|
}, 60*time.Second, 1*time.Second, "expected the OIDCProvider to have status %q", expectStatus)
|
||||||
|
require.Equal(t, expectStatus, result.Status.Status)
|
||||||
|
|
||||||
return opc
|
return opc
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user