Files
netbird-kubernetes-operator/pkg/applyconfigurations/api/v1alpha1/clusterproxyspec.go
T
Philip LaineandGitHub 5dd73dcc80 Add new resource for Kubernetes API proxy (#279)
This adds a new resource which deploys a Kubernetes API server proxy
that can be used to access the API server without tokens through
Netbird.

Part of #274 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added ClusterProxy custom resource for cluster API proxying
capabilities

* **Documentation**
  * Added ClusterProxy API reference documentation with schema details

* **Examples**
* Added example ClusterProxy configuration and RBAC setup for cluster
proxy targets

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/netbirdio/kubernetes-operator/pull/279?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-01 11:41:48 +02:00

49 lines
2.3 KiB
Go

// SPDX-License-Identifier: BSD-3-Clause
// Code generated by controller-gen. DO NOT EDIT.
package v1alpha1
// ClusterProxySpecApplyConfiguration represents a declarative configuration of the ClusterProxySpec type for use
// with apply.
//
// ClusterProxySpec defines the desired state of ClusterProxy.
type ClusterProxySpecApplyConfiguration struct {
// ClusterName is the name of the Kubernetes cluster.
ClusterName *string `json:"clusterName,omitempty"`
// APIServer is the URL of the Kubernetes API server to proxy requests to.
APIServer *string `json:"apiServer,omitempty"`
// ServiceAccountName is a reference to the service account used for impersonation.
ServiceAccountName *string `json:"serviceAccountName,omitempty"`
}
// ClusterProxySpecApplyConfiguration constructs a declarative configuration of the ClusterProxySpec type for use with
// apply.
func ClusterProxySpec() *ClusterProxySpecApplyConfiguration {
return &ClusterProxySpecApplyConfiguration{}
}
// WithClusterName sets the ClusterName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ClusterName field is set to the value of the last call.
func (b *ClusterProxySpecApplyConfiguration) WithClusterName(value string) *ClusterProxySpecApplyConfiguration {
b.ClusterName = &value
return b
}
// WithAPIServer sets the APIServer field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIServer field is set to the value of the last call.
func (b *ClusterProxySpecApplyConfiguration) WithAPIServer(value string) *ClusterProxySpecApplyConfiguration {
b.APIServer = &value
return b
}
// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ServiceAccountName field is set to the value of the last call.
func (b *ClusterProxySpecApplyConfiguration) WithServiceAccountName(value string) *ClusterProxySpecApplyConfiguration {
b.ServiceAccountName = &value
return b
}