Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: neon iris websat for helm #58

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions neon_diana_utils/helm_charts/neon/neon-iris-websat/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
12 changes: 12 additions & 0 deletions neon_diana_utils/helm_charts/neon/neon-iris-websat/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: neon-iris-websat
description: Deploy Neon IRIS Web Satellite UI

type: application
version: 0.0.1
appVersion: "1.0.1a14"

dependencies:
- name: base-neon
version: 0.0.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 0.0.5 now

repository: file://../../base/base-neon
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "base-neon.deployment" . }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{ if .Values.ingress.enabled }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use the base-neon.ingress template?

{{- include "base-neon.ingress" . }}

{{- $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 }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "base-neon.service" . }}
27 changes: 27 additions & 0 deletions neon_diana_utils/helm_charts/neon/neon-iris-websat/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
serviceName: neon-core-iris-websat
subdomain: iris
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is referenced anywhere looking at the neon-iris chart for comparison

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neon-iris uses this default host, can this be websat or satellite (or similar) instead?

serviceName: neon-core-iris-websat
servicePort: 8000
12 changes: 10 additions & 2 deletions neon_diana_utils/templates/neon/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ 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:
- name: neon-core
alias: core
version: 0.0.8
repository: https://neongeckocom.github.io/neon-diana-utils
repository: https://neongeckocom.github.io/neon-diana-utils
- name: neon-iris
alias: iris
version: 0.0.4
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
Loading