fix: Adhere to naming convention in values.yaml

This commit is contained in:
Danny Bessems 2023-07-14 10:37:10 +02:00
parent d09d09e526
commit 614fda9b7d
4 changed files with 12 additions and 12 deletions

View File

@ -48,7 +48,7 @@ steps:
pull: always
commands:
- |
export IMAGE_TAG=$(cat .version 2> /dev/null) && [ -n "$IMAGE_TAG" ] || (echo 'No release tag - exiting'; exit 0)
export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || (echo 'No release tag - exiting'; exit 0)
- |
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
chmod +x /bin/jq
@ -59,7 +59,7 @@ steps:
--dockerfile=Dockerfile \
--context=dir://. \
--destination=bv11-cr01.bessems.eu/library/json-server:latest \
--destination=bv11-cr01.bessems.eu/library/json-server:$IMAGE_TAG
--destination=bv11-cr01.bessems.eu/library/json-server:$VALID_TAG
environment:
HARBOR_USERNAME:
from_secret: harbor_username
@ -73,7 +73,7 @@ steps:
pull: always
commands:
- |
export IMAGE_TAG=$(cat .version 2> /dev/null) && [ -n "$IMAGE_TAG" ] || (echo 'No release tag - exiting'; exit 0)
export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || (echo 'No release tag - exiting'; exit 0)
- |
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
chmod +x /bin/jq
@ -84,7 +84,7 @@ steps:
--dockerfile=Dockerfile \
--context=dir://. \
--destination=docker.io/djpbessems/json-server:latest \
--destination=docker.io/djpbessems/json-server:$IMAGE_TAG
--destination=docker.io/djpbessems/json-server:$VALID_TAG
environment:
DOCKER_USERNAME:
from_secret: docker_username
@ -98,9 +98,9 @@ steps:
pull: always
commands:
- |
export CHART_VERSION=$(cat .version 2> /dev/null) && [ -n "$CHART_VERSION" ] || (echo 'No release tag - exiting'; exit 0)
sed -i 's/{{ chart_version }}/'$CHART_VERSION'/g' charts/json-server/Chart.yaml
sed -i 's/tag: latest/tag: '$CHART_VERSION'/g' charts/json-server/values.yaml
export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || (echo 'No release tag - exiting'; exit 0)
sed -i 's/{{ chart_version }}/'$VALID_TAG'/g' charts/json-server/Chart.yaml
sed -i 's/{{ image_tag }}/'$VALID_TAG'/g' charts/json-server/values.yaml
- |
helm package ./charts/json-server
- |

View File

@ -1,4 +1,4 @@
{{- if not .Values.json-server.seedData.existingConfigMap }}
{{- if not .Values.jsonServer.seedData.existingConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -29,8 +29,8 @@ spec:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.json-server.image.repository }}:{{ .Values.json-server.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.json-server.image.pullPolicy }}
image: "{{ .Values.jsonServer.image.repository }}:{{ .Values.jsonServer.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.jsonServer.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}

View File

@ -1,6 +1,6 @@
# Default values for json-server.
json-server:
jsonServer:
seedData:
# Not implemented yet
# existingConfigMap: ""
@ -10,7 +10,7 @@ json-server:
repository: bv11-cr01.bessems.eu/library/json-server
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: latest
tag: {{ image_tag }}
sidecar:
image: