Skip to content

Commit 584afbb

Browse files
committed
Switch to use nectarlib
Change-Id: I1cf5b0ac64b7d5455ac1b3bf579b91bf578725b1
1 parent 9f04445 commit 584afbb

13 files changed

+74
-284
lines changed

Chart.lock

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ dependencies:
22
- name: common
33
repository: oci://registry-1.docker.io/bitnamicharts
44
version: 2.29.1
5-
digest: sha256:7bf3bb546e534cd64cc861f46fcfe30e11055c6083df54a64539744ecbab018a
6-
generated: "2025-01-27T03:21:47.344425867Z"
5+
- name: nectarlib
6+
repository: oci://registry.rc.nectar.org.au/nectar-helm
7+
version: 3.0.1
8+
digest: sha256:8f5f725db1e4c84a1bfe4ef41bf0c04044e021d758faa984e37357d0b18034c0
9+
generated: "2025-01-31T12:44:31.434829233+11:00"

Chart.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ apiVersion: v2
22
name: taynac
33
description: A Helm chart for taynac
44
type: application
5-
version: 1.0.13
5+
version: 2.0.0
66
appVersion: 1.0.0-3-gf45da36
77
dependencies:
88
- name: common
99
repository: oci://registry-1.docker.io/bitnamicharts
1010
version: 2.29.1
11+
- name: nectarlib
12+
version: 3.0.1
13+
repository: oci://registry.rc.nectar.org.au/nectar-helm

templates/NOTES.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
1. Get the application URL by running these commands:
2-
{{- if .Values.ingress.enabled }}
3-
{{- range $host := .Values.ingress.hosts }}
2+
{{- if .Values.api.ingress.enabled }}
3+
{{- range $host := .Values.api.ingress.hosts }}
44
{{- range .paths }}
5-
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
5+
http{{ if $.Values.api.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
66
{{- end }}
77
{{- end }}
88
{{- else if contains "NodePort" .Values.service.type }}
9-
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "taynac.fullname" . }})
9+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "nectarlib.fullname" . }})
1010
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
1111
echo http://$NODE_IP:$NODE_PORT
1212
{{- else if contains "LoadBalancer" .Values.service.type }}
1313
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14-
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "taynac.fullname" . }}'
15-
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "taynac.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
14+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "nectarlib.fullname" . }}'
15+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nectarlib.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
1616
echo http://$SERVICE_IP:{{ .Values.service.port }}
1717
{{- else if contains "ClusterIP" .Values.service.type }}
18-
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "taynac.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
18+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "nectarlib.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
1919
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
2020
echo "Visit http://127.0.0.1:8080 to use your application"
2121
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT

templates/_helpers.tpl

-63
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,3 @@
1-
{{/*
2-
Expand the name of the chart.
3-
*/}}
4-
{{- define "taynac.name" -}}
5-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6-
{{- end }}
7-
8-
{{/*
9-
Create a default fully qualified app name.
10-
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11-
If release name contains chart name it will be used as a full name.
12-
*/}}
13-
{{- define "taynac.fullname" -}}
14-
{{- if .Values.fullnameOverride }}
15-
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16-
{{- else }}
17-
{{- $name := default .Chart.Name .Values.nameOverride }}
18-
{{- if contains $name .Release.Name }}
19-
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20-
{{- else }}
21-
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22-
{{- end }}
23-
{{- end }}
24-
{{- end }}
25-
26-
{{/*
27-
Create chart name and version as used by the chart label.
28-
*/}}
29-
{{- define "taynac.chart" -}}
30-
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31-
{{- end }}
32-
33-
{{/*
34-
Common labels
35-
*/}}
36-
{{- define "taynac.labels" -}}
37-
helm.sh/chart: {{ include "taynac.chart" . }}
38-
{{ include "taynac.selectorLabels" . }}
39-
{{- if .Chart.AppVersion }}
40-
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41-
{{- end }}
42-
app.kubernetes.io/managed-by: {{ .Release.Service }}
43-
{{- end }}
44-
45-
{{/*
46-
Selector labels
47-
*/}}
48-
{{- define "taynac.selectorLabels" -}}
49-
app.kubernetes.io/name: {{ include "taynac.name" . }}
50-
app.kubernetes.io/instance: {{ .Release.Name }}
51-
{{- end }}
52-
53-
{{/*
54-
Create the name of the service account to use
55-
*/}}
56-
{{- define "taynac.serviceAccountName" -}}
57-
{{- if .Values.serviceAccount.create }}
58-
{{- default (include "taynac.fullname" .) .Values.serviceAccount.name }}
59-
{{- else }}
60-
{{- default "default" .Values.serviceAccount.name }}
61-
{{- end }}
62-
{{- end }}
63-
641
{{/*
652
Vault annotations
663
*/}}

templates/api.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{- include "nectarlib.openstack_api" (list $ . .Values.api) -}}

templates/config-map.yaml

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
apiVersion: v1
2-
kind: ConfigMap
3-
metadata:
4-
name: {{ include "taynac.fullname" . }}
5-
annotations:
6-
"helm.sh/hook": pre-install,pre-upgrade
7-
"helm.sh/hook-weight": "2"
8-
data:
9-
taynac.conf: |
10-
{{ include "taynac-conf" . | indent 4 }}
1+
{{- include "nectarlib.configmap" (list . "taynac.configmap") -}}
2+
{{- define "taynac.configmap" -}}
3+
data: {}
4+
{{- end -}}

templates/deployment-api.yaml

-75
This file was deleted.

templates/ingress.yaml

-43
This file was deleted.

templates/pdb-api.yaml

-14
This file was deleted.

templates/service.yaml

-16
This file was deleted.

templates/serviceaccount.yaml

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
1-
{{- if .Values.serviceAccount.create -}}
2-
apiVersion: v1
3-
kind: ServiceAccount
4-
metadata:
5-
name: {{ include "taynac.serviceAccountName" . }}
6-
labels:
7-
{{- include "taynac.labels" . | nindent 4 }}
8-
{{- with .Values.serviceAccount.annotations }}
9-
annotations:
10-
{{- toYaml . | nindent 4 }}
11-
{{- end }}
12-
{{- end }}
1+
{{- include "nectarlib.serviceaccount" . -}}

templates/tests/test-connection.yaml

-15
This file was deleted.

0 commit comments

Comments
 (0)