diff --git a/base/kustomization.yaml b/base/kustomization.yaml new file mode 100644 index 00000000..c41bc101 --- /dev/null +++ b/base/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- resources.yaml \ No newline at end of file diff --git a/base/resources.yaml b/base/resources.yaml new file mode 100644 index 00000000..d91614c6 --- /dev/null +++ b/base/resources.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: myApp +spec: + selector: + matchLabels: + app: myApp + template: + metadata: + labels: + app: myApp + spec: + containers: + - name: myApp + image: nginx:1.7.9 + volumeMounts: + - name: myApp + mountPath: /usr/share/nginx/html + volumes: + - name: myApp + emptyDir: {} \ No newline at end of file diff --git a/overrides/kustomization.yaml b/overrides/kustomization.yaml new file mode 100644 index 00000000..82d11389 --- /dev/null +++ b/overrides/kustomization.yaml @@ -0,0 +1,5 @@ +resources: + - ../base + +patchesStrategicMerge: + - patches.yaml \ No newline at end of file diff --git a/overrides/patches.yaml b/overrides/patches.yaml new file mode 100644 index 00000000..3c0f6250 --- /dev/null +++ b/overrides/patches.yaml @@ -0,0 +1,17 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: myApp +spec: + template: + spec: + containers: + - name: myApp + volumeMounts: + - name: extra-volume + mountPath: /etc/extra + volumes: + - name: extra-volume + secret: + secretName: test-secret +