Skip to content

Commit

Permalink
pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Joatin committed Jan 7, 2025
1 parent 06abe86 commit da82094
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/ocpp-csms-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/ocpp-csms-server/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions charts/ocpp-csms-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}

Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/ocpp-csms-server/templates/ocpp-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/ocpp-csms-server/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/ocpp-csms-server/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ 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:
containers:
- 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

0 comments on commit da82094

Please sign in to comment.