Skip to content

Commit

Permalink
refactor: use $.core.v1.envVar (#2460)
Browse files Browse the repository at this point in the history
  • Loading branch information
Duologic authored Aug 7, 2020
1 parent f8ee408 commit c4fb17f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions production/ksonnet/loki-canary/loki-canary.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ k + config {
container.withPorts($.core.v1.containerPort.new(name='http-metrics', port=80)) +
container.withArgsMixin($.util.mapToFlags($.loki_canary_args)) +
container.withEnv([
container.envType.fromFieldPath('HOSTNAME', 'spec.nodeName'),
container.envType.fromFieldPath('POD_NAME', 'metadata.name'),
$.core.v1.envVar.fromFieldPath('HOSTNAME', 'spec.nodeName'),
$.core.v1.envVar.fromFieldPath('POD_NAME', 'metadata.name'),
]),

local daemonSet = $.apps.v1.daemonSet,
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/promtail/promtail.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ k + config + scrape_config {
container.withPorts($.core.v1.containerPort.new(name='http-metrics', port=80)) +
container.withArgsMixin($.util.mapToFlags($.promtail_args)) +
container.withEnv([
container.envType.fromFieldPath('HOSTNAME', 'spec.nodeName'),
$.core.v1.envVar.fromFieldPath('HOSTNAME', 'spec.nodeName'),
]) +
container.mixin.readinessProbe.httpGet.withPath('/ready') +
container.mixin.readinessProbe.httpGet.withPort(80) +
Expand Down

0 comments on commit c4fb17f

Please sign in to comment.