Documentation ¶
Overview ¶
Package bootstrap contains functions for bootstrapping Kubernetes nodes.
Index ¶
Constants ¶
View Source
const ( // DefaultClusterName defines the default cluster name DefaultClusterName = "crit" // TokenUser defines token user TokenUser = "tls-bootstrap-token-user" )
Variables ¶
View Source
var NodeBootstrapTokenRBAC = []*rbacv1.ClusterRoleBinding{ { ObjectMeta: metav1.ObjectMeta{ Name: "crit:kubelet-bootstrap", }, RoleRef: rbacv1.RoleRef{ APIGroup: rbacv1.GroupName, Kind: "ClusterRole", Name: "system:node-bootstrapper", }, Subjects: []rbacv1.Subject{ { Kind: rbacv1.GroupKind, Name: "system:bootstrappers:crit:default-node-token", }, }, }, { ObjectMeta: metav1.ObjectMeta{ Name: "crit:node-autoapprove-bootstrap", }, RoleRef: rbacv1.RoleRef{ APIGroup: rbacv1.GroupName, Kind: "ClusterRole", Name: "system:certificates.k8s.io:certificatesigningrequests:nodeclient", }, Subjects: []rbacv1.Subject{ { Kind: "Group", Name: "system:bootstrappers:crit:default-node-token", }, }, }, { ObjectMeta: metav1.ObjectMeta{ Name: "crit:node-autoapprove-certificate-rotation", }, RoleRef: rbacv1.RoleRef{ APIGroup: rbacv1.GroupName, Kind: "ClusterRole", Name: "system:certificates.k8s.io:certificatesigningrequests:selfnodeclient", }, Subjects: []rbacv1.Subject{ { Kind: "Group", Name: "system:nodes", }, }, }, }
Functions ¶
func ApplyCSRApproverRBAC ¶
func GetBootstrapKubeletKubeconfig ¶
func GetBootstrapKubeletKubeconfig(cfg *config.WorkerConfiguration) (*clientcmdapi.Config, error)
Types ¶
type AuthorizationType ¶
type AuthorizationType int
const ( UnknownAuthorizationType AuthorizationType = iota AmazonIdentityDocumentAndSignature )
func (AuthorizationType) MarshalText ¶
func (at AuthorizationType) MarshalText() ([]byte, error)
func (AuthorizationType) String ¶
func (at AuthorizationType) String() string
func (*AuthorizationType) UnmarshalText ¶
func (at *AuthorizationType) UnmarshalText(data []byte) error
type Request ¶
type Request struct { Type AuthorizationType `json:"type"` Body json.RawMessage `json:"body"` }
Click to show internal directories.
Click to hide internal directories.