Add namespace for config map and secret generators

This commit is contained in:
luktom
2018-12-05 11:18:57 +01:00
parent 8a8331bf57
commit 6ad5d9f55b
8 changed files with 72 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ func (f *ConfigMapFactory) makeFreshConfigMap(
cm.APIVersion = "v1"
cm.Kind = "ConfigMap"
cm.Name = args.Name
cm.Namespace = args.Namespace
cm.Data = map[string]string{}
return cm
}

View File

@@ -52,6 +52,7 @@ func (f *SecretFactory) makeFreshSecret(args *types.SecretArgs) *corev1.Secret {
s.APIVersion = "v1"
s.Kind = "Secret"
s.Name = args.Name
s.Namespace = args.Namespace
s.Type = corev1.SecretType(args.Type)
if s.Type == "" {
s.Type = corev1.SecretTypeOpaque