Skip to content

Commit

Permalink
Enable node-problem-detector addon pruning
Browse files Browse the repository at this point in the history
  • Loading branch information
hakman committed May 7, 2024
1 parent ab73590 commit e5091d8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,48 @@ spec:
manifest: node-problem-detector.addons.k8s.io/k8s-1.17.yaml
manifestHash: a6c58f20acc650a2dd0dbc78daaf4f03f5ad2fc340942036f6afef7ed67bb014
name: node-problem-detector.addons.k8s.io
prune:
kinds:
- kind: ConfigMap
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- kind: Service
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- kind: ServiceAccount
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
namespaces:
- kube-system
- group: admissionregistration.k8s.io
kind: MutatingWebhookConfiguration
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- group: admissionregistration.k8s.io
kind: ValidatingWebhookConfiguration
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- group: apps
kind: DaemonSet
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
namespaces:
- kube-system
- group: apps
kind: Deployment
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- group: apps
kind: StatefulSet
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- group: policy
kind: PodDisruptionBudget
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- group: rbac.authorization.k8s.io
kind: ClusterRole
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- group: rbac.authorization.k8s.io
kind: ClusterRoleBinding
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- group: rbac.authorization.k8s.io
kind: Role
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
- group: rbac.authorization.k8s.io
kind: RoleBinding
labelSelector: addon.kops.k8s.io/name=node-problem-detector.addons.k8s.io,app.kubernetes.io/managed-by=kops
selector:
k8s-addon: node-problem-detector.addons.k8s.io
version: 9.99.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,12 +620,13 @@ func (b *BootstrapChannelBuilder) buildAddons(c *fi.CloudupModelBuilderContext)
location := key + "/k8s-1.17.yaml"
id := "k8s-1.17"

addons.Add(&channelsapi.AddonSpec{
addon := addons.Add(&channelsapi.AddonSpec{
Name: fi.PtrTo(key),
Selector: map[string]string{"k8s-addon": key},
Manifest: fi.PtrTo(location),
Id: id,
})
addon.BuildPrune = true
}
}

Expand Down

0 comments on commit e5091d8

Please sign in to comment.