Documentation ¶
Index ¶
- Constants
- Variables
- func GetConfig() *rest.Config
- func GetHostAddress() (string, error)
- func GetKubeClient() *kubernetes.Clientset
- func GetKubeClusterDomain() (string, error)
- func IsTruthy(val string) bool
- func IsYaml(fileName string) bool
- func ParseEnvString(envStr string) []corev1.EnvVar
- func ParseVolumeMountsString(volumeMountStr string, readOnly bool) []corev1.VolumeMount
- func SetEnvVariables(variables map[string]string) error
- func StringSliceContains(needle string, haystack []string) bool
- func ToISO8601DateTimeString(dateTime time.Time) string
Constants ¶
const (
// DefaultKubeClusterDomain is the default value of KubeClusterDomain.
DefaultKubeClusterDomain = "cluster.local"
)
const (
// HostIPEnvVar is the environment variable to override host's chosen IP address.
HostIPEnvVar = "DAPR_HOST_IP"
)
Variables ¶
var (
KubeConfigVar = "KUBE_CONFIG"
)
Functions ¶
func GetHostAddress ¶ added in v0.8.0
GetHostAddress selects a valid outbound IP address for the host.
func GetKubeClient ¶
func GetKubeClient() *kubernetes.Clientset
GetKubeClient gets a kubernetes client.
func GetKubeClusterDomain ¶ added in v1.3.0
GetKubeClusterDomain search KubeClusterDomain value from /etc/resolv.conf file.
func IsTruthy ¶ added in v1.8.0
IsTruthy returns true if a string is a truthy value. Truthy values are "y", "yes", "true", "t", "on", "1" (case-insensitive); everything else is false.
func ParseEnvString ¶ added in v1.1.0
add env-vars from annotations.
func ParseVolumeMountsString ¶ added in v1.8.0
func ParseVolumeMountsString(volumeMountStr string, readOnly bool) []corev1.VolumeMount
ParseVolumeMountsString parses the annotation and returns volume mounts. The format of the annotation is: "mountPath1:hostPath1,mountPath2:hostPath2" The readOnly parameter applies to all mounts.
func SetEnvVariables ¶ added in v1.8.0
SetEnvVariables set variables to environment.
func StringSliceContains ¶ added in v1.1.0
StringSliceContains return true if an array containe the "str" string.
func ToISO8601DateTimeString ¶ added in v0.5.0
ToISO8601DateTimeString converts dateTime to ISO8601 Format ISO8601 Format: 2020-01-01T01:01:01.10101Z.
Types ¶
This section is empty.