Documentation ¶
Overview ¶
Package components contains functions for configuring and creating Kubernetes components.
Index ¶
- Constants
- Variables
- func ApplyKubeProxyRBAC(client *clientset.Clientset, ctx context.Context) error
- func NewAPIServerStaticPod(cfg *config.ControlPlaneConfiguration) (*corev1.Pod, error)
- func NewBootstrapServerStaticPod(cfg *config.ControlPlaneConfiguration) *corev1.Pod
- func NewControllerManagerStaticPod(cfg *config.ControlPlaneConfiguration) *corev1.Pod
- func NewKubeProxyConfigMap(cfg *config.ControlPlaneConfiguration) (*corev1.ConfigMap, error)
- func NewSchedulerStaticPod(cfg *config.ControlPlaneConfiguration) *corev1.Pod
- func WriteKubeletConfigFile(kc *kubeletconfigv1beta1.KubeletConfiguration, path string) error
- func WriteKubeletDynamicEnvFile(cfg *config.NodeConfiguration, registerTaintsUsingFlags bool, ...) error
Constants ¶
View Source
const ( KubeletEnvFileName = "crit-flags.env" // KubeletEnvFileVariableName specifies the environment variable name crit // should write a value to dynamic environment file KubeletEnvFileVariableName = "KUBELET_CRIT_ARGS" )
Variables ¶
View Source
var ( AdmissionPlugins = []string{ "NodeRestriction", "PodPreset", } FeatureGates = map[string]bool{ "TTLAfterFinished": true, } )
View Source
var ( KubeProxyName = "kube-proxy" KubeProxyServiceAccount = &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ Name: KubeProxyName, Namespace: metav1.NamespaceSystem, }, } KubeProxyClusterRoleBinding = &rbacv1.ClusterRoleBinding{ ObjectMeta: metav1.ObjectMeta{ Name: "crit:node-proxier", }, RoleRef: rbacv1.RoleRef{ APIGroup: rbacv1.GroupName, Kind: "ClusterRole", Name: "system:node-proxier", }, Subjects: []rbacv1.Subject{ { Kind: rbacv1.ServiceAccountKind, Name: KubeProxyName, Namespace: metav1.NamespaceSystem, }, }, } KubeProxyRole = &rbacv1.Role{ ObjectMeta: metav1.ObjectMeta{ Name: KubeProxyName, Namespace: metav1.NamespaceSystem, }, Rules: []rbacv1.PolicyRule{ { Verbs: []string{"get"}, APIGroups: []string{""}, Resources: []string{"configmaps"}, ResourceNames: []string{KubeProxyName}, }, }, } KubeProxyRoleBinding = &rbacv1.RoleBinding{ ObjectMeta: metav1.ObjectMeta{ Name: KubeProxyName, Namespace: metav1.NamespaceSystem, }, RoleRef: rbacv1.RoleRef{ APIGroup: rbacv1.GroupName, Kind: "Role", Name: "kube-proxy", }, Subjects: []rbacv1.Subject{ { Kind: rbacv1.GroupKind, Name: "system:bootstrappers:crit:default-node-token", }, }, } )
Functions ¶
func ApplyKubeProxyRBAC ¶
func NewAPIServerStaticPod ¶
func NewAPIServerStaticPod(cfg *config.ControlPlaneConfiguration) (*corev1.Pod, error)
func NewBootstrapServerStaticPod ¶
func NewBootstrapServerStaticPod(cfg *config.ControlPlaneConfiguration) *corev1.Pod
func NewControllerManagerStaticPod ¶
func NewControllerManagerStaticPod(cfg *config.ControlPlaneConfiguration) *corev1.Pod
func NewKubeProxyConfigMap ¶
func NewKubeProxyConfigMap(cfg *config.ControlPlaneConfiguration) (*corev1.ConfigMap, error)
func NewSchedulerStaticPod ¶
func NewSchedulerStaticPod(cfg *config.ControlPlaneConfiguration) *corev1.Pod
func WriteKubeletConfigFile ¶
func WriteKubeletConfigFile(kc *kubeletconfigv1beta1.KubeletConfiguration, path string) error
func WriteKubeletDynamicEnvFile ¶
func WriteKubeletDynamicEnvFile(cfg *config.NodeConfiguration, registerTaintsUsingFlags bool, kubeletDir string) error
WriteKubeletDynamicEnvFile writes an environment file with dynamic flags to the kubelet. This is identical to how kubeadm creates a dynamic environment file, but with names changed. This will most likely be changed in the future to fit better with crit usage.
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.