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 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 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 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 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