Skip to content

Instantly share code, notes, and snippets.

@xynova
Last active April 21, 2018 10:48
Show Gist options
  • Save xynova/21f39578dfe99e928031b80a2e61643f to your computer and use it in GitHub Desktop.
Save xynova/21f39578dfe99e928031b80a2e61643f to your computer and use it in GitHub Desktop.
AWS registry proxy deployment
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: aws-registry-proxy
labels:
app: aws-registry-proxy
buildRef: latest
spec:
replicas: 2
revisionHistoryLimit: 10
selector:
matchLabels:
app: aws-registry-proxy
buildRef: latest
template:
metadata:
labels:
app: aws-registry-proxy
buildRef: latest
name: aws-registry-proxy-latest
spec:
imagePullSecrets:
- name: aws-registry
containers:
- name: app
image: <XXXXXXXXXXXX>.dkr.ecr.ap-southeast-2.amazonaws.com/nginx-plus
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
name: app
protocol: TCP
volumeMounts:
- mountPath: /etc/nginx/conf.d
name: proxy-config
volumes:
- name: proxy-config
configMap:
defaultMode: 420
name: aws-registry-proxy-config
apiVersion: v1
kind: Service
metadata:
name: aws-registry-proxy-svc
labels:
app: aws-registry-proxy
spec:
selector:
app: aws-registry-proxy
ports:
- port: 8080
protocol: TCP
targetPort: app
apiVersion: v1
kind: Route
metadata:
name: aws-registry-proxy-route
labels:
app: aws-registry-proxy
spec:
host: registry.shrd.ourdomain.net
tls:
insecureEdgeTerminationPolicy: Redirect
termination: edge
to:
kind: Service
name: aws-registry-proxy-svc
wildcardPolicy: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment