Documentation
¶
Index ¶
- func DNS1035(str string) string
- func GetConfigMapFromVolume(selector *corev1.ConfigMapKeySelector) (string, error)
- func GetConfigMapVolumePath(selector *corev1.ConfigMapKeySelector) (string, error)
- func GetSecretFromVolume(selector *corev1.SecretKeySelector) (string, error)
- func GetSecretVolumePath(selector *corev1.SecretKeySelector) (string, error)
- func Hashcode(str string) int
- func K8sRestConfig() (*rest.Config, error)
- func LookupEnvBoolOr(key string, defaultValue bool) bool
- func LookupEnvIntOr(key string, defaultValue int) int
- func LookupEnvStringOr(key, defaultValue string) string
- func MustHash(v any) string
- func MustJSON(in any) string
- func MustUnJSON(v any, in any)
- func RandomLowerCaseString(length int) string
- func RandomString(length int) string
- func VolumesFromSecretsAndConfigMaps(obj interface{}) ([]corev1.Volume, []corev1.VolumeMount)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigMapFromVolume ¶
func GetConfigMapFromVolume(selector *corev1.ConfigMapKeySelector) (string, error)
GetConfigMapFromVolume retrieves the value of mounted config map volume "/var/kyno/config/${configMapRef.name}/${configMapRef.key}" is expected to be the file path
func GetConfigMapVolumePath ¶
func GetConfigMapVolumePath(selector *corev1.ConfigMapKeySelector) (string, error)
GetConfigMapVolumePath returns the path of the mounted configmap
func GetSecretFromVolume ¶
func GetSecretFromVolume(selector *corev1.SecretKeySelector) (string, error)
GetSecretFromVolume retrieves the value of mounted secret volume "/var/kyno/secrets/${secretRef.name}/${secretRef.key}" is expected to be the file path
func GetSecretVolumePath ¶
func GetSecretVolumePath(selector *corev1.SecretKeySelector) (string, error)
GetSecretVolumePath returns the path of the mounted secret
func K8sRestConfig ¶
K8sRestConfig returns a rest config for the kubernetes cluster.
func LookupEnvBoolOr ¶
func LookupEnvIntOr ¶
func LookupEnvStringOr ¶
func MustUnJSON ¶
MustUnJSON unmarshalls JSON or panics. v - must be []byte or string in - must be a pointer.
func RandomLowerCaseString ¶
func RandomString ¶
RandomString generate a random string with given length
func VolumesFromSecretsAndConfigMaps ¶
func VolumesFromSecretsAndConfigMaps(obj interface{}) ([]corev1.Volume, []corev1.VolumeMount)
VolumesFromSecretsAndConfigMaps builds volumes and volumeMounts spec based on the obj and its children's secretKeySelector and configMapKeySelector
Types ¶
This section is empty.