Isolated content of pkg/kustomize

This commit is contained in:
Jeffrey Regan
2018-05-11 14:01:10 -07:00
parent 7f06454de8
commit 8aad8f447b
127 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,128 @@
diff -u -N /tmp/noop/apps_v1beta2_Deployment_nginx.yaml /tmp/transformed/apps_v1beta2_Deployment_nginx.yaml
--- /tmp/noop/apps_v1beta2_Deployment_nginx.yaml YYYY-MM-DD HH:MM:SS
+++ /tmp/transformed/apps_v1beta2_Deployment_nginx.yaml YYYY-MM-DD HH:MM:SS
@@ -5,23 +5,26 @@
note: This is a test annotation
labels:
app: mynginx
+ env: staging
org: example.com
- team: foo
- name: team-foo-nginx
+ team: override-foo
+ name: staging-team-foo-nginx
spec:
selector:
matchLabels:
app: mynginx
+ env: staging
org: example.com
- team: foo
+ team: override-foo
template:
metadata:
annotations:
note: This is a test annotation
labels:
app: mynginx
+ env: staging
org: example.com
- team: foo
+ team: override-foo
spec:
containers:
- image: nginx
@@ -30,8 +33,12 @@
- mountPath: /tmp/ps
name: nginx-persistent-storage
volumes:
- - emptyDir: {}
+ - gcePersistentDisk:
+ pdName: nginx-persistent-storage
name: nginx-persistent-storage
- configMap:
- name: team-foo-configmap-in-base-bbdmdh7m8t
+ name: staging-configmap-in-overlay-k7cbc75tg8
+ name: configmap-in-overlay
+ - configMap:
+ name: staging-team-foo-configmap-in-base-gh9d7t85gb
name: configmap-in-base
diff -u -N /tmp/noop/v1_ConfigMap_configmap-in-base.yaml /tmp/transformed/v1_ConfigMap_configmap-in-base.yaml
--- /tmp/noop/v1_ConfigMap_configmap-in-base.yaml YYYY-MM-DD HH:MM:SS
+++ /tmp/transformed/v1_ConfigMap_configmap-in-base.yaml YYYY-MM-DD HH:MM:SS
@@ -1,6 +1,6 @@
apiVersion: v1
data:
- foo: bar
+ foo: override-bar
kind: ConfigMap
metadata:
annotations:
@@ -8,6 +8,7 @@
creationTimestamp: null
labels:
app: mynginx
+ env: staging
org: example.com
- team: foo
- name: team-foo-configmap-in-base-bbdmdh7m8t
+ team: override-foo
+ name: staging-team-foo-configmap-in-base-gh9d7t85gb
diff -u -N /tmp/noop/v1_ConfigMap_configmap-in-overlay.yaml /tmp/transformed/v1_ConfigMap_configmap-in-overlay.yaml
--- /tmp/noop/v1_ConfigMap_configmap-in-overlay.yaml YYYY-MM-DD HH:MM:SS
+++ /tmp/transformed/v1_ConfigMap_configmap-in-overlay.yaml YYYY-MM-DD HH:MM:SS
@@ -0,0 +1,10 @@
+apiVersion: v1
+data:
+ hello: world
+kind: ConfigMap
+metadata:
+ creationTimestamp: null
+ labels:
+ env: staging
+ team: override-foo
+ name: staging-configmap-in-overlay-k7cbc75tg8
diff -u -N /tmp/noop/v1_Secret_secret-in-base.yaml /tmp/transformed/v1_Secret_secret-in-base.yaml
--- /tmp/noop/v1_Secret_secret-in-base.yaml YYYY-MM-DD HH:MM:SS
+++ /tmp/transformed/v1_Secret_secret-in-base.yaml YYYY-MM-DD HH:MM:SS
@@ -1,6 +1,7 @@
apiVersion: v1
data:
password: c29tZXB3
+ proxy: aGFwcm94eQ==
username: YWRtaW4=
kind: Secret
metadata:
@@ -9,7 +10,8 @@
creationTimestamp: null
labels:
app: mynginx
+ env: staging
org: example.com
- team: foo
- name: team-foo-secret-in-base-tkm7hhtf8d
+ team: override-foo
+ name: staging-team-foo-secret-in-base-c8db7gk2m2
type: Opaque
diff -u -N /tmp/noop/v1_Service_nginx.yaml /tmp/transformed/v1_Service_nginx.yaml
--- /tmp/noop/v1_Service_nginx.yaml YYYY-MM-DD HH:MM:SS
+++ /tmp/transformed/v1_Service_nginx.yaml YYYY-MM-DD HH:MM:SS
@@ -5,13 +5,15 @@
note: This is a test annotation
labels:
app: mynginx
+ env: staging
org: example.com
- team: foo
- name: team-foo-nginx
+ team: override-foo
+ name: staging-team-foo-nginx
spec:
ports:
- port: 80
selector:
app: mynginx
+ env: staging
org: example.com
- team: foo
+ team: override-foo

View File

@@ -0,0 +1,108 @@
apiVersion: v1
data:
foo: override-bar
kind: ConfigMap
metadata:
annotations:
note: This is a test annotation
creationTimestamp: null
labels:
app: mynginx
env: staging
org: example.com
team: override-foo
name: staging-team-foo-configmap-in-base-gh9d7t85gb
---
apiVersion: v1
data:
hello: world
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
env: staging
team: override-foo
name: staging-configmap-in-overlay-k7cbc75tg8
---
apiVersion: v1
data:
password: c29tZXB3
proxy: aGFwcm94eQ==
username: YWRtaW4=
kind: Secret
metadata:
annotations:
note: This is a test annotation
creationTimestamp: null
labels:
app: mynginx
env: staging
org: example.com
team: override-foo
name: staging-team-foo-secret-in-base-c8db7gk2m2
type: Opaque
---
apiVersion: v1
kind: Service
metadata:
annotations:
note: This is a test annotation
labels:
app: mynginx
env: staging
org: example.com
team: override-foo
name: staging-team-foo-nginx
spec:
ports:
- port: 80
selector:
app: mynginx
env: staging
org: example.com
team: override-foo
---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
annotations:
note: This is a test annotation
labels:
app: mynginx
env: staging
org: example.com
team: override-foo
name: staging-team-foo-nginx
spec:
selector:
matchLabels:
app: mynginx
env: staging
org: example.com
team: override-foo
template:
metadata:
annotations:
note: This is a test annotation
labels:
app: mynginx
env: staging
org: example.com
team: override-foo
spec:
containers:
- image: nginx
name: nginx
volumeMounts:
- mountPath: /tmp/ps
name: nginx-persistent-storage
volumes:
- gcePersistentDisk:
pdName: nginx-persistent-storage
name: nginx-persistent-storage
- configMap:
name: staging-configmap-in-overlay-k7cbc75tg8
name: configmap-in-overlay
- configMap:
name: staging-team-foo-configmap-in-base-gh9d7t85gb
name: configmap-in-base

View File

@@ -0,0 +1,15 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx
spec:
template:
spec:
volumes:
- name: nginx-persistent-storage
emptyDir: null
gcePersistentDisk:
pdName: nginx-persistent-storage
- configMap:
name: configmap-in-overlay
name: configmap-in-overlay

View File

@@ -0,0 +1,21 @@
namePrefix: staging-
commonLabels:
env: staging
team: override-foo
patches:
- deployment.yaml
bases:
- ../package/
configMapGenerator:
- name: configmap-in-overlay
literals:
- hello=world
- name: configmap-in-base
behavior: replace
literals:
- foo=override-bar
secretGenerator:
- name: secret-in-base
behavior: merge
commands:
proxy: "printf haproxy"

View File

@@ -0,0 +1,24 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx
labels:
app: nginx
spec:
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
volumeMounts:
- name: nginx-persistent-storage
mountPath: /tmp/ps
volumes:
- name: nginx-persistent-storage
emptyDir: {}
- configMap:
name: configmap-in-base
name: configmap-in-base

View File

@@ -0,0 +1,19 @@
namePrefix: team-foo-
commonLabels:
app: mynginx
org: example.com
team: foo
commonAnnotations:
note: This is a test annotation
resources:
- deployment.yaml
- service.yaml
configMapGenerator:
- name: configmap-in-base
literals:
- foo=bar
secretGenerator:
- name: secret-in-base
commands:
username: "printf admin"
password: "printf somepw"

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
spec:
ports:
- port: 80
selector:
app: nginx

View File

@@ -0,0 +1,5 @@
description: single overlay
args: []
filename: testdata/testcase-single-overlay/in/overlay/
expectedStdout: testdata/testcase-single-overlay/expected.yaml
expectedDiff: testdata/testcase-single-overlay/expected.diff