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/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 6bc61ff..ab22aaf 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..2e0e2b7 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 @@ -95,6 +99,9 @@ affinity: {} # type of storage pvc, directVolume -defaults to emptyDir storageType: emptyDir +accessModes: + - ReadWriteMany + # example pvc values # storage: "500Mi" # storageClassName: ""