Skip to content

Commit 1c12c74

Browse files
redbaronMaxim Ivanov
authored andcommitted
Better separataio for deployments and services
1 parent 7ce2b7f commit 1c12c74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

grafana/grafana.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ local configMapList = k.core.v1.configMapList;
7272
local grafanaServiceNodePort = servicePort.newNamed('http', 3000, 'http');
7373

7474
service.new($._config.grafana.name, $.grafana.deployment.spec.selector.matchLabels, grafanaServiceNodePort) +
75-
service.mixin.metadata.withLabels({ app: 'grafana' }) +
75+
service.mixin.metadata.withLabels({ app: $._config.grafana.name }) +
7676
service.mixin.metadata.withNamespace($._config.namespace),
7777
serviceAccount:
7878
local serviceAccount = k.core.v1.serviceAccount;
@@ -89,7 +89,7 @@ local configMapList = k.core.v1.configMapList;
8989

9090
local targetPort = 3000;
9191
local portName = 'http';
92-
local podLabels = { app: 'grafana' };
92+
local podLabels = { app: $._config.grafana.name };
9393

9494
local configVolumeName = 'grafana-config';
9595
local configVolume = volume.withName(configVolumeName) + volume.mixin.secret.withSecretName(self.config.metadata.name);

0 commit comments

Comments
 (0)