@@ -29,10 +29,94 @@ type GatewayProxySpec struct {
2929 // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
3030 // Important: Run "make" to regenerate code after modifying this file
3131
32+ PublishService string `json:"publishService,omitempty"`
33+ StatusAddress []string `json:"statusAddress,omitempty"`
34+ Provider * Provider `json:"provider,omitempty"`
3235 Plugins []GatewayProxyPlugin `json:"plugins,omitempty"`
3336 PluginMetadata map [string ]apiextensionsv1.JSON `json:"pluginMetadata,omitempty"`
3437}
3538
39+ // ProviderType defines the type of provider
40+ // +kubebuilder:validation:Enum=ControlPlane
41+ type ProviderType string
42+
43+ const (
44+ // ProviderTypeControlPlane represents the control plane provider type
45+ ProviderTypeControlPlane ProviderType = "ControlPlane"
46+ )
47+
48+ // Provider defines the provider configuration for GatewayProxy
49+ type Provider struct {
50+ // Type specifies the type of provider
51+ // +kubebuilder:validation:Required
52+ Type ProviderType `json:"type"`
53+
54+ // ControlPlane specifies the configuration for control plane provider
55+ // +optional
56+ ControlPlane * ControlPlaneProvider `json:"controlPlane,omitempty"`
57+ }
58+
59+ // AuthType defines the type of authentication
60+ // +kubebuilder:validation:Enum=AdminKey
61+ type AuthType string
62+
63+ const (
64+ // AuthTypeAdminKey represents the admin key authentication type
65+ AuthTypeAdminKey AuthType = "AdminKey"
66+ )
67+
68+ // SecretKeySelector defines a reference to a specific key within a Secret
69+ type SecretKeySelector struct {
70+ // Name is the name of the secret
71+ // +kubebuilder:validation:Required
72+ Name string `json:"name"`
73+
74+ // Key is the key in the secret
75+ // +kubebuilder:validation:Required
76+ Key string `json:"key"`
77+ }
78+
79+ // AdminKeyAuth defines the admin key authentication configuration
80+ type AdminKeyAuth struct {
81+ // Value specifies the admin key value directly (not recommended for production)
82+ // +optional
83+ Value string `json:"value,omitempty"`
84+
85+ // ValueFrom specifies the source of the admin key
86+ // +optional
87+ ValueFrom * AdminKeyValueFrom `json:"valueFrom,omitempty"`
88+ }
89+
90+ // AdminKeyValueFrom defines the source of the admin key
91+ type AdminKeyValueFrom struct {
92+ // SecretKeyRef references a key in a Secret
93+ // +optional
94+ SecretKeyRef * SecretKeySelector `json:"secretKeyRef,omitempty"`
95+ }
96+
97+ // ControlPlaneAuth defines the authentication configuration for control plane
98+ type ControlPlaneAuth struct {
99+ // Type specifies the type of authentication
100+ // +kubebuilder:validation:Required
101+ Type AuthType `json:"type"`
102+
103+ // AdminKey specifies the admin key authentication configuration
104+ // +optional
105+ AdminKey * AdminKeyAuth `json:"adminKey,omitempty"`
106+ }
107+
108+ // ControlPlaneProvider defines the configuration for control plane provider
109+ type ControlPlaneProvider struct {
110+ // Endpoints specifies the list of control plane endpoints
111+ // +kubebuilder:validation:Required
112+ // +kubebuilder:validation:MinItems=1
113+ Endpoints []string `json:"endpoints"`
114+
115+ // Auth specifies the authentication configuration
116+ // +kubebuilder:validation:Required
117+ Auth ControlPlaneAuth `json:"auth"`
118+ }
119+
36120// +kubebuilder:object:root=true
37121// GatewayProxy is the Schema for the gatewayproxies API
38122type GatewayProxy struct {
0 commit comments