From 8e472b1003982d79782dac69ad66c4ea2b28e5a2 Mon Sep 17 00:00:00 2001 From: mikejgray Date: Wed, 27 Dec 2023 21:20:59 -0600 Subject: [PATCH 1/2] feat: neon iris websat for helm --- .../neon/neon-iris-websat/.helmignore | 23 +++++++ .../neon/neon-iris-websat/Chart.yaml | 12 ++++ .../neon-iris-websat/templates/_helpers.tpl | 62 +++++++++++++++++++ .../templates/deployment.yaml | 1 + .../neon-iris-websat/templates/ingress.yaml | 38 ++++++++++++ .../neon-iris-websat/templates/service.yaml | 1 + .../neon/neon-iris-websat/values.yaml | 27 ++++++++ 7 files changed, 164 insertions(+) create mode 100644 neon_diana_utils/helm_charts/neon/neon-iris-websat/.helmignore create mode 100644 neon_diana_utils/helm_charts/neon/neon-iris-websat/Chart.yaml create mode 100644 neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/_helpers.tpl create mode 100644 neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/deployment.yaml create mode 100644 neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/ingress.yaml create mode 100644 neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/service.yaml create mode 100644 neon_diana_utils/helm_charts/neon/neon-iris-websat/values.yaml diff --git a/neon_diana_utils/helm_charts/neon/neon-iris-websat/.helmignore b/neon_diana_utils/helm_charts/neon/neon-iris-websat/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/neon_diana_utils/helm_charts/neon/neon-iris-websat/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/neon_diana_utils/helm_charts/neon/neon-iris-websat/Chart.yaml b/neon_diana_utils/helm_charts/neon/neon-iris-websat/Chart.yaml new file mode 100644 index 00000000..8d6cd869 --- /dev/null +++ b/neon_diana_utils/helm_charts/neon/neon-iris-websat/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: neon-iris-websat +description: Deploy Neon IRIS Web Satellite UI + +type: application +version: 0.0.4 +appVersion: "1.0.1a14" + +dependencies: + - name: base-neon + version: 0.0.4 + repository: file://../../base/base-neon diff --git a/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/_helpers.tpl b/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/_helpers.tpl new file mode 100644 index 00000000..e5a9ba14 --- /dev/null +++ b/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "neon-iris-websat.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "neon-iris-websat.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "neon-iris-websat.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "neon-iris-websat.labels" -}} +helm.sh/chart: {{ include "neon-iris-websat.chart" . }} +{{ include "neon-iris-websat.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "neon-iris-websat.selectorLabels" -}} +app.kubernetes.io/name: {{ include "neon-iris-websat.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "neon-iris-websat.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "neon-iris-websat.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/deployment.yaml b/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/deployment.yaml new file mode 100644 index 00000000..ddd9eee2 --- /dev/null +++ b/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/deployment.yaml @@ -0,0 +1 @@ +{{- include "base-neon.deployment" . }} \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/ingress.yaml b/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/ingress.yaml new file mode 100644 index 00000000..f1859271 --- /dev/null +++ b/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/ingress.yaml @@ -0,0 +1,38 @@ +{{ if .Values.ingress.enabled }} +{{- $domain := .Values.domain -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: ingress-iris-websat + annotations: + kubernetes.io/ingress.class: {{ .Values.ingress.ingressClassName }} + cert-manager.io/issuer: {{ .Values.ingress.certIssuer }} +spec: + tls: + - secretName: {{ .Values.ingress.tlsSecretName }} + hosts: + {{- range .Values.ingress.rules }} + - {{ printf "%s.%s " .host $.Values.domain }} + {{- end }} + + rules: + {{- range .Values.ingress.rules }} + - host: {{ printf "%s.%s " .host $.Values.domain }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .serviceName }} + port: + number: {{ .servicePort }} + {{- end }} + + {{- end }} \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/service.yaml b/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/service.yaml new file mode 100644 index 00000000..a9dda51d --- /dev/null +++ b/neon_diana_utils/helm_charts/neon/neon-iris-websat/templates/service.yaml @@ -0,0 +1 @@ +{{- include "base-neon.service" . }} diff --git a/neon_diana_utils/helm_charts/neon/neon-iris-websat/values.yaml b/neon_diana_utils/helm_charts/neon/neon-iris-websat/values.yaml new file mode 100644 index 00000000..9b9d538a --- /dev/null +++ b/neon_diana_utils/helm_charts/neon/neon-iris-websat/values.yaml @@ -0,0 +1,27 @@ +serviceName: neon-core-iris-websat +subdomain: iris +domain: diana.local +replicaCount: 1 +configMap: neon-config + +port: + name: websat-ui + number: 8000 + targetPort: 8000 +image: + repository: ghcr.io/neongeckocom/neon-iris-websat + pullPolicy: Always + tag: dev +resources: + requests: + memory: "500Mi" + cpu: "0.05" +ingress: + enabled: True + ingressClassName: nginx + tlsSecretName: tls-letsencrypt-iris-websat + certIssuer: letsencrypt-private-key + rules: + - host: iris + serviceName: neon-core-iris-websat + servicePort: 8000 From 64d4b520449bc5d14a602538f7c66c6d3c2d27df Mon Sep 17 00:00:00 2001 From: mikejgray Date: Mon, 22 Jan 2024 21:39:04 -0600 Subject: [PATCH 2/2] requested changes --- .../helm_charts/neon/neon-iris-websat/Chart.yaml | 2 +- neon_diana_utils/templates/neon/Chart.yaml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/neon_diana_utils/helm_charts/neon/neon-iris-websat/Chart.yaml b/neon_diana_utils/helm_charts/neon/neon-iris-websat/Chart.yaml index 8d6cd869..fbe61afe 100644 --- a/neon_diana_utils/helm_charts/neon/neon-iris-websat/Chart.yaml +++ b/neon_diana_utils/helm_charts/neon/neon-iris-websat/Chart.yaml @@ -3,7 +3,7 @@ name: neon-iris-websat description: Deploy Neon IRIS Web Satellite UI type: application -version: 0.0.4 +version: 0.0.1 appVersion: "1.0.1a14" dependencies: diff --git a/neon_diana_utils/templates/neon/Chart.yaml b/neon_diana_utils/templates/neon/Chart.yaml index 02cfd240..5d078760 100644 --- a/neon_diana_utils/templates/neon/Chart.yaml +++ b/neon_diana_utils/templates/neon/Chart.yaml @@ -3,7 +3,7 @@ name: neon-deployment description: A Helm chart to deploy Neon Core type: application -version: 1.0.0 +version: 1.1.0 appVersion: "1.0.1a5" dependencies: @@ -14,4 +14,8 @@ dependencies: - name: neon-iris alias: iris version: 0.0.4 - repository: https://neongeckocom.github.io/neon-diana-utils \ No newline at end of file + repository: https://neongeckocom.github.io/neon-diana-utils + - name: neon-iris-websat + alias: iris-websat + version: 0.0.1 + repository: https://neongeckocom.github.io/neon-diana-utils