Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix daemonset does not generate manifest #434

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ksonnet-util/grafana.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
local appsExtentions = {
daemonSet+: {
new(name, containers, podLabels={})::
super.new(name, containers, podLabels={}) +
local labels = podLabels { name: name };

super.new() +
super.mixin.metadata.withName(name) +
super.mixin.spec.template.metadata.withLabels(labels) +
super.mixin.spec.template.spec.withContainers(containers) +

// Can't think of a reason we wouldn't want a DaemonSet to run on
// every node.
Expand All @@ -37,7 +42,10 @@
// We want to specify a minReadySeconds on every deamonset, so we get some
// very basic canarying, for instance, with bad arguments.
super.mixin.spec.withMinReadySeconds(10) +
super.mixin.spec.updateStrategy.withType('RollingUpdate'),
super.mixin.spec.updateStrategy.withType('RollingUpdate') +

// apps.v1 requires an explicit selector:
super.mixin.spec.selector.withMatchLabels(labels),
},

deployment+: {
Expand Down