Documentation
¶
Index ¶
- Constants
- func DiscoverHostFromService(ctx context.Context, client client.Client, vCluster GenericVCluster) (string, error)
- func EnsureFinalizer(ctx context.Context, client client.Client, obj client.Object, finalizer string) error
- func GetVClusterKubeConfig(ctx context.Context, clusterClient client.Client, vCluster GenericVCluster) (*api.Config, error)
- func RemoveFinalizer(ctx context.Context, client client.Client, obj client.Object, finalizer string) error
- type ClientConfigGetter
- type Credentials
- type GenericReconciler
- type GenericVCluster
- type HTTPClientGetter
Constants ¶
View Source
const ( // A finalizer that is added to the VCluster CR to ensure that helm delete is executed. CleanupFinalizer = "vcluster.loft.sh/cleanup" // DefaultControlPlanePort is the default port for the control plane. DefaultControlPlanePort = 443 // KubeconfigDataName is the key used to store a Kubeconfig in the secret's data field. KubeconfigDataName = "value" // TLSKeyDataName is the key used to store a TLS private key in the secret's data field. TLSKeyDataName = "tls.key" // TLSCrtDataName is the key used to store a TLS certificate in the secret's data field. TLSCrtDataName = "tls.crt" )
Variables ¶
This section is empty.
Functions ¶
func DiscoverHostFromService ¶
func EnsureFinalizer ¶
func GetVClusterKubeConfig ¶
Types ¶
type ClientConfigGetter ¶
type ClientConfigGetter interface {
NewForConfig(restConfig *rest.Config) (kubernetes.Interface, error)
}
func NewClientConfigGetter ¶
func NewClientConfigGetter() ClientConfigGetter
type Credentials ¶
func GetVClusterCredentials ¶
func GetVClusterCredentials(ctx context.Context, clusterClient client.Client, vCluster GenericVCluster) (*Credentials, error)
type GenericReconciler ¶
type GenericReconciler struct { Client client.Client HelmClient helm.Client HelmSecrets *helm.Secrets Log logr.Logger Scheme *runtime.Scheme ClientConfigGetter ClientConfigGetter HTTPClientGetter HTTPClientGetter ControllerName string New func() GenericVCluster // contains filtered or unexported fields }
GenericReconciler reconciles a VCluster object
func (*GenericReconciler) SetupWithManager ¶
func (r *GenericReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type GenericVCluster ¶
type GenericVCluster interface { conditions.Setter GetSpec() *infrastructurev1alpha1.VClusterSpec GetStatus() *infrastructurev1alpha1.VClusterStatus }
type HTTPClientGetter ¶
type HTTPClientGetter interface {
ClientFor(r http.RoundTripper, timeout time.Duration) *http.Client
}
func NewHTTPClientGetter ¶
func NewHTTPClientGetter() HTTPClientGetter
Click to show internal directories.
Click to hide internal directories.