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

View File

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

View File

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