From c7153c67ce7406f64e0a40c0c32d9f186c1728a2 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 1 Nov 2023 17:33:49 -0700 Subject: [PATCH] Update neon modules to allow for name overrides --- neon_diana_utils/helm_charts/base/base-neon/Chart.yaml | 2 +- .../helm_charts/base/base-neon/templates/_deployment.tpl | 9 +++++---- .../helm_charts/base/base-neon/templates/_service.tpl | 7 ++++--- neon_diana_utils/helm_charts/neon/neon-audio/Chart.yaml | 4 ++-- neon_diana_utils/helm_charts/neon/neon-audio/values.yaml | 1 + .../helm_charts/neon/neon-enclosure/Chart.yaml | 4 ++-- .../helm_charts/neon/neon-enclosure/values.yaml | 1 + neon_diana_utils/helm_charts/neon/neon-gui/Chart.yaml | 4 ++-- neon_diana_utils/helm_charts/neon/neon-gui/values.yaml | 1 + .../helm_charts/neon/neon-messagebus/Chart.yaml | 4 ++-- .../helm_charts/neon/neon-messagebus/values.yaml | 1 + neon_diana_utils/helm_charts/neon/neon-skills/Chart.yaml | 4 ++-- .../helm_charts/neon/neon-skills/values.yaml | 1 + neon_diana_utils/helm_charts/neon/neon-speech/Chart.yaml | 4 ++-- .../helm_charts/neon/neon-speech/values.yaml | 1 + 15 files changed, 28 insertions(+), 20 deletions(-) diff --git a/neon_diana_utils/helm_charts/base/base-neon/Chart.yaml b/neon_diana_utils/helm_charts/base/base-neon/Chart.yaml index 5f00905e..607afcb0 100644 --- a/neon_diana_utils/helm_charts/base/base-neon/Chart.yaml +++ b/neon_diana_utils/helm_charts/base/base-neon/Chart.yaml @@ -3,5 +3,5 @@ name: base-neon description: Library chart for basic Neon Core Services type: library -version: 0.0.1 +version: 0.0.2 appVersion: "1.0.1a5" diff --git a/neon_diana_utils/helm_charts/base/base-neon/templates/_deployment.tpl b/neon_diana_utils/helm_charts/base/base-neon/templates/_deployment.tpl index 1142c686..85bde6e5 100644 --- a/neon_diana_utils/helm_charts/base/base-neon/templates/_deployment.tpl +++ b/neon_diana_utils/helm_charts/base/base-neon/templates/_deployment.tpl @@ -1,14 +1,15 @@ +{{ $serviceName := default .Chart.Name .Values.serviceName }} {{- define "base-neon.deployment" -}} apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Chart.Name }} + name: {{ $serviceName }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - neon.diana.service: {{ .Chart.Name }} + neon.diana.service: {{ $serviceName }} strategy: type: Recreate template: @@ -16,7 +17,7 @@ spec: annotations: releaseTime: {{ dateInZone "2006-01-02 15:04:05Z" (now) "UTC"| quote }} labels: - neon.diana.service: {{ .Chart.Name }} + neon.diana.service: {{ $serviceName }} neon.project.name: neon neon.service.class: neon-core spec: @@ -24,7 +25,7 @@ spec: containers: - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} - name: {{ .Chart.Name }} + name: {{ $serviceName }} volumeMounts: - name: config mountPath: /config/neon/neon.yaml diff --git a/neon_diana_utils/helm_charts/base/base-neon/templates/_service.tpl b/neon_diana_utils/helm_charts/base/base-neon/templates/_service.tpl index 349cc433..c4663336 100644 --- a/neon_diana_utils/helm_charts/base/base-neon/templates/_service.tpl +++ b/neon_diana_utils/helm_charts/base/base-neon/templates/_service.tpl @@ -1,16 +1,17 @@ +{{ $serviceName := default .Chart.Name .Values.serviceName }} {{- define "base-neon.service" -}} apiVersion: v1 kind: Service metadata: labels: neon.project.name: neon - neon.diana.service: {{ .Chart.Name }} + neon.diana.service: {{ $serviceName }} neon.service.class: neon-core - name: {{ .Chart.Name }} + name: {{ $serviceName }} spec: clusterIP: None selector: - neon.diana.service: {{ .Chart.Name }} + neon.diana.service: {{ $serviceName }} ports: - name: headless port: 55555 diff --git a/neon_diana_utils/helm_charts/neon/neon-audio/Chart.yaml b/neon_diana_utils/helm_charts/neon/neon-audio/Chart.yaml index 4f76dd4a..dac64569 100644 --- a/neon_diana_utils/helm_charts/neon/neon-audio/Chart.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-audio/Chart.yaml @@ -3,10 +3,10 @@ name: neon-audio description: Deploy Neon Core Audio Service type: application -version: 0.0.1 +version: 0.0.2 appVersion: "1.0.1a5" dependencies: - name: base-neon - version: 0.0.1 + version: 0.0.2 repository: https://neongeckocom.github.io/neon-diana-utils \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/neon/neon-audio/values.yaml b/neon_diana_utils/helm_charts/neon/neon-audio/values.yaml index 806dcb2f..0f2e7585 100644 --- a/neon_diana_utils/helm_charts/neon/neon-audio/values.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-audio/values.yaml @@ -1,3 +1,4 @@ +serviceName: neon-core-audio replicaCount: 1 configMap: neon-config image: diff --git a/neon_diana_utils/helm_charts/neon/neon-enclosure/Chart.yaml b/neon_diana_utils/helm_charts/neon/neon-enclosure/Chart.yaml index 726b2046..57dee6b2 100644 --- a/neon_diana_utils/helm_charts/neon/neon-enclosure/Chart.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-enclosure/Chart.yaml @@ -3,10 +3,10 @@ name: neon-enclosure description: Deploy Neon Core Enclosure Service type: application -version: 0.0.1 +version: 0.0.2 appVersion: "1.0.1a5" dependencies: - name: base-neon - version: 0.0.1 + version: 0.0.2 repository: https://neongeckocom.github.io/neon-diana-utils \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/neon/neon-enclosure/values.yaml b/neon_diana_utils/helm_charts/neon/neon-enclosure/values.yaml index 4209d521..f8ea12e9 100644 --- a/neon_diana_utils/helm_charts/neon/neon-enclosure/values.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-enclosure/values.yaml @@ -1,3 +1,4 @@ +serviceName: neon-core-enclosure replicaCount: 1 configMap: neon-config image: diff --git a/neon_diana_utils/helm_charts/neon/neon-gui/Chart.yaml b/neon_diana_utils/helm_charts/neon/neon-gui/Chart.yaml index ce00a54e..fafd6447 100644 --- a/neon_diana_utils/helm_charts/neon/neon-gui/Chart.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-gui/Chart.yaml @@ -3,10 +3,10 @@ name: neon-gui description: Deploy Neon Core GUI Service type: application -version: 0.0.1 +version: 0.0.2 appVersion: "1.0.1a5" dependencies: - name: base-neon - version: 0.0.1 + version: 0.0.2 repository: https://neongeckocom.github.io/neon-diana-utils \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/neon/neon-gui/values.yaml b/neon_diana_utils/helm_charts/neon/neon-gui/values.yaml index 3decdf6b..6f0e24da 100644 --- a/neon_diana_utils/helm_charts/neon/neon-gui/values.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-gui/values.yaml @@ -1,3 +1,4 @@ +serviceName: neon-core-gui replicaCount: 1 configMap: neon-config port: diff --git a/neon_diana_utils/helm_charts/neon/neon-messagebus/Chart.yaml b/neon_diana_utils/helm_charts/neon/neon-messagebus/Chart.yaml index 3f8b36ef..6d53f8bb 100644 --- a/neon_diana_utils/helm_charts/neon/neon-messagebus/Chart.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-messagebus/Chart.yaml @@ -3,10 +3,10 @@ name: neon-messagebus description: Deploy Neon Core Messagebus type: application -version: 0.0.1 +version: 0.0.2 appVersion: "1.0.1a5" dependencies: - name: base-neon - version: 0.0.1 + version: 0.0.2 repository: https://neongeckocom.github.io/neon-diana-utils \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/neon/neon-messagebus/values.yaml b/neon_diana_utils/helm_charts/neon/neon-messagebus/values.yaml index e8cb0588..f43637e3 100644 --- a/neon_diana_utils/helm_charts/neon/neon-messagebus/values.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-messagebus/values.yaml @@ -1,3 +1,4 @@ +serviceName: neon-core-messagebus replicaCount: 1 configMap: neon-config port: diff --git a/neon_diana_utils/helm_charts/neon/neon-skills/Chart.yaml b/neon_diana_utils/helm_charts/neon/neon-skills/Chart.yaml index 5700cd14..fe3c4faf 100644 --- a/neon_diana_utils/helm_charts/neon/neon-skills/Chart.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-skills/Chart.yaml @@ -3,10 +3,10 @@ name: neon-skills description: Deploy Neon Core Skills Service type: application -version: 0.0.1 +version: 0.0.2 appVersion: "1.0.1a5" dependencies: - name: base-neon - version: 0.0.1 + version: 0.0.2 repository: https://neongeckocom.github.io/neon-diana-utils \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/neon/neon-skills/values.yaml b/neon_diana_utils/helm_charts/neon/neon-skills/values.yaml index 74a43fac..4eb69997 100644 --- a/neon_diana_utils/helm_charts/neon/neon-skills/values.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-skills/values.yaml @@ -1,3 +1,4 @@ +serviceName: neon-core-skills replicaCount: 1 configMap: neon-config image: diff --git a/neon_diana_utils/helm_charts/neon/neon-speech/Chart.yaml b/neon_diana_utils/helm_charts/neon/neon-speech/Chart.yaml index 9865db76..5e03624c 100644 --- a/neon_diana_utils/helm_charts/neon/neon-speech/Chart.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-speech/Chart.yaml @@ -3,10 +3,10 @@ name: neon-speech description: Deploy Neon Core Speech (Voice) Service type: application -version: 0.0.1 +version: 0.0.2 appVersion: "1.0.1a5" dependencies: - name: base-neon - version: 0.0.1 + version: 0.0.2 repository: https://neongeckocom.github.io/neon-diana-utils \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/neon/neon-speech/values.yaml b/neon_diana_utils/helm_charts/neon/neon-speech/values.yaml index 6d409326..2db88b52 100644 --- a/neon_diana_utils/helm_charts/neon/neon-speech/values.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-speech/values.yaml @@ -1,3 +1,4 @@ +serviceName: neon-core-speech replicaCount: 1 configMap: neon-config image: