From f0cded74bebb00ac638e2f60fcd0a8d6ab91b79b Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 27 Nov 2023 12:52:49 -0800 Subject: [PATCH] Add admin service to klat deployment --- .../helm_charts/klat/klat-chat/Chart.yaml | 2 +- .../klat-chat/templates/deployment-admin.yaml | 50 +++++++++++++++++++ .../klat-chat/templates/service-admin.yaml | 17 +++++++ .../helm_charts/klat/klat-chat/values.yaml | 9 +++- 4 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 neon_diana_utils/helm_charts/klat/klat-chat/templates/deployment-admin.yaml create mode 100644 neon_diana_utils/helm_charts/klat/klat-chat/templates/service-admin.yaml diff --git a/neon_diana_utils/helm_charts/klat/klat-chat/Chart.yaml b/neon_diana_utils/helm_charts/klat/klat-chat/Chart.yaml index ed9c06a0..4a959082 100644 --- a/neon_diana_utils/helm_charts/klat/klat-chat/Chart.yaml +++ b/neon_diana_utils/helm_charts/klat/klat-chat/Chart.yaml @@ -3,5 +3,5 @@ name: klat-chat description: Deploy Klat Services type: application -version: 0.0.3 +version: 0.0.4 appVersion: "1.0.1a9" diff --git a/neon_diana_utils/helm_charts/klat/klat-chat/templates/deployment-admin.yaml b/neon_diana_utils/helm_charts/klat/klat-chat/templates/deployment-admin.yaml new file mode 100644 index 00000000..324cd83c --- /dev/null +++ b/neon_diana_utils/helm_charts/klat/klat-chat/templates/deployment-admin.yaml @@ -0,0 +1,50 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.serviceName }}-admin +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + neon.diana.service: {{ .Values.serviceName }}-admin + strategy: + type: Recreate + template: + metadata: + annotations: + releaseTime: {{ dateInZone "2006-01-02 15:04:05Z" (now) "UTC"| quote }} + labels: + neon.diana.service: {{ .Values.serviceName }}-admin + neon.project.name: klat + neon.service.class: klat-chat + spec: + restartPolicy: Always + imagePullSecrets: + - name: {{ .Values.imagePullSecret }} + volumes: + - name: config + projected: + sources: + - configMap: + name: {{ .Values.configMap }} + containers: + - image: {{ .Values.images.admin.image }}:{{ .Values.images.tag }} + imagePullPolicy: {{ $.Values.images.pullPolicy }} + name: {{ .Values.images.admin.name }} + env: + - name: OVOS_CONFIG_FILENAME + value: klat.yaml + - name: OVOS_CONFIG_BASE_FOLDER + value: neon + - name: XDG_CONFIG_HOME + value: /config + - name: REACT_APP_SERVER_URL + value: "http://127.0.0.1:8000" + volumeMounts: + - name: config + mountPath: /config/neon/{{ $.Values.configFilename }} + subPath: {{ $.Values.configFilename }} + {{- if $.Values.resources }} + resources: + {{- toYaml $.Values.resources | nindent 12 -}} + {{ end }} \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/klat/klat-chat/templates/service-admin.yaml b/neon_diana_utils/helm_charts/klat/klat-chat/templates/service-admin.yaml new file mode 100644 index 00000000..6f34a589 --- /dev/null +++ b/neon_diana_utils/helm_charts/klat/klat-chat/templates/service-admin.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + neon.project.name: klat + neon.diana.service: {{ .Values.serviceName }} + neon.service.class: klat-admin + name: {{ .Values.serviceName }}-admin +spec: + type: ClusterIP + selector: + neon.diana.service: {{ .Values.serviceName }}-admin + ports: + - name: klat-admin + port: 3000 + targetPort: 3000 + protocol: TCP diff --git a/neon_diana_utils/helm_charts/klat/klat-chat/values.yaml b/neon_diana_utils/helm_charts/klat/klat-chat/values.yaml index 76f1132f..7aa3d4e7 100644 --- a/neon_diana_utils/helm_charts/klat/klat-chat/values.yaml +++ b/neon_diana_utils/helm_charts/klat/klat-chat/values.yaml @@ -5,6 +5,7 @@ domain: diana.k8s configMap: klat-config clientSubdomain: klat serverSubdomain: klatapi +adminSubdomain: admin images: tag: dev pullPolicy: Always @@ -17,6 +18,9 @@ images: observer: image: ghcr.io/neongeckocom/klatchat_observer name: klat-chat-observer + admin: + image: ghcr.io/neondaniel/pyklatchat_admin + name: klat-chat-admin ingress: enabled: True @@ -29,4 +33,7 @@ ingress: servicePort: 8001 - host: klatapi serviceName: klat-chat-server - servicePort: 8010 \ No newline at end of file + servicePort: 8010 + - host: admin + serviceName: klat-chat-admin + servicePort: 3000 \ No newline at end of file