From b7273bf567b2ddcaf34b238165b2e07b2ad3210a Mon Sep 17 00:00:00 2001 From: Matthias Loibl <mail@matthiasloibl.com> Date: Mon, 12 Nov 2018 11:28:37 +0100 Subject: [PATCH] contrib/kube-prometheues: Mount emptyDir as tmpfs to /tmp in adapter --- .../prometheus-adapter/prometheus-adapter.libsonnet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jsonnet/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet b/jsonnet/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet index 177fb197..16189d39 100644 --- a/jsonnet/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet +++ b/jsonnet/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet @@ -103,6 +103,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; ]) + container.withPorts([{ containerPort: 6443 }]) + container.withVolumeMounts([ + containerVolumeMount.new('tmpfs', '/tmp'), containerVolumeMount.new('volume-serving-cert', '/var/run/serving-cert'), containerVolumeMount.new('config', '/etc/adapter'), ],); @@ -112,7 +113,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; deployment.mixin.spec.selector.withMatchLabels($._config.prometheusAdapter.labels) + deployment.mixin.spec.template.spec.withServiceAccountName($.prometheusAdapter.serviceAccount.metadata.name) + deployment.mixin.spec.template.spec.withVolumes([ - // volume.fromSecret('volume-serving-cert', 'cm-adapter-serving-certs'), + volume.fromEmptyDir(name='tmpfs'), volume.fromEmptyDir(name='volume-serving-cert'), { name: 'config', configMap: { name: 'adapter-config' } }, ]), -- GitLab