From da82094ad8b1ca855a4cd260a868f725ed3aa284 Mon Sep 17 00:00:00 2001 From: Joatin Granlund Date: Tue, 7 Jan 2025 20:51:14 +0100 Subject: [PATCH] pipeline --- charts/ocpp-csms-server/Chart.yaml | 2 +- charts/ocpp-csms-server/templates/NOTES.txt | 4 ++-- charts/ocpp-csms-server/templates/_helpers.tpl | 8 ++++---- charts/ocpp-csms-server/templates/ocpp-deployment.yaml | 2 +- charts/ocpp-csms-server/templates/serviceaccount.yaml | 4 ++-- .../ocpp-csms-server/templates/tests/test-connection.yaml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charts/ocpp-csms-server/Chart.yaml b/charts/ocpp-csms-server/Chart.yaml index b5624ef..2ea26ed 100644 --- a/charts/ocpp-csms-server/Chart.yaml +++ b/charts/ocpp-csms-server/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.2 +version: 0.1.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/ocpp-csms-server/templates/NOTES.txt b/charts/ocpp-csms-server/templates/NOTES.txt index b16d884..617c504 100644 --- a/charts/ocpp-csms-server/templates/NOTES.txt +++ b/charts/ocpp-csms-server/templates/NOTES.txt @@ -9,12 +9,12 @@ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "ocpp-csms-server.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 }} +{{- else if contains "LoadBalancer" .Values.ocpp.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "ocpp-csms-server.fullname" . }}' export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "ocpp-csms-server.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.ocpp.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} +{{- else if contains "ClusterIP" .Values.ocpp.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "ocpp-csms-server.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" diff --git a/charts/ocpp-csms-server/templates/_helpers.tpl b/charts/ocpp-csms-server/templates/_helpers.tpl index a409d85..edca45c 100644 --- a/charts/ocpp-csms-server/templates/_helpers.tpl +++ b/charts/ocpp-csms-server/templates/_helpers.tpl @@ -34,8 +34,8 @@ Create chart name and version as used by the chart label. Common labels */}} {{- define "ocpp-csms-server.labels" -}} -helm.sh/chart: {{ include "test.chart" . }} -{{ include "test.selectorLabels" . }} +helm.sh/chart: {{ include "ocpp-csms-server.chart" . }} +{{ include "ocpp-csms-server.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -46,7 +46,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define "ocpp-csms-server.selectorLabels" -}} -app.kubernetes.io/name: {{ include "test.name" . }} +app.kubernetes.io/name: {{ include "ocpp-csms-server.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} @@ -55,7 +55,7 @@ Create the name of the service account to use */}} {{- define "ocpp-csms-server.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "test.fullname" .) .Values.serviceAccount.name }} +{{- default (include "ocpp-csms-server.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} diff --git a/charts/ocpp-csms-server/templates/ocpp-deployment.yaml b/charts/ocpp-csms-server/templates/ocpp-deployment.yaml index a9ec9cd..c394233 100644 --- a/charts/ocpp-csms-server/templates/ocpp-deployment.yaml +++ b/charts/ocpp-csms-server/templates/ocpp-deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: {{ include "ocpp-csms-server.fullname" . }} labels: - {{- include "test.labels" . | nindent 4 }} + {{- include "ocpp-csms-server.labels" . | nindent 4 }} spec: {{- if not .Values.ocpp.autoscaling.enabled }} replicas: {{ .Values.ocpp.replicaCount }} diff --git a/charts/ocpp-csms-server/templates/serviceaccount.yaml b/charts/ocpp-csms-server/templates/serviceaccount.yaml index 0fc7571..115a725 100644 --- a/charts/ocpp-csms-server/templates/serviceaccount.yaml +++ b/charts/ocpp-csms-server/templates/serviceaccount.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "test.serviceAccountName" . }} + name: {{ include "ocpp-csms-server.serviceAccountName" . }} labels: - {{- include "test.labels" . | nindent 4 }} + {{- include "ocpp-csms-server.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/ocpp-csms-server/templates/tests/test-connection.yaml b/charts/ocpp-csms-server/templates/tests/test-connection.yaml index d7d0b3e..764a0de 100644 --- a/charts/ocpp-csms-server/templates/tests/test-connection.yaml +++ b/charts/ocpp-csms-server/templates/tests/test-connection.yaml @@ -3,7 +3,7 @@ kind: Pod metadata: name: "{{ include "ocpp-csms-server.fullname" . }}-test-connection" labels: - { { - include "ocpp-csms-server.labels" . | nindent 4 } } + {{ include "ocpp-csms-server.labels" . | nindent 4 }} annotations: "helm.sh/hook": test spec: @@ -11,5 +11,5 @@ spec: - name: wget image: busybox command: [ 'wget' ] - args: [ '{{ include "test.fullname" . }}:{{ .Values.service.port }}' ] + args: [ '{{ include "ocpp-csms-server.fullname" . }}:{{ .Values.ocpp.service.port }}' ] restartPolicy: Never