Skip to content

Instantly share code, notes, and snippets.

@ckorobov
Created May 5, 2018 20:50
Show Gist options
  • Save ckorobov/ce209260fcbe7dc5c2c29681d2d49f70 to your computer and use it in GitHub Desktop.
Save ckorobov/ce209260fcbe7dc5c2c29681d2d49f70 to your computer and use it in GitHub Desktop.
manifest for test service
---
apiVersion: v1
kind: ConfigMap
metadata:
name: test-configmap-meta
namespace: testing
data:
host: '172.30.93.94'
port: '54321'
---
apiVersion: v1
kind: Secret
metadata:
name: test-secret
namespace: testing
type: Opaque
data:
user: 'YWRtaW4y'
password: 'cGFzc3dvcmQy'
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: test-spinnaker-deployment
namespace: testing
spec:
replicas: 1
template:
metadata:
labels:
app: test-spinnaker-deployment
annotations:
moniker.spinnaker.io/application: '"test-spinnaker-deployment"'
spec:
containers:
- image: alpine
command: ["/bin/sh"]
args: ["-c", "while true; do echo $(date) $HOST_NAME $TEST_PORT $SECRET_USER $SECRET_PASS; sleep 10;done"]
name: test-spinnaker-container
imagePullPolicy: IfNotPresent
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
env:
- name: TEST_PORT
valueFrom:
configMapKeyRef:
name: test-configmap-meta
key: port
- name: SECRET_USER
valueFrom:
secretKeyRef:
name: test-secret
key: user
- name: SECRET_PASS
valueFrom:
secretKeyRef:
name: test-secret
key: password
---
apiVersion: batch/v1
kind: Job
metadata:
name: test-spinnaker-job
namespace: testing
spec:
activeDeadlineSeconds: 900
template:
metadata:
name: test-spinnaker-job
spec:
containers:
- image: alpine
command: ["/bin/sh"]
args: ["-c", "echo $(date) $HOST_NAME $TEST_PORT $SECRET_USER $SECRET_PASS"]
name: test-spinnaker-container
imagePullPolicy: IfNotPresent
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
env:
- name: TEST_PORT
valueFrom:
configMapKeyRef:
name: test-configmap-meta
key: port
- name: SECRET_USER
valueFrom:
secretKeyRef:
name: test-secret
key: user
- name: SECRET_PASS
valueFrom:
secretKeyRef:
name: test-secret
key: password
restartPolicy: OnFailure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment