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

@@ -0,0 +1,33 @@
apiVersion: v1
data:
altGreeting: Good Morning from default namespace!
enableRisky: "false"
kind: ConfigMap
metadata:
name: the-map-4959m5tm6c
---
apiVersion: v1
data:
altGreeting: Good Morning from non-default namespace!
enableRisky: "false"
kind: ConfigMap
metadata:
name: the-non-default-namespace-map-b6h49k7mt8
namespace: non-default
---
apiVersion: v1
data:
password.txt: dmVyeSRlY3JldA==
kind: Secret
metadata:
name: the-secret-cfbmct72tb
type: Opaque
---
apiVersion: v1
data:
password.txt: dmVyeSRlY3JldA==
kind: Secret
metadata:
name: the-non-default-namespace-secret-255294gd9d
namespace: non-default
type: Opaque

View File

@@ -0,0 +1,19 @@
configMapGenerator:
- name: the-non-default-namespace-map
namespace: non-default
literals:
- altGreeting=Good Morning from non-default namespace!
- enableRisky="false"
- name: the-map
literals:
- altGreeting=Good Morning from default namespace!
- enableRisky="false"
secretGenerator:
- name: the-non-default-namespace-secret
namespace: non-default
commands:
password.txt: "cat password.txt"
- name: the-secret
commands:
password.txt: "cat password.txt"

View File

@@ -0,0 +1 @@
very$ecret

View File

@@ -0,0 +1,4 @@
description: generators-namespace
args: []
filename: testdata/testcase-generators-namespace/in
expectedStdout: testdata/testcase-generators-namespace/expected.yaml