Skip to content

Instantly share code, notes, and snippets.

@christopherhein
Created October 4, 2018 21:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christopherhein/1cb7da812a197ac3cc547ed2495faf9d to your computer and use it in GitHub Desktop.
Save christopherhein/1cb7da812a197ac3cc547ed2495faf9d to your computer and use it in GitHub Desktop.
Sample DynamoDB AWS Operator Manifest
---
apiVersion: service-operator.aws/v1alpha1
kind: DynamoDB
metadata:
name: dynamo-table
spec:
hashAttribute:
name: name
type: S
rangeAttribute:
name: created_at
type: S
readCapacityUnits: 5
writeCapacityUnits: 5
---
apiVersion: v1
kind: Service
metadata:
name: frontend
spec:
selector:
app: frontend
ports:
- port: 80
targetPort: http-server
name: http
type: LoadBalancer
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: frontend
labels:
app: frontend
spec:
replicas: 1
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: frontend
image: christopherhein/dynamoapp:latest
imagePullPolicy: Always
env:
- name: TABLE_NAME
valueFrom:
configMapKeyRef:
name: dynamo-table
key: tableName
resources:
requests:
memory: "512m"
cpu: "512m"
ports:
- name: http-server
containerPort: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment