cluster

package
v1.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeletServerCert = "/var/lib/kubelet/pki/kubelet-server-current.pem"
	KubeletClientCert = "/var/lib/kubelet/pki/kubelet-client-current.pem"

	AggregatorClientCert = "/etc/kubernetes/static-pod-resources/kube-apiserver-certs/configmaps/aggregator-client-ca/ca-bundle.crt"
)

Variables

This section is empty.

Functions

func AddProxyConfigToCluster

func AddProxyConfigToCluster(sshRunner *ssh.Runner, ocConfig oc.Config, proxy *network.ProxyConfig) error

func AddProxyToKubeletAndCriO

func AddProxyToKubeletAndCriO(sshRunner *ssh.Runner, proxy *network.ProxyConfig) error

AddProxyToKubeletAndCriO adds the systemd drop-in proxy configuration file to the instance, both services (kubelet and crio) need to be restarted after this change. Since proxy operator is not able to make changes to in the kubelet/crio side, this is the job of machine config operator on the node and for crc this is not possible so we do need to put it here.

func ApproveCSRAndWaitForCertsRenewal added in v1.20.0

func ApproveCSRAndWaitForCertsRenewal(sshRunner *ssh.Runner, ocConfig oc.Config, client, server bool) error

func CheckCertsValidity

func CheckCertsValidity(sshRunner *ssh.Runner) (map[string]bool, error)

func CheckProxySettingsForOperator

func CheckProxySettingsForOperator(ocConfig oc.Config, proxy *network.ProxyConfig, deployment, namespace string) (bool, error)

func DeleteOpenshiftAPIServerPods added in v1.14.0

func DeleteOpenshiftAPIServerPods(ocConfig oc.Config) error

func EnsureClusterIDIsNotEmpty added in v1.20.0

func EnsureClusterIDIsNotEmpty(ocConfig oc.Config) error

func EnsurePullSecretPresentInTheCluster added in v1.20.0

func EnsurePullSecretPresentInTheCluster(ocConfig oc.Config, pullSec PullSecretLoader) error

func EnsurePullSecretPresentOnInstanceDisk added in v1.20.0

func EnsurePullSecretPresentOnInstanceDisk(sshRunner *ssh.Runner, pullSecret PullSecretLoader) error

func ForgetPullSecret added in v1.23.0

func ForgetPullSecret() error

func GenerateRandomPasswordHash added in v1.24.0

func GenerateRandomPasswordHash(length int) (string, error)

generateRandomPasswordHash generates a hash of a random ASCII password 5char-5char-5char-5char Copied from openshift/installer https://github.com/openshift/installer/blob/master/pkg/asset/password/password.go

func GetKubeadminPassword added in v1.25.0

func GetKubeadminPassword(bundle *bundle.CrcBundleInfo) (string, error)

func GetRootPartitionUsage

func GetRootPartitionUsage(sshRunner *ssh.Runner) (int64, int64, error)

Return size of disk, used space in bytes and the mountpoint

func RemovePullSecretFromCluster added in v1.26.0

func RemovePullSecretFromCluster(ocConfig oc.Config, sshRunner *ssh.Runner) error

func StartMonitoring added in v1.21.0

func StartMonitoring(ocConfig oc.Config) error

func UpdateKubeAdminUserPassword added in v1.24.0

func UpdateKubeAdminUserPassword(ocConfig oc.Config) error

UpdateKubeAdminUserPassword does following - Create and put updated kubeadmin password to ~/.crc/machine/crc/kubeadmin-password - Update the htpasswd secret

func WaitForAPIServer added in v1.21.0

func WaitForAPIServer(ctx context.Context, ocConfig oc.Config) error

func WaitForClusterStable added in v1.23.0

func WaitForClusterStable(ctx context.Context, ocConfig oc.Config, monitoringEnabled bool) error

WaitForClusterStable checks that the cluster is running a number of consecutive times

func WaitForOpenshiftResource added in v1.13.0

func WaitForOpenshiftResource(ocConfig oc.Config, resource string) error

func WaitForRequestHeaderClientCaFile added in v1.20.0

func WaitForRequestHeaderClientCaFile(sshRunner *ssh.Runner) error

func WaitForSSH added in v1.14.0

func WaitForSSH(ctx context.Context, sshRunner *ssh.Runner) error

Types

type PullSecretLoader added in v1.23.0

type PullSecretLoader interface {
	Value() (string, error)
}

func NewInteractivePullSecretLoader added in v1.23.0

func NewInteractivePullSecretLoader(config crcConfig.Storage) PullSecretLoader

func NewNonInteractivePullSecretLoader added in v1.23.0

func NewNonInteractivePullSecretLoader(config crcConfig.Storage, path string) PullSecretLoader

type PullSecretMemoizer added in v1.23.0

type PullSecretMemoizer struct {
	Getter PullSecretLoader
	// contains filtered or unexported fields
}

func (*PullSecretMemoizer) Value added in v1.23.0

func (p *PullSecretMemoizer) Value() (string, error)

type Status added in v1.14.0

type Status struct {
	Available   bool
	Degraded    bool
	Progressing bool
	Disabled    bool
	// contains filtered or unexported fields
}

https://github.com/openshift/cluster-version-operator/blob/master/docs/dev/clusteroperator.md#what-should-an-operator-report-with-clusteroperator-custom-resource

func GetClusterOperatorStatus added in v1.13.0

func GetClusterOperatorStatus(ocConfig oc.Config, operator string) (*Status, error)

func GetClusterOperatorsStatus added in v1.14.0

func GetClusterOperatorsStatus(ocConfig oc.Config, monitoringEnabled bool) (*Status, error)

func (*Status) IsReady added in v1.23.0

func (status *Status) IsReady() bool

func (*Status) String added in v1.23.0

func (status *Status) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL