From 0b362983a396848a16c41c8fcea81783fdb9cedb Mon Sep 17 00:00:00 2001 From: plm Date: Fri, 10 Jan 2025 16:41:41 +0100 Subject: [PATCH] Integrating catalog --- opencloud/dev-values.yaml | 12 +++++++ .../templates/oc-catalog/deployment.yaml | 35 +++++++++++++++++++ opencloud/templates/oc-catalog/ingress.yaml | 29 +++++++++++++++ opencloud/templates/oc-catalog/service.yaml | 17 +++++++++ opencloud/templates/oc-front/config.yaml | 2 +- 5 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 opencloud/templates/oc-catalog/deployment.yaml create mode 100644 opencloud/templates/oc-catalog/ingress.yaml create mode 100644 opencloud/templates/oc-catalog/service.yaml diff --git a/opencloud/dev-values.yaml b/opencloud/dev-values.yaml index 893669b..dbb9015 100644 --- a/opencloud/dev-values.yaml +++ b/opencloud/dev-values.yaml @@ -303,6 +303,18 @@ ocWorkflow: cpu: "128m" memory: "256Mi" +ocCatalog: + enabled: true + image: oc/oc-catalog:0.0.1 + resources: + limits: + cpu: "128m" + memory: "256Mi" + requests: + cpu: "128m" + memory: "256Mi" + + loki: enabled: false diff --git a/opencloud/templates/oc-catalog/deployment.yaml b/opencloud/templates/oc-catalog/deployment.yaml new file mode 100644 index 0000000..fa63d3b --- /dev/null +++ b/opencloud/templates/oc-catalog/deployment.yaml @@ -0,0 +1,35 @@ +{{- if index .Values.ocCatalog.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: oc-catalog + name: {{ .Release.Name }}-oc-catalog +spec: + replicas: 1 + selector: + matchLabels: + app: oc-catalog + template: + metadata: + labels: + app: oc-catalog + spec: + containers: + - image: "{{ .Values.ocCatalog.image }}" + name: oc-catalog + envFrom: + - configMapRef: + name: opencloud-config + ports: + - name: http + containerPort: 8080 + protocol: TCP + resources: + limits: + cpu: "{{ .Values.ocCatalog.resources.limits.cpu }}" + memory: "{{ .Values.ocCatalog.resources.limits.memory }}" + requests: + cpu: "{{ .Values.ocCatalog.resources.requests.cpu }}" + memory: "{{ .Values.ocCatalog.resources.requests.memory }}" + {{- end }} \ No newline at end of file diff --git a/opencloud/templates/oc-catalog/ingress.yaml b/opencloud/templates/oc-catalog/ingress.yaml new file mode 100644 index 0000000..96dcde4 --- /dev/null +++ b/opencloud/templates/oc-catalog/ingress.yaml @@ -0,0 +1,29 @@ +{{- if index .Values.ocCatalog.enabled }} +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: oc-catalog-ingress +spec: + entryPoints: + - web + routes: + - kind: Rule + match: Host(`{{ .Values.host }}`) && PathPrefix(`/catalog`) + priority: 10 + services: + - kind: Service + name: oc-catalog-svc + port: 8080 + middlewares: + - name: strip-catalog-prefix + +--- +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: strip-catalog-prefix +spec: + stripPrefix: + prefixes: + - "/catalog" +{{- end }} \ No newline at end of file diff --git a/opencloud/templates/oc-catalog/service.yaml b/opencloud/templates/oc-catalog/service.yaml new file mode 100644 index 0000000..a606563 --- /dev/null +++ b/opencloud/templates/oc-catalog/service.yaml @@ -0,0 +1,17 @@ +{{- if index .Values.ocCatalog.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: oc-catalog-svc + labels: + app: oc-catalog-svc +spec: + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app: oc-catalog + type: ClusterIP +{{- end }} \ No newline at end of file diff --git a/opencloud/templates/oc-front/config.yaml b/opencloud/templates/oc-front/config.yaml index f8dea2f..7daf17d 100644 --- a/opencloud/templates/oc-front/config.yaml +++ b/opencloud/templates/oc-front/config.yaml @@ -8,7 +8,7 @@ data: { "WORKSPACE_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/workspace/oc", "WORKFLOW_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/workflow/oc", - "ITEM_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/item/oc", + "ITEM_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/catalog/oc", "SCHEDULER_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/scheduler/oc", "LOGS_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/logs", "PEER_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/peers/oc",