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

Update node-problem-detector to v0.8.18 #16537

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
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: 7 additions & 5 deletions cmd/kops/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,12 @@ const (
ciliumAddon = "networking.cilium.io-k8s-1.16"
flannelAddon = "networking.flannel-k8s-1.25"

certManagerAddon = "certmanager.io-k8s-1.16"
clusterAutoscalerAddon = "cluster-autoscaler.addons.k8s.io-k8s-1.15"
dnsControllerAddon = "dns-controller.addons.k8s.io-k8s-1.12"
leaderElectionAddon = "leader-migration.rbac.addons.k8s.io-k8s-1.23"
metricsServerAddon = "metrics-server.addons.k8s.io-k8s-1.11"
certManagerAddon = "certmanager.io-k8s-1.16"
clusterAutoscalerAddon = "cluster-autoscaler.addons.k8s.io-k8s-1.15"
dnsControllerAddon = "dns-controller.addons.k8s.io-k8s-1.12"
leaderElectionAddon = "leader-migration.rbac.addons.k8s.io-k8s-1.23"
metricsServerAddon = "metrics-server.addons.k8s.io-k8s-1.11"
nodeProblemDetectorAddon = "node-problem-detector.addons.k8s.io-k8s-1.17"
)

// TestMinimalAWS runs the test on a minimum configuration, similar to kops create cluster minimal.example.com --zones us-west-1a
Expand Down Expand Up @@ -816,6 +817,7 @@ func TestManyAddons(t *testing.T) {
awsEBSCSIAddon,
dnsControllerAddon,
awsCCMAddon,
nodeProblemDetectorAddon,
).
runTestTerraformAWS(t)
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/model/components/nodeproblemdetector.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,27 @@ func (b *NodeProblemDetectorOptionsBuilder) BuildOptions(o interface{}) error {
}

if npd.CPURequest == nil {
defaultCPURequest := resource.MustParse("10m")
defaultCPURequest := resource.MustParse("20m")
npd.CPURequest = &defaultCPURequest
}

if npd.MemoryRequest == nil {
defaultMemoryRequest := resource.MustParse("80Mi")
defaultMemoryRequest := resource.MustParse("100Mi")
npd.MemoryRequest = &defaultMemoryRequest
}

if npd.CPULimit == nil {
defaultCPULimit := resource.MustParse("10m")
defaultCPULimit := resource.MustParse("200m")
npd.CPULimit = &defaultCPULimit
}

if npd.MemoryLimit == nil {
defaultMemoryLimit := resource.MustParse("80Mi")
defaultMemoryLimit := resource.MustParse("100Mi")
npd.MemoryLimit = &defaultMemoryLimit
}

if npd.Image == nil {
npd.Image = fi.PtrTo("registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.12")
npd.Image = fi.PtrTo("registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.18")
}

return nil
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/templates/many-addons.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ spec:
enabled: true
nodePortAccess:
- 0.0.0.0/0
nodeProblemDetector:
enabled: true
nodeTerminationHandler:
enabled: true
enableSQSTerminationDraining: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ spec:
networkCIDR: 172.20.0.0/16
networking:
amazonvpc: {}
nodeProblemDetector:
cpuLimit: 200m
cpuRequest: 20m
enabled: true
image: registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.18
memoryLimit: 100Mi
memoryRequest: 100Mi
nodeTerminationHandler:
cpuRequest: 50m
enableRebalanceDraining: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,55 @@ spec:
selector:
k8s-addon: node-termination-handler.aws
version: 9.99.0
- id: k8s-1.17
manifest: node-problem-detector.addons.k8s.io/k8s-1.17.yaml
manifestHash: c5efa7accf480cced0a3610be297e7109361d2a8c101e3dce086d256ec7e706f
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
- id: k8s-1.19
manifest: aws-load-balancer-controller.addons.k8s.io/k8s-1.19.yaml
manifestHash: 11a3bab6b2bb71c805901ade80e93d2eec8b8cb4e40ff84519148b6b2f49e3f0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: null
labels:
addon.kops.k8s.io/name: node-problem-detector.addons.k8s.io
app: node-problem-detector
app.kubernetes.io/managed-by: kops
k8s-addon: node-problem-detector.addons.k8s.io
name: node-problem-detector
namespace: kube-system

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
labels:
addon.kops.k8s.io/name: node-problem-detector.addons.k8s.io
app: node-problem-detector
app.kubernetes.io/managed-by: kops
k8s-addon: node-problem-detector.addons.k8s.io
name: node-problem-detector
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:node-problem-detector
subjects:
- kind: ServiceAccount
name: node-problem-detector
namespace: kube-system

---

apiVersion: apps/v1
kind: DaemonSet
metadata:
creationTimestamp: null
labels:
addon.kops.k8s.io/name: node-problem-detector.addons.k8s.io
app: node-problem-detector
app.kubernetes.io/managed-by: kops
k8s-addon: node-problem-detector.addons.k8s.io
name: node-problem-detector
namespace: kube-system
spec:
selector:
matchLabels:
app: node-problem-detector
template:
metadata:
creationTimestamp: null
labels:
app: node-problem-detector
kops.k8s.io/managed-by: kops
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- linux
containers:
- command:
- /node-problem-detector
- --logtostderr
- --config.system-log-monitor=/config/kernel-monitor.json,/config/systemd-monitor.json
- --config.custom-plugin-monitor=/config/kernel-monitor-counter.json,/config/systemd-monitor-counter.json,/config/health-checker-containerd.json,/config/health-checker-kubelet.json
- --config.system-stats-monitor=/config/system-stats-monitor.json
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.18
name: node-problem-detector
resources:
limits:
cpu: 200m
memory: 100Mi
requests:
cpu: 20m
memory: 100Mi
securityContext:
privileged: true
volumeMounts:
- mountPath: /var/log
name: log
readOnly: true
- mountPath: /dev/kmsg
name: kmsg
readOnly: true
- mountPath: /etc/localtime
name: localtime
readOnly: true
- mountPath: /etc/machine-id
name: machine-id
readOnly: true
- mountPath: /run/systemd/system
name: systemd
- mountPath: /var/run/dbus/
mountPropagation: Bidirectional
name: dbus
priorityClassName: system-node-critical
serviceAccountName: node-problem-detector
tolerations:
- effect: NoExecute
operator: Exists
- effect: NoSchedule
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
volumes:
- hostPath:
path: /var/log/
name: log
- hostPath:
path: /dev/kmsg
name: kmsg
- hostPath:
path: /etc/localtime
type: FileOrCreate
name: localtime
- hostPath:
path: /etc/machine-id
type: File
name: machine-id
- hostPath:
path: /run/systemd/system/
type: ""
name: systemd
- hostPath:
path: /var/run/dbus/
type: ""
name: dbus
2 changes: 2 additions & 0 deletions tests/integration/update_cluster/many-addons/in-v1alpha2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
networkCIDR: 172.20.0.0/16
networking:
amazonvpc: {}
nodeProblemDetector:
enabled: true
nodeTerminationHandler:
enabled: true
nonMasqueradeCIDR: 172.20.0.0/16
Expand Down
8 changes: 8 additions & 0 deletions tests/integration/update_cluster/many-addons/kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,14 @@ resource "aws_s3_object" "many-addons-example-com-addons-networking-amazon-vpc-r
server_side_encryption = "AES256"
}

resource "aws_s3_object" "many-addons-example-com-addons-node-problem-detector-addons-k8s-io-k8s-1-17" {
bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_many-addons.example.com-addons-node-problem-detector.addons.k8s.io-k8s-1.17_content")
key = "tests/many-addons.example.com/addons/node-problem-detector.addons.k8s.io/k8s-1.17.yaml"
provider = aws.files
server_side_encryption = "AES256"
}

resource "aws_s3_object" "many-addons-example-com-addons-node-termination-handler-aws-k8s-1-11" {
bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_many-addons.example.com-addons-node-termination-handler.aws-k8s-1.11_content")
Expand Down
Loading
Loading