Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add client packages #5206

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ ignore:
- "test"
- "**/*.pb.go"
- "**/zz_generated.*.go"
- "pkg/client"
5 changes: 1 addition & 4 deletions api/v1alpha1/backend_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const (
// Backend allows the user to configure the endpoints of a backend and
// the behavior of the connection from Envoy Proxy to the backend.
//
// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=envoy-gateway,shortName=be
// +kubebuilder:subresource:status
Expand Down Expand Up @@ -184,7 +185,3 @@ type BackendList struct {
metav1.ListMeta `json:"metadata,omitempty"`
Items []Backend `json:"items"`
}

func init() {
SchemeBuilder.Register(&Backend{}, &BackendList{})
}
5 changes: 1 addition & 4 deletions api/v1alpha1/backendtrafficpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
KindBackendTrafficPolicy = "BackendTrafficPolicy"
)

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=envoy-gateway,shortName=btp
// +kubebuilder:subresource:status
Expand Down Expand Up @@ -84,7 +85,3 @@ type BackendTrafficPolicyList struct {
metav1.ListMeta `json:"metadata,omitempty"`
Items []BackendTrafficPolicy `json:"items"`
}

func init() {
SchemeBuilder.Register(&BackendTrafficPolicy{}, &BackendTrafficPolicyList{})
}
5 changes: 1 addition & 4 deletions api/v1alpha1/clienttrafficpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const (
KindClientTrafficPolicy = "ClientTrafficPolicy"
)

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=envoy-gateway,shortName=ctp
// +kubebuilder:subresource:status
Expand Down Expand Up @@ -340,7 +341,3 @@ type ClientTrafficPolicyList struct {
metav1.ListMeta `json:"metadata,omitempty"`
Items []ClientTrafficPolicy `json:"items"`
}

func init() {
SchemeBuilder.Register(&ClientTrafficPolicy{}, &ClientTrafficPolicyList{})
}
2 changes: 2 additions & 0 deletions api/v1alpha1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Package v1alpha1 contains API schema definitions for the gateway.envoyproxy.io
// API group.
//
// +k8s:openapi-gen=true
// +kubebuilder:object:generate=true
// +groupName=gateway.envoyproxy.io
// +groupGoName=EnvoyGateway
package v1alpha1
5 changes: 1 addition & 4 deletions api/v1alpha1/envoyextensionypolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
KindEnvoyExtensionPolicy = "EnvoyExtensionPolicy"
)

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=eep
// +kubebuilder:subresource:status
Expand Down Expand Up @@ -76,7 +77,3 @@ type EnvoyExtensionPolicyList struct {
metav1.ListMeta `json:"metadata,omitempty"`
Items []EnvoyExtensionPolicy `json:"items"`
}

func init() {
SchemeBuilder.Register(&EnvoyExtensionPolicy{}, &EnvoyExtensionPolicyList{})
}
9 changes: 4 additions & 5 deletions api/v1alpha1/envoygateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ const (
GatewayMetricsHost = "0.0.0.0"
)

// +kubebuilder:object:root=true
// Note: EnvoyGateway is not a CRD, it's a schema for a configuration in a config map.
// Hence there is no Go client for this resource.

// EnvoyGateway is the schema for the envoygateways API.
//
// +kubebuilder:object:root=true
type EnvoyGateway struct {
metav1.TypeMeta `json:",inline"`

Expand Down Expand Up @@ -608,7 +611,3 @@ type ShutdownManager struct {
// Image specifies the ShutdownManager container image to be used, instead of the default image.
Image *string `json:"image,omitempty"`
}

func init() {
SchemeBuilder.Register(&EnvoyGateway{})
}
5 changes: 1 addition & 4 deletions api/v1alpha1/envoypatchpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const (
KindEnvoyPatchPolicy = "EnvoyPatchPolicy"
)

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=envoy-gateway,shortName=epp
// +kubebuilder:subresource:status
Expand Down Expand Up @@ -172,7 +173,3 @@ type EnvoyPatchPolicyList struct {
metav1.ListMeta `json:"metadata,omitempty"`
Items []EnvoyPatchPolicy `json:"items"`
}

func init() {
SchemeBuilder.Register(&EnvoyPatchPolicy{}, &EnvoyPatchPolicyList{})
}
5 changes: 1 addition & 4 deletions api/v1alpha1/envoyproxy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
KindEnvoyProxy = "EnvoyProxy"
)

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=envoy-gateway,shortName=eproxy
// +kubebuilder:subresource:status
Expand Down Expand Up @@ -454,7 +455,3 @@ const (
// for incoming client traffic, enabling support for both IP protocol versions.
DualStack IPFamily = "DualStack"
)

func init() {
SchemeBuilder.Register(&EnvoyProxy{}, &EnvoyProxyList{})
}
25 changes: 0 additions & 25 deletions api/v1alpha1/groupversion_info.go

This file was deleted.

5 changes: 1 addition & 4 deletions api/v1alpha1/httproutefilter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const (
KindHTTPRouteFilter = "HTTPRouteFilter"
)

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=envoy-gateway,shortName=hrf
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
Expand Down Expand Up @@ -148,7 +149,3 @@ type HTTPRouteFilterList struct {
metav1.ListMeta `json:"metadata,omitempty"`
Items []HTTPRouteFilter `json:"items"`
}

func init() {
SchemeBuilder.Register(&HTTPRouteFilter{}, &HTTPRouteFilterList{})
}
5 changes: 1 addition & 4 deletions api/v1alpha1/securitypolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
KindSecurityPolicy = "SecurityPolicy"
)

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=envoy-gateway,shortName=sp
// +kubebuilder:subresource:status
Expand Down Expand Up @@ -91,7 +92,3 @@ type SecurityPolicyList struct {
metav1.ListMeta `json:"metadata,omitempty"`
Items []SecurityPolicy `json:"items"`
}

func init() {
SchemeBuilder.Register(&SecurityPolicy{}, &SecurityPolicyList{})
}
74 changes: 74 additions & 0 deletions api/v1alpha1/zz_generated.register.go

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

109 changes: 109 additions & 0 deletions pkg/client/clientset/versioned/clientset.go

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

Loading