diff --git a/helm-chart-sources/k8s-metrics-collector/Chart.yaml b/helm-chart-sources/k8s-metrics-collector/Chart.yaml index a5b84fb..685c530 100644 --- a/helm-chart-sources/k8s-metrics-collector/Chart.yaml +++ b/helm-chart-sources/k8s-metrics-collector/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 0.3.20 description: A Helm chart for Kubernetes name: k8s-metrics-collector type: application -version: 0.1.21 +version: 0.1.22 dependencies: - condition: kubePrometheusStack.enabled name: kube-prometheus-stack diff --git a/helm-chart-sources/k8s-metrics-collector/templates/cronjob.yaml b/helm-chart-sources/k8s-metrics-collector/templates/cronjob.yaml index f65710b..b3bca5a 100644 --- a/helm-chart-sources/k8s-metrics-collector/templates/cronjob.yaml +++ b/helm-chart-sources/k8s-metrics-collector/templates/cronjob.yaml @@ -45,6 +45,8 @@ spec: value: {{ .Values.workload }} - name: APP_VERSION value: {{ .Values.image.tag | default .Chart.AppVersion }} + - name: APP_DATA_DIR + value: /tmp/data {{- if .Values.kubePrometheusStack.enabled }} - name: PROMETHEUS_URL value: http://{{ index .Values "kube-prometheus-stack" "fullnameOverride" }}-prometheus:9090 @@ -97,7 +99,13 @@ spec: {{- end }} {{- end }} {{- end }} - + - mountPath: /tmp + name: appdata + subPath: tmp + - mountPath: /var/log + name: appdata + subPath: log + command: ["/bin/sh", "-c", "cp -r /usr/src/app/src/agent/data /tmp && /usr/src/app/entry.sh"] resources: {{- toYaml .Values.resources | nindent 16 }} volumes: @@ -108,6 +116,8 @@ spec: name: {{ include "k8s-metrics-collector.fullname" . }} {{- end }} {{- end }} + - emptyDir: {} + name: appdata {{- with .Values.nodeSelector }} nodeSelector: diff --git a/helm-chart-sources/k8s-metrics-collector/templates/deployment.yaml b/helm-chart-sources/k8s-metrics-collector/templates/deployment.yaml index a4c2525..2598ce6 100644 --- a/helm-chart-sources/k8s-metrics-collector/templates/deployment.yaml +++ b/helm-chart-sources/k8s-metrics-collector/templates/deployment.yaml @@ -43,6 +43,8 @@ spec: value: {{ .Values.workload }} - name: APP_VERSION value: {{ .Values.image.tag | default .Chart.AppVersion }} + - name: APP_DATA_DIR + value: /tmp/data {{- if .Values.kubePrometheusStack.enabled }} - name: PROMETHEUS_URL value: http://{{ index .Values "kube-prometheus-stack" "fullnameOverride" }}-prometheus:9090 @@ -95,6 +97,13 @@ spec: {{- end }} {{- end }} {{- end }} + - mountPath: /tmp + name: appdata + subPath: tmp + - mountPath: /var/log + name: appdata + subPath: log + command: ["/bin/sh", "-c", "cp -r /usr/src/app/src/agent/data /tmp && /usr/src/app/entry.sh"] resources: {{- toYaml .Values.resources | nindent 12 }} volumes: @@ -105,6 +114,8 @@ spec: name: {{ include "k8s-metrics-collector.fullname" . }} {{- end }} {{- end }} + - emptyDir: {} + name: appdata {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/helm-chart-sources/k8s-metrics-collector/values.yaml b/helm-chart-sources/k8s-metrics-collector/values.yaml index dd946f9..59792fe 100644 --- a/helm-chart-sources/k8s-metrics-collector/values.yaml +++ b/helm-chart-sources/k8s-metrics-collector/values.yaml @@ -179,6 +179,7 @@ podSecurityContext: {} # fsGroup: 2000 securityContext: {} + # allowPrivilegeEscalation: false # capabilities: # drop: # - ALL