Skip to content

Instantly share code, notes, and snippets.

@themarcelor
Created February 28, 2020 01:47
Show Gist options
  • Select an option

  • Save themarcelor/2f5151a6889f1529671f73d07e6481ad to your computer and use it in GitHub Desktop.

Select an option

Save themarcelor/2f5151a6889f1529671f73d07e6481ad to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: release-tracker-deployment
spec:
selector:
# Only select pods based on the 'app' label
matchLabels:
app: release-tracker
revisionHistoryLimit: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: release-tracker
release: test
netnolimit: "yes" # check
public: "yes"
spec:
containers:
- name: release-tracker
image: quay.io/cdis/python-nginx:pybase3-1.2.0
command: ['sh','-c', 'sleep 50000']
imagePullPolicy: Always
resources:
limits:
memory: "256Mi"
cpu: "250m"
env:
- name: GEN3_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- containerPort: 80
apiVersion: v1
kind: Service
metadata:
name: release-tracker-service
labels:
app: release-tracker
spec:
ports:
- name: https
nodePort: 32001
port: 5055
protocol: TCP
targetPort: 80
selector:
app: release-tracker
type: NodePort
sessionAffinity: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment