Adding collaborative area support

This commit is contained in:
plm 2025-01-09 16:24:43 +01:00
parent f868400b7a
commit 5825c89a23
6 changed files with 94 additions and 2 deletions

View File

@ -281,6 +281,17 @@ ocWorkspace:
cpu: "128m"
memory: "256Mi"
ocShared:
enabled: true
image: oc/oc-shared:0.0.1
resources:
limits:
cpu: "128m"
memory: "256Mi"
requests:
cpu: "128m"
memory: "256Mi"
loki:
enabled: false

View File

@ -13,7 +13,7 @@ data:
"LOGS_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/logs",
"PEER_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/peers/oc",
"DATACENTER_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/datacenter/oc",
"COLLABORATIVE_AREA_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/collaborative/oc",
"COLLABORATIVE_AREA_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/shared/oc",
"HOST": "{{ .Values.scheme }}://{{ .Values.host }}/oc",
"AUTH_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/auth/oc"
}

View File

@ -9,7 +9,7 @@ spec:
routes:
- kind: Rule
match: Host(`{{ .Values.host }}`) && PathPrefix(`/`)
priority: 10
priority: 5
services:
- kind: Service
name: oc-front-svc

View File

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

View File

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

View File

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