/
envvar.go
29 lines (23 loc) · 1.2 KB
/
envvar.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package duty
import (
gocontext "context"
"github.com/flanksource/duty/context"
"github.com/flanksource/duty/types"
"k8s.io/client-go/kubernetes"
)
// deprecated use the methods in the context package
func GetEnvValueFromCache(c kubernetes.Interface, input types.EnvVar, namespace string) (string, error) {
return context.GetEnvValueFromCache(context.NewContext(gocontext.TODO()).WithKubernetes(c), input, namespace)
}
// deprecated use the methods in the context package
func GetEnvStringFromCache(c kubernetes.Interface, env string, namespace string) (string, error) {
return context.GetEnvStringFromCache(context.NewContext(gocontext.TODO()).WithKubernetes(c), env, namespace)
}
// deprecated use the methods in the context package
func GetSecretFromCache(c kubernetes.Interface, namespace, name, key string) (string, error) {
return context.GetSecretFromCache(context.NewContext(gocontext.TODO()).WithKubernetes(c), namespace, name, key)
}
// deprecated use the methods in the context package
func GetConfigMapFromCache(c kubernetes.Interface, namespace, name, key string) (string, error) {
return context.GetConfigMapFromCache(context.NewContext(gocontext.TODO()).WithKubernetes(c), namespace, name, key)
}