Documentation ¶
Index ¶
- Constants
- 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, annotations map[string]string, ...) *rbacv1.ClusterRole
- func CreateBasic(serverURL, userName, clusterName string, caCert []byte) *clientcmdapi.Config
- func CreateDeployAndWait(kubeClientSet kubernetes.Interface, deployment *appsv1.Deployment, ...) 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 ParseIP(s string) (net.IP, int, 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 ¶
View Source
const ( // MaxRespBodyLength is the max length of http response body MaxRespBodyLength = 1 << 20 // 1 MiB )
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, annotations map[string]string, 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 CreateDeployAndWait ¶ added in v1.10.0
func CreateDeployAndWait(kubeClientSet kubernetes.Interface, deployment *appsv1.Deployment, waitComponentReadyTimeout int) error
CreateDeployAndWait Create deployment and then waiting for ready
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 ParseIP ¶ added in v1.1.5
ParseIP parses an IP address and returns whether it is a v4 or v6 IP address
func StaticYamlToJSONByte ¶
StaticYamlToJSONByte Static yaml file conversion JSON Byte
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.