forked from cmattoon/aws-ssm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.yaml
42 lines (42 loc) · 1.01 KB
/
example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Given:
# - an AWS SSM Parameter AWS_TEST_SECRET='foobar' (SecureString, using default encryption key)
# Provides:
# - An environment variable THE_SECRET='foobar' to the nginx container
#
# Test this file by launching aws-ssm, then run:
# kubectl apply -f example.yaml
---
apiVersion: v1
kind: Secret
metadata:
name: test-secret
annotations:
alpha.ssm.cmattoon.com/aws-param-name: PROD_DB_PASSWORD
alpha.ssm.cmattoon.com/aws-param-type: SecureString
alpha.ssm.cmattoon.com/aws-param-key: "alias/aws/ssm"
data: {}
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: test-pod
labels:
app: my-test
spec:
template:
metadata:
labels:
app: my-test
spec:
containers:
- name: nginx
image: nginx
ports:
- name: http
containerPort: 80
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: test-secret
key: SecureString