Skip to content

Instantly share code, notes, and snippets.

@hguerrero
Created May 31, 2024 13:43
Show Gist options
  • Save hguerrero/a1e1b86c5f9f6df53f003a50a9793dde to your computer and use it in GitHub Desktop.
Save hguerrero/a1e1b86c5f9f6df53f003a50a9793dde to your computer and use it in GitHub Desktop.
Microcks Deployments K8s
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: microcks-pvc
labels:
app: microcks
spec:
resources:
requests:
storage: 100Mi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: microcks
labels:
app: microcks
app.kubernetes.io/component: microcks
app.kubernetes.io/instance: microcks
app.kubernetes.io/name: microcks
app.kubernetes.io/part-of: microcks-app
app.openshift.io/runtime: java
spec:
selector:
matchLabels:
app: microcks
template:
metadata:
labels:
app: microcks
deployment: microcks
spec:
containers:
- name: microcks
image: microcks/microcks-uber:latest
env:
- name: MONGODB_STORAGE_PATH
value: /etc/microcks/data/microcks.mv
resources:
limits:
memory: "512Mi"
cpu: "500m"
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /etc/microcks/data
name: data
volumes:
- name: data
persistentVolumeClaim:
claimName: microcks-pvc
---
apiVersion: v1
kind: Service
metadata:
name: microcks
labels:
app: microcks
spec:
selector:
app: microcks
ports:
- port: 8080
targetPort: 8080
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: microcks
labels:
app: microcks
spec:
to:
kind: Service
name: microcks
weight: 100
port:
targetPort: 8080
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: microcks
labels:
app: microcks
app.kubernetes.io/component: microcks
app.kubernetes.io/instance: microcks
app.kubernetes.io/name: microcks
app.kubernetes.io/part-of: microcks-app
app.openshift.io/runtime: java
spec:
selector:
matchLabels:
app: microcks
template:
metadata:
labels:
app: microcks
deployment: microcks
spec:
containers:
- name: microcks
image: microcks/microcks-uber:latest-native
resources:
limits:
memory: "512Mi"
cpu: "500m"
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: microcks
labels:
app: microcks
spec:
selector:
app: microcks
ports:
- port: 8080
targetPort: 8080
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: microcks
labels:
app: microcks
spec:
to:
kind: Service
name: microcks
weight: 100
port:
targetPort: 8080
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment