Integrating workflow microservice

This commit is contained in:
plm 2025-01-10 11:43:01 +01:00
parent 5825c89a23
commit fb5aed882f
4 changed files with 93 additions and 0 deletions

View File

@ -292,6 +292,18 @@ ocShared:
cpu: "128m"
memory: "256Mi"
ocWorkflow:
enabled: true
image: oc/oc-workflow:0.0.1
resources:
limits:
cpu: "128m"
memory: "256Mi"
requests:
cpu: "128m"
memory: "256Mi"
loki:
enabled: false

View File

@ -0,0 +1,35 @@
{{- if index .Values.ocWorkflow.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: oc-workflow
name: {{ .Release.Name }}-oc-workflow
spec:
replicas: 1
selector:
matchLabels:
app: oc-workflow
template:
metadata:
labels:
app: oc-workflow
spec:
containers:
- image: "{{ .Values.ocWorkflow.image }}"
name: oc-shared
envFrom:
- configMapRef:
name: opencloud-config
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
limits:
cpu: "{{ .Values.ocWorkflow.resources.limits.cpu }}"
memory: "{{ .Values.ocWorkflow.resources.limits.memory }}"
requests:
cpu: "{{ .Values.ocWorkflow.resources.requests.cpu }}"
memory: "{{ .Values.ocWorkflow.resources.requests.memory }}"
{{- end }}

View File

@ -0,0 +1,29 @@
{{- if index .Values.ocWorkflow.enabled }}
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: oc-workflow-ingress
spec:
entryPoints:
- web
routes:
- kind: Rule
match: Host(`{{ .Values.host }}`) && PathPrefix(`/workflow`)
priority: 10
services:
- kind: Service
name: oc-workflow-svc
port: 8080
middlewares:
- name: strip-workflow-prefix
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: strip-workflow-prefix
spec:
stripPrefix:
prefixes:
- "/workflow"
{{- end }}

View File

@ -0,0 +1,17 @@
{{- if index .Values.ocWorkflow.enabled }}
apiVersion: v1
kind: Service
metadata:
name: oc-workflow-svc
labels:
app: oc-workflow-svc
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: oc-workflow
type: ClusterIP
{{- end }}