Skip to content

Instantly share code, notes, and snippets.

@FreedomBen
Last active January 8, 2021 02:43
Show Gist options
  • Save FreedomBen/d50f5af249e26444570aad0f9a96c51d to your computer and use it in GitHub Desktop.
Save FreedomBen/d50f5af249e26444570aad0f9a96c51d to your computer and use it in GitHub Desktop.
Deployment YAML for the basic-ocp-demo application
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: basic-ocp-demo
name: basic-ocp-demo
spec:
replicas: 1
selector:
matchLabels:
app: basic-ocp-demo
template:
metadata:
labels:
app: basic-ocp-demo
spec:
containers:
- image: quay.io/freedomben/basic-ocp-demo:latest
name: basic-ocp-demo
imagePullPolicy: Always
ports:
- containerPort: 4567
protocol: TCP
readinessProbe:
httpGet:
scheme: HTTP
path: /healthz
port: 4567
initialDelaySeconds: 5
periodSeconds: 1
env:
- name: BASIC_OCP_DEMO_ENV
value: master
---
apiVersion: v1
kind: Service
metadata:
labels:
app: basic-ocp-demo
name: basic-ocp-demo
spec:
ports:
- name: 4567-tcp
port: 4567
protocol: TCP
targetPort: 4567
selector:
deployment: basic-ocp-demo
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app: basic-ocp-demo
name: basic-ocp-demo
spec:
port:
targetPort: 4567-tcp
to:
kind: Service
name: basic-ocp-demo
weight: 100
wildcardPolicy: None
tls:
termination: edge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment