cluster

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProxyConfigToCluster

func AddProxyConfigToCluster(ocConfig oc.OcConfig, proxy *network.ProxyConfig) error

func AddProxyToKubeletAndCriO

func AddProxyToKubeletAndCriO(sshRunner *ssh.SSHRunner, 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 AddPullSecret

func AddPullSecret(sshRunner *ssh.SSHRunner, ocConfig oc.OcConfig, pullSec string) error

func ApproveNodeCSR added in v1.13.0

func ApproveNodeCSR(ocConfig oc.OcConfig) error

ApproveNodeCSR approves the certificate for the node.

func CheckProxySettingsForOperator

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

func DeleteOpenshiftApiServerPods

func DeleteOpenshiftApiServerPods(ocConfig oc.OcConfig) error

func GetRootPartitionUsage

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

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

func RegenerateCertificates added in v1.13.0

func RegenerateCertificates(sshRunner *ssh.SSHRunner, ocConfig oc.OcConfig) error

func UpdateClusterID

func UpdateClusterID(ocConfig oc.OcConfig) error

func WaitForOpenshiftResource added in v1.13.0

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

func WaitForSsh

func WaitForSsh(sshRunner *ssh.SSHRunner) error

func WaitforRequestHeaderClientCaFile

func WaitforRequestHeaderClientCaFile(ocConfig oc.OcConfig) error

Types

type CertExpiryState

type CertExpiryState int
const (
	Unknown CertExpiryState = iota
	CertNotExpired
	CertExpired
)

func CheckCertsValidity

func CheckCertsValidity(sshRunner *ssh.SSHRunner) (CertExpiryState, error)

CheckCertsValidity checks if the cluster certs have expired or going to expire in next 7 days

type ClusterStatus added in v1.13.0

type ClusterStatus struct {
	Available   bool
	Degraded    bool
	Progressing bool
	Disabled    bool
}

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.OcConfig) (*ClusterStatus, error)

type K8sResource added in v1.13.0

type K8sResource struct {
	Items []struct {
		Metadata struct {
			Name string `json:"name"`
		} `json:"metadata"`
		Status struct {
			Conditions []struct {
				LastTransitionTime time.Time `json:"lastTransitionTime"`
				Reason             string    `json:"reason"`
				Status             string    `json:"status"`
				Type               string    `json:"type"`
			} `json:"conditions"`
		} `json:"status,omitempty"`
	} `json:"items"`
}

Jump to

Keyboard shortcuts

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