Skip to content

Commit

Permalink
examples generated from libsonnet
Browse files Browse the repository at this point in the history
Signed-off-by: 蓝宝石的傻话 <[email protected]>
  • Loading branch information
mickeyzzc committed Oct 12, 2023
1 parent 539f57d commit d33929e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/daemonsetsharding/deployment-no-node-pods.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Deployment
metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/name: kube-state-metrics-global
app.kubernetes.io/version: 2.10.0
name: kube-state-metrics-pods
name: kube-state-metrics-global
namespace: kube-system
spec:
replicas: 1
Expand Down
24 changes: 24 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,30 @@
},
),

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

daemonset:
// extending the default container from above
local c0 = ksm.deployment.spec.template.spec.containers[0] {
Expand Down
1 change: 0 additions & 1 deletion pkg/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ type Options struct {
Namespaces NamespaceList `yaml:"namespaces"`
NamespacesDenylist NamespaceList `yaml:"namespaces_denylist"`
Node NodeType `yaml:"node"`
NoNodeScrape bool `yaml:"no_node_scrape"`
Pod string `yaml:"pod"`
Port int `yaml:"port"`
Resources ResourceSet `yaml:"resources"`
Expand Down

0 comments on commit d33929e

Please sign in to comment.