Documentation
¶
Overview ¶
Package utils provides utility functions for the CLI
Index ¶
- func CreateKubernetesClient(contextName string) (client.Client, error)
- func CreateKubernetesClientOrDie(contextName string) client.Client
- func CreateR(env *ENV, obj client.Object)
- func CreateTempPlaybookFile(content string) (*os.File, error)
- func EnsureNamespace(env *ENV, name string)
- func EnsureServiceAccount(env *ENV, name string)
- func GetConfigContextOrDie(contextName string) *rest.Config
- func GetFileContent(filePath string) ([]byte, error)
- func GetKubernetesClientSet() (*rest.Config, *kubernetes.Clientset)
- func GetM(env *ENV, name string, obj client.Object) bool
- func GetSF(env *ENV, name string) (sfv1.SoftwareFactory, error)
- func GetSecret(env *ENV, name string) []byte
- func IsCRDMissing(err error) bool
- func IsCertManagerRunning(env *ENV) bool
- func ParseString(text string, data any) (string, error)
- func RemoveTempPlaybookFile(file *os.File)
- func RenderYAML(o interface{}) string
- func RunCmd(cmdName string, args ...string)
- func RunCmdNoPanic(cmdName string, args ...string) error
- func RunMake(arg string)
- func UpdateR(env *ENV, obj client.Object) bool
- type ENV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKubernetesClient ¶
func EnsureNamespace ¶
func EnsureServiceAccount ¶
func GetConfigContextOrDie ¶
func GetFileContent ¶
func GetKubernetesClientSet ¶
func GetKubernetesClientSet() (*rest.Config, *kubernetes.Clientset)
func GetM ¶
GetM is an helper to fetch a kubernetes resource by name, returns true when it is found.
func IsCRDMissing ¶
func IsCertManagerRunning ¶
func ParseString ¶
ParseString allows to easilly use templated string.
Pass the template text. And the data structure to be applied to the template
func RemoveTempPlaybookFile ¶
func RenderYAML ¶
func RenderYAML(o interface{}) string
func RunCmdNoPanic ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.