cluster

package
v0.3.2-rc15 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KubeAPIAdmissionConfigOption is the option name in kube-apiserver for the admission control configuration file
	KubeAPIAdmissionConfigOption = "admission-control-config-file"
	// SecretName is the naming pattern of the secret which contains the admission control configuration file
	SecretName = "%s-admission-configuration-psact"
	// MountPath is where the admission control configuration file will be mounted in the control plane nodes
	MountPath = "/etc/rancher/%s/config/rancher-psact.yaml"
)

Variables

This section is empty.

Functions

func GetKubeAPIServerArg added in v0.3.2

func GetKubeAPIServerArg(cluster *v1.Cluster) map[string]string

GetKubeAPIServerArg returns a map representation of the value of kube-apiserver-arg from the cluster's MachineGlobalConfig. An empty map is returned if kube-apiserver-arg is not set in the cluster.

func GetRuntime added in v0.3.2

func GetRuntime(kubernetesVersion string) string

GetRuntime returns the runtime of a cluster by checking its k8s version.

func MachineSelectorFileExists added in v0.3.2

func MachineSelectorFileExists(file rkev1.RKEProvisioningFiles, cluster *v1.Cluster) bool

MachineSelectorFileExists returns a boolean to indicate if the provided RKEProvisioningFiles exist in the provided cluster.

func MachineSelectorFileForPSA added in v0.3.2

func MachineSelectorFileForPSA(secretName, mountPath string) rkev1.RKEProvisioningFiles

MachineSelectorFileForPSA generates an RKEProvisioningFiles that mounts the secret which contains the generated admission configuration file to the control plane node

Types

type ManagementClusterMutator added in v0.3.2

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

ManagementClusterMutator implements admission.MutatingAdmissionWebhook.

func NewManagementClusterMutator added in v0.3.2

func (*ManagementClusterMutator) Admit added in v0.3.2

Admit is the entrypoint for the mutator. Admit will return an error if it is unable to process the request.

func (*ManagementClusterMutator) GVR added in v0.3.2

GVR returns the GroupVersionKind for this CRD.

func (*ManagementClusterMutator) MutatingWebhook added in v0.3.2

MutatingWebhook returns the MutatingWebhook used for this CRD.

func (*ManagementClusterMutator) Operations added in v0.3.2

Operations returns list of operations handled by this mutator.

type ProvisioningClusterMutator added in v0.3.2

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

ProvisioningClusterMutator implements admission.MutatingAdmissionWebhook.

func NewProvisioningClusterMutator added in v0.3.2

NewProvisioningClusterMutator returns a new mutator for provisioning clusters

func (*ProvisioningClusterMutator) Admit added in v0.3.2

Admit is the entrypoint for the mutator. Admit will return an error if it unable to process the request.

func (*ProvisioningClusterMutator) GVR added in v0.3.2

GVR returns the GroupVersionKind for this CRD.

func (*ProvisioningClusterMutator) MutatingWebhook added in v0.3.2

MutatingWebhook returns the MutatingWebhook used for this CRD.

func (*ProvisioningClusterMutator) Operations added in v0.3.2

Operations returns list of operations handled by this mutator.

Jump to

Keyboard shortcuts

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