Skip to content

Commit

Permalink
use v1 directly instead of type alias
Browse files Browse the repository at this point in the history
Signed-off-by: zirain <[email protected]>
  • Loading branch information
zirain committed Sep 10, 2024
1 parent 34a117f commit 5f04b28
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions api/v1alpha1/basic_auth_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

package v1alpha1

import gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1"
import (
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
)

const BasicAuthUsersSecretKey = ".htpasswd"

Expand All @@ -23,5 +25,5 @@ type BasicAuth struct {
// for more details.
//
// Note: The secret must be in the same namespace as the SecurityPolicy.
Users gwapiv1b1.SecretObjectReference `json:"users"`
Users gwapiv1.SecretObjectReference `json:"users"`
}
4 changes: 2 additions & 2 deletions api/v1alpha1/oidc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1"
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
)

const OIDCClientSecretKey = "client-secret"
Expand All @@ -29,7 +29,7 @@ type OIDC struct {
// This is an Opaque secret. The client secret should be stored in the key
// "client-secret".
// +kubebuilder:validation:Required
ClientSecret gwapiv1b1.SecretObjectReference `json:"clientSecret"`
ClientSecret gwapiv1.SecretObjectReference `json:"clientSecret"`

// The optional cookie name overrides to be used for Bearer and IdToken cookies in the
// [Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
Expand Down
3 changes: 2 additions & 1 deletion api/v1alpha1/policy_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package v1alpha1

import (
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)

Expand All @@ -30,7 +31,7 @@ type TargetSelector struct {
// Group is the group that this selector targets. Defaults to gateway.networking.k8s.io
//
// +kubebuilder:default:="gateway.networking.k8s.io"
Group *gwapiv1a2.Group `json:"group,omitempty"`
Group *gwapiv1.Group `json:"group,omitempty"`

// Kind is the resource kind that this selector targets.
Kind gwapiv1a2.Kind `json:"kind"`
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/wasm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package v1alpha1

import (
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1"
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
)

// Wasm defines a Wasm extension.
Expand Down Expand Up @@ -136,7 +136,7 @@ type ImageWasmCodeSource struct {
// Only support Kubernetes Secret resource from the same namespace.
// +kubebuilder:validation:XValidation:message="only support Secret kind.",rule="self.kind == 'Secret'"
// +optional
PullSecretRef *gwapiv1b1.SecretObjectReference `json:"pullSecretRef,omitempty"`
PullSecretRef *gwapiv1.SecretObjectReference `json:"pullSecretRef,omitempty"`
}

// ImagePullPolicy defines the policy to use when pulling an OIC image.
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5f04b28

Please sign in to comment.