Skip to content

Commit

Permalink
Switch to use nectarlib
Browse files Browse the repository at this point in the history
Change-Id: I50619accf6562561b02aa0cef8d32d408062ee83
  • Loading branch information
sorrison committed Jan 31, 2025
1 parent 0c78710 commit 50dd62b
Show file tree
Hide file tree
Showing 20 changed files with 82 additions and 511 deletions.
7 changes: 5 additions & 2 deletions Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.29.1
digest: sha256:7bf3bb546e534cd64cc861f46fcfe30e11055c6083df54a64539744ecbab018a
generated: "2025-01-27T03:23:33.593578999Z"
- name: nectarlib
repository: oci://registry.rc.nectar.org.au/nectar-helm
version: 3.0.1
digest: sha256:8f5f725db1e4c84a1bfe4ef41bf0c04044e021d758faa984e37357d0b18034c0
generated: "2025-01-31T14:52:27.943234987+11:00"
5 changes: 4 additions & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ apiVersion: v2
name: warre
description: A Helm chart for warre
type: application
version: 2.4.7
version: 3.0.0
appVersion: 5.0.0-7-g9b4ea80
sources:
- https://github.com/NeCTAR-RC/warre-helm.git
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.29.1
- name: nectarlib
version: 3.0.1
repository: oci://registry.rc.nectar.org.au/nectar-helm
14 changes: 7 additions & 7 deletions templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- if .Values.api.ingress.enabled }}
{{- range $host := .Values.api.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
http{{ if $.Values.api.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "warre.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "nectarlib.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "warre.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "warre.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "nectarlib.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nectarlib.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "warre.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
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}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
Expand Down
63 changes: 0 additions & 63 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,66 +1,3 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "warre.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 "warre.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 "warre.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "warre.labels" -}}
helm.sh/chart: {{ include "warre.chart" . }}
{{ include "warre.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "warre.selectorLabels" -}}
app.kubernetes.io/name: {{ include "warre.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "warre.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "warre.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Vault annotations
*/}}
Expand Down
1 change: 1 addition & 0 deletions templates/api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "nectarlib.openstack_api" (list $ . .Values.api) -}}
14 changes: 4 additions & 10 deletions templates/config-map.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "warre.fullname" . }}
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "2"
data:
warre.conf: |
{{ include "warre-conf" . | indent 4 }}
{{- include "nectarlib.configmap" (list . "warre.configmap") -}}
{{- define "warre.configmap" -}}
data: {}
{{- end -}}
75 changes: 0 additions & 75 deletions templates/deployment-api.yaml

This file was deleted.

64 changes: 0 additions & 64 deletions templates/deployment-notification.yaml

This file was deleted.

64 changes: 0 additions & 64 deletions templates/deployment-worker.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions templates/hpa.yaml

This file was deleted.

Loading

0 comments on commit 50dd62b

Please sign in to comment.