nodeconfig

package
v0.0.0-...-e561cac Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HybridOverlaySubnet is an annotation applied by the cluster network operator which is used by the hybrid overlay
	HybridOverlaySubnet = "k8s.ovn.org/hybrid-overlay-node-subnet"
	// HybridOverlayMac is an annotation applied by the hybrid-overlay
	HybridOverlayMac = "k8s.ovn.org/hybrid-overlay-distributed-router-gateway-mac"
	// WindowsOSLabel is the label applied when kubelet is ran to identify Windows nodes
	WindowsOSLabel = "node.openshift.io/os_id=Windows"
	// WorkerLabel is the label that needs to be applied to the Windows node to make it worker node
	WorkerLabel = "node-role.kubernetes.io/worker"
	// PubKeyHashAnnotation corresponds to the public key present on the VM
	PubKeyHashAnnotation = "windowsmachineconfig.openshift.io/pub-key-hash"
	// KubeletClientCAFilename is the name of the CA certificate file required by kubelet to interact
	// with the kube-apiserver client
	KubeletClientCAFilename = "kubelet-ca.crt"
)

Variables

This section is empty.

Functions

func CreatePubKeyHashAnnotation

func CreatePubKeyHashAnnotation(key ssh.PublicKey) string

CreatePubKeyHashAnnotation returns a formatted string which can be used for a public key annotation on a node. The annotation is the sha256 of the public key

func NewNodeConfig

func NewNodeConfig(c client.Client, clientset *kubernetes.Clientset, clusterServiceCIDR, wmcoNamespace string,
	instanceInfo *instance.Info, signer ssh.Signer, additionalLabels,
	additionalAnnotations map[string]string, platformType configv1.PlatformType) (*nodeConfig, error)

NewNodeConfig creates a new instance of nodeConfig to be used by the caller. hostName having a value will result in the VM's hostname being changed to the given value.

Types

type ErrWriter

type ErrWriter struct {
	// contains filtered or unexported fields
}

ErrWriter is a wrapper to enable error-level logging inside kubectl drainer implementation

func (ErrWriter) Write

func (ew ErrWriter) Write(p []byte) (n int, err error)

type OutWriter

type OutWriter struct {
	// contains filtered or unexported fields
}

OutWriter is a wrapper to enable info-level logging inside kubectl drainer implementation

func (OutWriter) Write

func (ow OutWriter) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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