From b733e4554af7da2f41e7349c99f8d08df1687b19 Mon Sep 17 00:00:00 2001 From: Benjamin Gonzva Date: Thu, 27 Feb 2025 16:34:29 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=93=8C=20(feat)=20add=20external=20na?= =?UTF-8?q?me=20service=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/service.yaml | 6 +++++- values.yaml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/service.yaml b/templates/service.yaml index 6bc61ff..db5cdcf 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.service.enabled "true"}} # Copyright 2020 Keyporttech Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +14,6 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. - apiVersion: v1 kind: Service metadata: @@ -22,6 +22,9 @@ metadata: {{- include "dynamodb-helm-chart.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} + {{- if .Values.service.externalName }} + externalName: {{ .Values.service.externalName | quote }} + {{- end }} ports: - port: 8000 targetPort: 8000 @@ -33,3 +36,4 @@ spec: name: admin selector: {{- include "dynamodb-helm-chart.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/values.yaml b/values.yaml index 94b0856..8b55417 100644 --- a/values.yaml +++ b/values.yaml @@ -55,7 +55,11 @@ securityContext: {} # runAsUser: 1000 service: - type: ClusterIP + enabled: true + type: ClusterIP # Can be ClusterIP or ExternalName + + # If type: ExternalName + # externalName: "" ingress: enabled: false From 522ac058f77e50a135c9cbad922d6381709e8eb9 Mon Sep 17 00:00:00 2001 From: Benjamin Gonzva Date: Thu, 27 Feb 2025 17:36:17 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=9B=20(fix)=20typos=20bugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Chart.yaml | 2 +- templates/service.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index a298c14..caf8dc9 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -23,7 +23,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.27 +version: 0.1.28 # This is the version number of the application being deployed. This version number should be diff --git a/templates/service.yaml b/templates/service.yaml index db5cdcf..288a53e 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -1,4 +1,4 @@ -{{- if eq .Values.service.enabled "true"}} +{{- if eq .Values.service.enabled true }} # Copyright 2020 Keyporttech Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ metadata: spec: type: {{ .Values.service.type }} {{- if .Values.service.externalName }} - externalName: {{ .Values.service.externalName | quote }} + externalName: {{ .Values.service.externalName | quote }} {{- end }} ports: - port: 8000 From b0a0dc53cfb8fdf3145bdef29a386a6c470ba2e8 Mon Sep 17 00:00:00 2001 From: Benjamin Gonzva Date: Thu, 27 Feb 2025 19:14:31 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=8E=A8=20(feat)=20add=20modulable=20a?= =?UTF-8?q?ccessModes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/pvc.yaml | 2 +- templates/service.yaml | 2 +- values.yaml | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/pvc.yaml b/templates/pvc.yaml index 1eb3ef1..3f7c60e 100644 --- a/templates/pvc.yaml +++ b/templates/pvc.yaml @@ -23,7 +23,7 @@ metadata: chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" spec: accessModes: - - ReadWriteMany + {{- toYaml .Values.accessModes | nindent 2 }} resources: requests: storage: {{ .Values.storage }} diff --git a/templates/service.yaml b/templates/service.yaml index 288a53e..ab22aaf 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -23,7 +23,7 @@ metadata: spec: type: {{ .Values.service.type }} {{- if .Values.service.externalName }} - externalName: {{ .Values.service.externalName | quote }} + externalName: {{ .Values.service.externalName | quote }} {{- end }} ports: - port: 8000 diff --git a/values.yaml b/values.yaml index 8b55417..2e0e2b7 100644 --- a/values.yaml +++ b/values.yaml @@ -99,6 +99,9 @@ affinity: {} # type of storage pvc, directVolume -defaults to emptyDir storageType: emptyDir +accessModes: + - ReadWriteMany + # example pvc values # storage: "500Mi" # storageClassName: ""