Documentation
¶
Overview ¶
Package common contains code shared between the subcommands of crinit.
Index ¶
- Variables
- func CreateAPIServer(clientset client.Interface, ...) (*appsv1beta1.Deployment, error)
- func CreateAPIServerCredentialsSecret(clientset client.Interface, namespace, credentialsName string, ...) (*v1.Secret, error)
- func CreateNamespace(clientset client.Interface, namespace string, dryRun bool) (*v1.Namespace, error)
- func CreatePVC(clientset client.Interface, ...) (*v1.PersistentVolumeClaim, error)
- func CreateService(cmdOut io.Writer, clientset client.Interface, ...) (*v1.Service, []string, []string, error)
- func DeleteKubeconfigEntry(cmdOut io.Writer, pathOptions *clientcmd.PathOptions, name, kubeconfig string, ...) error
- func DeleteNamespace(cmdOut io.Writer, clientset client.Interface, namespace string, dryRun bool) error
- func GetClusterNodeIPs(clientset client.Interface) ([]string, error)
- func WaitForClusterRegistryDeletion(cmdOut io.Writer, clientset client.Interface, namespace string, dryRun bool) error
- func WaitForLoadBalancerAddress(cmdOut io.Writer, clientset client.Interface, svc *v1.Service, dryRun bool) ([]string, []string, error)
- func WaitForPods(cmdOut io.Writer, clientset client.Interface, pods []string, namespace string) error
- func WaitSrvHealthy(cmdOut io.Writer, crClientset client.Interface) error
Constants ¶
This section is empty.
Variables ¶
var (
ComponentLabel = map[string]string{
"app": "clusterregistry",
}
)
Functions ¶
func CreateAPIServer ¶
func CreateAPIServer(clientset client.Interface, namespace, name, serverImage, etcdImage, advertiseAddress, credentialsName, serviceAccountName string, hasHTTPBasicAuthFile, hasTokenAuthFile bool, argOverrides map[string]string, pvc *v1.PersistentVolumeClaim, aggregated, dryRun bool) (*appsv1beta1.Deployment, error)
CreateAPIServer helper to create the apiserver deployment object and return the object.
func CreateAPIServerCredentialsSecret ¶
func CreateAPIServerCredentialsSecret(clientset client.Interface, namespace, credentialsName string, credentials *util.Credentials, dryRun bool) (*v1.Secret, error)
CreateAPIServerCredentialsSecret helper to create secret object and return the object.
func CreateNamespace ¶
func CreateNamespace(clientset client.Interface, namespace string, dryRun bool) (*v1.Namespace, error)
CreateNamespace helper to create the cluster registry namespace object and return the object.
func CreatePVC ¶
func CreatePVC(clientset client.Interface, namespace, svcName, etcdPVCapacity, etcdPVStorageClass string, dryRun bool) (*v1.PersistentVolumeClaim, error)
CreatePVC helper to create the persistent volume claim object and return the object.
func CreateService ¶
func CreateService(cmdOut io.Writer, clientset client.Interface, namespace, svcName, apiserverAdvertiseAddress string, apiserverPort *int32, apiserverServiceType v1.ServiceType, dryRun bool) (*v1.Service, []string, []string, error)
CreateService helper to create the cluster registry apiserver service object and return the object. If service type is load balancer, will wait for load balancer IP and return it and hostnames.
func DeleteKubeconfigEntry ¶ added in v0.0.4
func DeleteKubeconfigEntry(cmdOut io.Writer, pathOptions *clientcmd.PathOptions, name, kubeconfig string, dryRun, ignoreErrors bool) error
DeleteKubeconfigEntry handles updating the kubeconfig to remove the cluster registry entry that was previously added when the cluster registry was initialized.
func DeleteNamespace ¶ added in v0.0.4
func DeleteNamespace(cmdOut io.Writer, clientset client.Interface, namespace string, dryRun bool) error
DeleteNamespace deletes the cluster registry namespace.
func GetClusterNodeIPs ¶
GetClusterNodeIPs returns a list of the IP addresses of nodes in the cluster, with a preference for external IP addresses.
func WaitForClusterRegistryDeletion ¶ added in v0.0.4
func WaitForClusterRegistryDeletion(cmdOut io.Writer, clientset client.Interface, namespace string, dryRun bool) error
WaitForClusterRegistryDeletion waits a certain amount of time for the namespace requested to be deleted.
func WaitForLoadBalancerAddress ¶
func WaitForLoadBalancerAddress(cmdOut io.Writer, clientset client.Interface, svc *v1.Service, dryRun bool) ([]string, []string, error)
WaitForLoadBalancerAddress polls the apiserver for load balancer status to retrieve IPs and hostnames for it.
func WaitForPods ¶
Types ¶
This section is empty.