Documentation
¶
Index ¶
- Constants
- func AddFlags(flags *flag.FlagSet)
- func CreateKotsadmIDConfigMap(kotsadmID string) error
- func DeleteKotsadm(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) error
- func FindKotsadm(clientset *kubernetes.Clientset, namespace string) (string, error)
- func FindKotsadmImage(namespace string) (string, error)
- func GenerateBootstrapToken(client kubernetes.Interface, ttl time.Duration) (string, error)
- func GetClientset() (*kubernetes.Clientset, error)
- func GetClusterConfig() (*rest.Config, error)
- func GetCurrentRules(deployOptions kotsadmtypes.DeployOptions, clientset *kubernetes.Clientset) ([]rbacv1.PolicyRule, error)
- func GetK8sVersion() (string, error)
- func GetKotsadmIDConfigMap() (*corev1.ConfigMap, error)
- func GetOpenShiftPodSecurityContext(kotsadmNamespace string) (*corev1.PodSecurityContext, error)
- func GetPodLogs(ctx context.Context, clientset kubernetes.Interface, pod *corev1.Pod, ...) ([]byte, error)
- func IsKotsadmClusterScoped(ctx context.Context, clientset kubernetes.Interface, namespace string) bool
- func IsKotsadmIDConfigMapPresent() (bool, error)
- func IsOpenShift(clientset kubernetes.Interface) bool
- func IsPortAvailable(port int) bool
- func OpenShiftVersion() (string, error)
- func PortForward(localPort int, remotePort int, namespace string, podName string, ...) (int, <-chan error, error)
- func ReadKustomizationFromFile(file string) (*kustomizetypes.Kustomization, error)
- func ScaleDownDeployment(ctx context.Context, clientset kubernetes.Interface, namespace string, ...) error
- func ServiceForward(clientset *kubernetes.Clientset, cfg *rest.Config, localPort int, ...) (chan struct{}, error)
- func UpdateKotsadmIDConfigMap(kotsadmID string) error
- func UploadCertsWithNewKey() (string, error)
- func WaitForDeploymentReady(ctx context.Context, clientset kubernetes.Interface, namespace string, ...) error
- func WaitForKotsadm(clientset *kubernetes.Clientset, namespace string, ...) (string, error)
- func WaitForPod(ctx context.Context, clientset kubernetes.Interface, namespace string, ...) error
- func WaitForStatefulSetReady(ctx context.Context, clientset kubernetes.Interface, namespace string, ...) error
- func WriteKustomizationToFile(kustomization kustomizetypes.Kustomization, file string) error
Constants ¶
const (
KotsadmIDConfigMapName = "kotsadm-id"
)
Variables ¶
This section is empty.
Functions ¶
func DeleteKotsadm ¶
func FindKotsadm ¶
func FindKotsadm(clientset *kubernetes.Clientset, namespace string) (string, error)
func FindKotsadmImage ¶
func GenerateBootstrapToken ¶
GenerateBootstrapToken will generate a node join token for kubeadm. ttl defines the time to live for this token.
func GetClientset ¶
func GetClientset() (*kubernetes.Clientset, error)
func GetClusterConfig ¶
func GetCurrentRules ¶
func GetCurrentRules(deployOptions kotsadmtypes.DeployOptions, clientset *kubernetes.Clientset) ([]rbacv1.PolicyRule, error)
func GetK8sVersion ¶
func GetKotsadmIDConfigMap ¶
func GetOpenShiftPodSecurityContext ¶
func GetOpenShiftPodSecurityContext(kotsadmNamespace string) (*corev1.PodSecurityContext, error)
GetOpenShiftPodSecurityContext returns a PodSecurityContext object that has: RunAsUser set to the minimum value in the "openshift.io/sa.scc.uid-range" annotation. FSGroup set to the minimum value in the "openshift.io/sa.scc.supplemental-groups" annotation if exists, else falls back to the minimum value in the "openshift.io/sa.scc.uid-range" annotation.
func GetPodLogs ¶
func IsKotsadmClusterScoped ¶
func IsKotsadmClusterScoped(ctx context.Context, clientset kubernetes.Interface, namespace string) bool
IsKotsadmClusterScoped will check if kotsadm has cluster scope access or not
func IsOpenShift ¶
func IsOpenShift(clientset kubernetes.Interface) bool
IsOpenShift returns true if the cluster is positively identified as being an openshift cluster
func IsPortAvailable ¶
func OpenShiftVersion ¶
func PortForward ¶
func PortForward(localPort int, remotePort int, namespace string, podName string, pollForAdditionalPorts bool, stopCh <-chan struct{}, log *logger.CLILogger) (int, <-chan error, error)
PortForward starts a local port forward to a pod in the cluster if localport is set, it will attempt to use that port locally. always check the port number returned though, because a port conflict could cause a different port to be used
func ReadKustomizationFromFile ¶
func ReadKustomizationFromFile(file string) (*kustomizetypes.Kustomization, error)
func ScaleDownDeployment ¶
func ServiceForward ¶
func UploadCertsWithNewKey ¶ added in v1.37.0
func WaitForDeploymentReady ¶
func WaitForKotsadm ¶
func WaitForPod ¶
func WaitForStatefulSetReady ¶
func WriteKustomizationToFile ¶
func WriteKustomizationToFile(kustomization kustomizetypes.Kustomization, file string) error
Types ¶
This section is empty.