Skip to content

Commit

Permalink
examples generated from libsonnet
Browse files Browse the repository at this point in the history
Signed-off-by: 蓝宝石的傻话 <mickey_zzc@163.com>
  • Loading branch information
mickeyzzc committed Oct 12, 2023
1 parent 539f57d commit dff7885
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/daemonsetsharding/deployment-no-node-pods.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.10.0
name: kube-state-metrics-pods
name: kube-state-metrics
namespace: kube-system
spec:
replicas: 1
Expand Down
20 changes: 20 additions & 0 deletions jsonnet/kube-state-metrics/kube-state-metrics.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,26 @@
},
),

deploymentNoNodePods:
local c = ksm.deployment.spec.template.spec.containers[0] {
args: [
'--resources=pods',
'--node=""',
],
};
local shardksmname = ksm.name + "-pods";
std.mergePatch(ksm.deployment,
{
spec: {
template: {
spec: {
containers: [c],
},
},
},
},
),

daemonset:
// extending the default container from above
local c0 = ksm.deployment.spec.template.spec.containers[0] {
Expand Down

0 comments on commit dff7885

Please sign in to comment.