Documentation ¶
Index ¶
- func BytesToFile(path, name string, data []byte) error
- func ClusterRoleBindingFromSubjects(clusterRoleBindingName, clusterRoleName string, sub []rbacv1.Subject, ...) *rbacv1.ClusterRoleBinding
- func ClusterRoleFromRules(name string, rules []rbacv1.PolicyRule, labels map[string]string) *rbacv1.ClusterRole
- func CreateBasic(serverURL, userName, clusterName string, caCert []byte) *clientcmdapi.Config
- func CreateIfNotExistClusterRole(clientSet *kubernetes.Clientset, role *rbacv1.ClusterRole) error
- func CreateIfNotExistClusterRoleBinding(clientSet *kubernetes.Clientset, binding *rbacv1.ClusterRoleBinding) error
- func CreateOrUpdateConfigMap(clientSet *kubernetes.Clientset, cm *corev1.ConfigMap) error
- func CreateOrUpdateRole(clientSet *kubernetes.Clientset, role *rbacv1.Role) error
- func CreateOrUpdateRoleBinding(clientSet *kubernetes.Clientset, roleBinding *rbacv1.RoleBinding) error
- func CreateWithCerts(serverURL, userName, clusterName string, caCert []byte, clientKey []byte, ...) *clientcmdapi.Config
- func DeCompress(file, targetPath string) error
- func DownloadFile(url, filePath string) error
- func FileToBytes(path, name string) ([]byte, error)
- func FlagsDNS(dns string) []string
- func FlagsIP(ip string) []net.IP
- func GenExamples(path, parentCommand, printRegisterCommand string)
- func InternetIP() (net.IP, error)
- func IsExist(path string) bool
- func ListFiles(path string) []string
- func MapToString(labels map[string]string) string
- func NewAPIRegistrationClient(c *rest.Config) (*aggregator.Clientset, error)
- func NewCRDsClient(c *rest.Config) (*clientset.Clientset, error)
- func NewClientSet(c *rest.Config) (*kubernetes.Clientset, error)
- func RestConfig(context, kubeconfigPath string) (*rest.Config, error)
- func StaticYamlToJSONByte(staticYaml string) []byte
- func StringToMap(labels string) map[string]string
- func StringToNetIP(addr string) net.IP
- func WriteKubeConfigFromSpec(serverURL, userName, clusterName, kubeconfigPath, kubeconfigName string, ...) error
- type Downloader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToFile ¶
BytesToFile Bytes Conversion File
func ClusterRoleBindingFromSubjects ¶ added in v1.2.0
func ClusterRoleBindingFromSubjects(clusterRoleBindingName, clusterRoleName string, sub []rbacv1.Subject, labels map[string]string) *rbacv1.ClusterRoleBinding
ClusterRoleBindingFromSubjects ClusterRoleBinding Subjects
func ClusterRoleFromRules ¶ added in v1.2.0
func ClusterRoleFromRules(name string, rules []rbacv1.PolicyRule, labels map[string]string) *rbacv1.ClusterRole
ClusterRoleFromRules ClusterRole Rules
func CreateBasic ¶
func CreateBasic(serverURL, userName, clusterName string, caCert []byte) *clientcmdapi.Config
CreateBasic creates a basic, general KubeConfig object that then can be extended
func CreateIfNotExistClusterRole ¶ added in v1.2.0
func CreateIfNotExistClusterRole(clientSet *kubernetes.Clientset, role *rbacv1.ClusterRole) error
CreateIfNotExistClusterRole create ClusterRole when it doesn't exist
func CreateIfNotExistClusterRoleBinding ¶ added in v1.2.0
func CreateIfNotExistClusterRoleBinding(clientSet *kubernetes.Clientset, binding *rbacv1.ClusterRoleBinding) error
CreateIfNotExistClusterRoleBinding create ClusterRoleBinding when it doesn't exist
func CreateOrUpdateConfigMap ¶ added in v1.3.0
func CreateOrUpdateConfigMap(clientSet *kubernetes.Clientset, cm *corev1.ConfigMap) error
CreateOrUpdateConfigMap creates a ConfigMap if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func CreateOrUpdateRole ¶ added in v1.3.0
func CreateOrUpdateRole(clientSet *kubernetes.Clientset, role *rbacv1.Role) error
CreateOrUpdateRole creates a Role if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func CreateOrUpdateRoleBinding ¶ added in v1.3.0
func CreateOrUpdateRoleBinding(clientSet *kubernetes.Clientset, roleBinding *rbacv1.RoleBinding) error
CreateOrUpdateRoleBinding creates a RoleBinding if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func CreateWithCerts ¶
func CreateWithCerts(serverURL, userName, clusterName string, caCert []byte, clientKey []byte, clientCert []byte) *clientcmdapi.Config
CreateWithCerts creates a KubeConfig object with access to the API server with client certificates
func DownloadFile ¶
DownloadFile Download files via URL
func FileToBytes ¶
FileToBytes File Conversion Bytes
func GenExamples ¶
func GenExamples(path, parentCommand, printRegisterCommand string)
GenExamples Generate sample files
func NewAPIRegistrationClient ¶
func NewAPIRegistrationClient(c *rest.Config) (*aggregator.Clientset, error)
NewAPIRegistrationClient apiregistration ClientSet
func NewCRDsClient ¶
NewCRDsClient clientset ClientSet
func NewClientSet ¶
func NewClientSet(c *rest.Config) (*kubernetes.Clientset, error)
NewClientSet Kubernetes ClientSet
func RestConfig ¶
RestConfig Kubernetes kubeconfig
func StaticYamlToJSONByte ¶
StaticYamlToJSONByte Static yaml file conversion JSON Byte