Skip to content

Commit

Permalink
Merge pull request #22 from tombatchelor/DEMO-6-fix-marshaller
Browse files Browse the repository at this point in the history
Fix for DEMO-6, marshaller need to run against the right namespace
  • Loading branch information
tombatchelor authored Nov 1, 2019
2 parents a754e8f + ece211a commit 28a8b52
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 5 deletions.
2 changes: 1 addition & 1 deletion demo_marshaller/script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

kubectl apply -f /"$NEW_YAML"
kubectl apply -f /"$NEW_YAML" -n $NAMESPACE

27 changes: 27 additions & 0 deletions kubernetes/cars_app-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ spec:
env:
- name: NEW_YAML
value: 2_leak.yaml
- name: NAMESPACE
valueFrom:
configMapKeyRef:
name: marshall-config
key: namespace.name
restartPolicy: OnFailure
---
apiVersion: batch/v1beta1
Expand All @@ -277,6 +282,11 @@ spec:
env:
- name: NEW_YAML
value: 4_leak.yaml
- name: NAMESPACE
valueFrom:
configMapKeyRef:
name: marshall-config
key: namespace.name
restartPolicy: OnFailure
---
apiVersion: batch/v1beta1
Expand All @@ -297,6 +307,11 @@ spec:
env:
- name: NEW_YAML
value: 4_no_leak.yaml
- name: NAMESPACE
valueFrom:
configMapKeyRef:
name: marshall-config
key: namespace.name
restartPolicy: OnFailure
---
apiVersion: batch/v1beta1
Expand All @@ -317,6 +332,11 @@ spec:
env:
- name: NEW_YAML
value: 2_no_leak.yaml
- name: NAMESPACE
valueFrom:
configMapKeyRef:
name: marshall-config
key: namespace.name
restartPolicy: OnFailure
---
apiVersion: v1
Expand Down Expand Up @@ -464,6 +484,13 @@ data:
---
apiVersion: v1
kind: ConfigMap
metadata:
name: marshall-config
data:
namespace.name: cars-app
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: prometheus
Expand Down
35 changes: 31 additions & 4 deletions kubernetes/cars_app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,15 @@ spec:
containers:
- name: 2leak
imagePullPolicy: Always
image: tombatchelor/demo_marshaller:1.1
image: tombatchelor/demo_marshaller:2.1
env:
- name: NEW_YAML
value: 2_leak.yaml
- name: NAMESPACE
valueFrom:
configMapKeyRef:
name: marshall-config
key: namespace.name
restartPolicy: OnFailure
---
apiVersion: batch/v1beta1
Expand All @@ -281,10 +286,15 @@ spec:
containers:
- name: 4leak
imagePullPolicy: Always
image: tombatchelor/demo_marshaller:1.1
image: tombatchelor/demo_marshaller:2.1
env:
- name: NEW_YAML
value: 4_leak.yaml
- name: NAMESPACE
valueFrom:
configMapKeyRef:
name: marshall-config
key: namespace.name
restartPolicy: OnFailure
---
apiVersion: batch/v1beta1
Expand All @@ -301,10 +311,15 @@ spec:
containers:
- name: 4noleak
imagePullPolicy: Always
image: tombatchelor/demo_marshaller:1.1
image: tombatchelor/demo_marshaller:2.1
env:
- name: NEW_YAML
value: 4_no_leak.yaml
- name: NAMESPACE
valueFrom:
configMapKeyRef:
name: marshall-config
key: namespace.name
restartPolicy: OnFailure
---
apiVersion: batch/v1beta1
Expand All @@ -321,10 +336,15 @@ spec:
containers:
- name: 2noleak
imagePullPolicy: Always
image: tombatchelor/demo_marshaller:1.1
image: tombatchelor/demo_marshaller:2.1
env:
- name: NEW_YAML
value: 2_no_leak.yaml
- name: NAMESPACE
valueFrom:
configMapKeyRef:
name: marshall-config
key: namespace.name
restartPolicy: OnFailure
---
apiVersion: v1
Expand Down Expand Up @@ -475,6 +495,13 @@ data:
---
apiVersion: v1
kind: ConfigMap
metadata:
name: marshall-config
data:
namespace.name: default
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: prometheus
Expand Down

0 comments on commit 28a8b52

Please sign in to comment.