package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Functions
ComponentPod returns a Pod object from the container, volume and annotations specifications.
ComponentResources returns the v1.ResourceRequirements object needed for allocating a specified amount of the CPU.
DeepHashObject writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.
GetAPIServerProbeAddress returns the probe address for the API server.
GetControllerManagerProbeAddress returns the kubernetes controller manager probe address.
GetEtcdProbeEndpoint takes a kubeadm Etcd configuration object and attempts to parse the first URL in the listen-metrics-urls argument, returning an etcd probe hostname, port and scheme.
GetSchedulerProbeAddress returns the kubernetes scheduler probe address.
GetUsersAndGroups returns the local usersAndGroups, but first creates it in a thread safe way once.
LivenessProbe creates a Probe object with a HTTPGet handler.
ManifestFilesAreEqual compares 2 files.
NewVolume creates a v1.Volume with a hostPath mount to the specified location.
NewVolumeMount creates a v1.VolumeMount to the specified location.
PatchStaticPod applies patches stored in patchesDir to a static Pod.
ReadinessProbe creates a Probe object with a HTTPGet handler.
ReadMultipleStaticPodsFromDisk reads multiple known component static Pods from manifestDir and returns a list of Pods objects.
ReadStaticPodFromDisk reads a static pod file from disk.
RunComponentAsNonRoot updates the pod manifest and the hostVolume permissions to run as non root.
StartupProbe creates a Probe object with a HTTPGet handler.
VolumeMapToSlice returns a slice of volumes from a map's values.
VolumeMountMapToSlice returns a slice of volumes from a map's values.
WriteStaticPodToDisk writes a static pod file to disk.