Documentation
¶
Overview ¶
Package utils provides CLI utility functions and structs
Index ¶
- func ConvertMapOfBytesToMapOfStrings(contentMap map[string][]byte) map[string]string
- func CreateDirectory(dirPath string, mode fs.FileMode)
- func EnsureGatewayIngress(env *controllers.SFKubeContext, fqdn string)
- func EnsureSelfSignCert(env *controllers.SFKubeContext)
- func GetCLICRContext(command *cobra.Command, args []string) (*controllers.SFKubeContext, sfv1.SoftwareFactory)
- func GetCLIContext(command *cobra.Command) *controllers.SFKubeContext
- func GetCRUDSubcommands() (*cobra.Command, *cobra.Command, *cobra.Command)
- func GetFileContent(filePath string) ([]byte, error)
- func GetKubeConfig() *clientcmdapi.Config
- func GetKubeConfigContextByName(contextName string) (*clientcmdapi.Context, string)
- func MkHTTPSIngress(ns string, name string, host string, service string, port int32, ...) networkv1.Ingress
- func MkHTTPSRoute(name string, ns string, host string, serviceName string, path string, port int, ...) apiroutev1.Route
- func Ptr[T any](v T) *T
- func ReadIngressIP(env *controllers.SFKubeContext, name string) string
- func RunCmdOrDie(cmd string, args ...string) string
- func RunCmdWithEnvOrDie(environ []string, cmd string, args ...string) string
- func SetLogger(command *cobra.Command)
- func VarListToMap(varsList []string) map[string]string
- func WriteContentToFile(filePath string, content []byte, mode fs.FileMode)
- func WriteIngressToEtcHosts(env *controllers.SFKubeContext, fqdn string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertMapOfBytesToMapOfStrings ¶ added in v0.0.26
func CreateDirectory ¶ added in v0.0.26
func EnsureGatewayIngress ¶ added in v0.0.56
func EnsureGatewayIngress(env *controllers.SFKubeContext, fqdn string)
func EnsureSelfSignCert ¶ added in v0.0.56
func EnsureSelfSignCert(env *controllers.SFKubeContext)
func GetCLICRContext ¶ added in v0.0.65
func GetCLICRContext(command *cobra.Command, args []string) (*controllers.SFKubeContext, sfv1.SoftwareFactory)
GetCLICRContext setup the SFKubeContext and read the CR from the args.
func GetCLIContext ¶
func GetCLIContext(command *cobra.Command) *controllers.SFKubeContext
func GetCRUDSubcommands ¶
func GetFileContent ¶
func GetKubeConfig ¶ added in v0.0.51
func GetKubeConfig() *clientcmdapi.Config
func GetKubeConfigContextByName ¶ added in v0.0.51
func GetKubeConfigContextByName(contextName string) (*clientcmdapi.Context, string)
func MkHTTPSIngress ¶ added in v0.0.56
func MkHTTPSRoute ¶ added in v0.0.54
func MkHTTPSRoute( name string, ns string, host string, serviceName string, path string, port int, extraLabels map[string]string) apiroutev1.Route
MkHTTPSRoute produces a Route on top of a Service
func ReadIngressIP ¶ added in v0.0.56
func ReadIngressIP(env *controllers.SFKubeContext, name string) string
func RunCmdOrDie ¶ added in v0.0.23
func RunCmdWithEnvOrDie ¶ added in v0.0.23
func SetLogger ¶ added in v0.0.32
SetLogger enables the DEBUG LogLevel in the Logger when the debug flag is set
func VarListToMap ¶ added in v0.0.24
func WriteContentToFile ¶ added in v0.0.26
func WriteIngressToEtcHosts ¶ added in v0.0.56
func WriteIngressToEtcHosts(env *controllers.SFKubeContext, fqdn string)
Types ¶
This section is empty.