diff --git a/charts/well-known/ci/pluto-values.yaml b/charts/well-known/ci/pluto-values.yaml new file mode 100644 index 0000000..36fa70e --- /dev/null +++ b/charts/well-known/ci/pluto-values.yaml @@ -0,0 +1,5 @@ +ingress: + enabled: true + +autoscaling: + enabled: true diff --git a/charts/well-known/templates/deployment.yaml b/charts/well-known/templates/deployment.yaml index 68ace3d..734c915 100644 --- a/charts/well-known/templates/deployment.yaml +++ b/charts/well-known/templates/deployment.yaml @@ -42,7 +42,9 @@ spec: mountPath: /etc/nginx/conf.d/default.conf subPath: default.conf - name: data - mountPath: /usr/share/nginx/html + mountPath: /usr/share/nginx/html/.well-known + - mountPath: /tmp + name: tmp-volume resources: {{- toYaml .Values.webserver.resources | nindent 12 }} - name: {{ .Chart.Name }} @@ -51,7 +53,8 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} args: [ - "-namespace", "{{ .Release.Namespace }}" + "-namespace", "{{ .Release.Namespace }}", + "-configmap", "{{ include "well-known.fullname" . }}-data" ] env: - name: POD_NAME @@ -81,3 +84,5 @@ spec: configMap: name: {{ include "well-known.fullname" . }}-data optional: true + - name: tmp-volume + emptyDir: {} \ No newline at end of file diff --git a/charts/well-known/templates/hpa.yaml b/charts/well-known/templates/hpa.yaml index 41c0a86..e594e56 100644 --- a/charts/well-known/templates/hpa.yaml +++ b/charts/well-known/templates/hpa.yaml @@ -1,5 +1,9 @@ {{- if .Values.autoscaling.enabled }} +{{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: autoscaling/v2 +{{- else -}} apiVersion: autoscaling/v2beta1 +{{- end }} kind: HorizontalPodAutoscaler metadata: name: {{ include "well-known.fullname" . }} @@ -17,12 +21,20 @@ spec: - type: Resource resource: name: cpu + {{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion }} + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- else -}} targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory + {{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion }} + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- else -}} targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/well-known/values.yaml b/charts/well-known/values.yaml index f7de1f7..db6b81d 100644 --- a/charts/well-known/values.yaml +++ b/charts/well-known/values.yaml @@ -75,7 +75,7 @@ ingress: hosts: - host: chart-example.local paths: - - path: / + - path: /.well-known/ pathType: ImplementationSpecific tls: [] # - secretName: chart-example-tls