From 7ea4b8e36f594a722878196819b221e2ac2b6d96 Mon Sep 17 00:00:00 2001 From: Rajat Vig Date: Sun, 17 Mar 2019 22:53:50 -0700 Subject: [PATCH 1/3] Add options to allow override of resources and replicas for grafana container pods --- grafana/grafana.libsonnet | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/grafana/grafana.libsonnet b/grafana/grafana.libsonnet index f501d16..34a90c7 100644 --- a/grafana/grafana.libsonnet +++ b/grafana/grafana.libsonnet @@ -26,6 +26,11 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; config: {}, ldap: null, plugins: [], + container: { + replicas: 1, + requests: { cpu: '100m', memory: '100Mi' }, + limits: { cpu: '200m', memory: '200Mi' }, + }, }, }, grafanaDashboards: {}, @@ -137,10 +142,10 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; container.withPorts(containerPort.newNamed(portName, targetPort)) + container.mixin.readinessProbe.httpGet.withPath('/api/health') + container.mixin.readinessProbe.httpGet.withPort(portName) + - container.mixin.resources.withRequests({ cpu: '100m', memory: '100Mi' }) + - container.mixin.resources.withLimits({ cpu: '200m', memory: '200Mi' }); + container.mixin.resources.withRequests($._config.grafana.container.requests) + + container.mixin.resources.withLimits($._config.grafana.container.limits); - deployment.new('grafana', 1, c, podLabels) + + deployment.new('grafana', $._config.grafana.container.replicas, c, podLabels) + deployment.mixin.metadata.withNamespace($._config.namespace) + deployment.mixin.metadata.withLabels(podLabels) + deployment.mixin.spec.selector.withMatchLabels(podLabels) + From 7d9fd6806fae83d26f11f03054587c0bbb367ef6 Mon Sep 17 00:00:00 2001 From: Rajat Vig Date: Sun, 17 Mar 2019 22:55:27 -0700 Subject: [PATCH 2/3] Bump Grafana version --- grafana/grafana.libsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grafana/grafana.libsonnet b/grafana/grafana.libsonnet index 34a90c7..944e897 100644 --- a/grafana/grafana.libsonnet +++ b/grafana/grafana.libsonnet @@ -5,7 +5,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; namespace: 'default', versions+:: { - grafana: '5.2.4', + grafana: '5.4.3', }, imageRepos+:: { From bbe6468747a375adc67d86f37cbc129e15b82ea5 Mon Sep 17 00:00:00 2001 From: Rajat Vig Date: Mon, 18 Mar 2019 09:08:39 -0700 Subject: [PATCH 3/3] Use 6.0.1 version of Grafana --- grafana/grafana.libsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grafana/grafana.libsonnet b/grafana/grafana.libsonnet index 944e897..71fe2dd 100644 --- a/grafana/grafana.libsonnet +++ b/grafana/grafana.libsonnet @@ -5,7 +5,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; namespace: 'default', versions+:: { - grafana: '5.4.3', + grafana: '6.0.1', }, imageRepos+:: {