Skip to content
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
10 changes: 10 additions & 0 deletions deployment/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

# Basic node-problem-detector install (system-log-monitor only). Lets the
# manifests be consumed as a kustomize base, e.g. `kubectl apply -k deployment/`
# or from the e2e overlay in test/e2e/manifests/.
resources:
- rbac.yaml
- node-problem-detector-config.yaml
- node-problem-detector.yaml
42 changes: 42 additions & 0 deletions test/e2e/manifests/deploy-npd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash

# Copyright 2026 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Deploys node-problem-detector as a DaemonSet onto a running cluster for the
# GCE cluster e2e jobs, which exercise k8s.io/kubernetes
# test/e2e/node/node_problem_detector.go. The kube-up NPD addon was removed from
# kubernetes/kubernetes, so that test falls back to looking for a
# "node-problem-detector" pod; this script provides it.
#
# The image comes from the per-branch community staging registry, matching the
# node e2e job (see test/build.sh). PULL_BASE_REF is set by Prow to the base
# branch under test and defaults to master for local runs.

set -o errexit
set -o nounset
set -o pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly SCRIPT_DIR
readonly IMAGE="gcr.io/k8s-staging-npd/node-problem-detector"
readonly TAG="${PULL_BASE_REF:-master}"

echo "Deploying node-problem-detector DaemonSet (image tag: ${TAG})..."
kubectl kustomize "${SCRIPT_DIR}" |
sed -E "s|image: ${IMAGE}:[^[:space:]]+|image: ${IMAGE}:${TAG}|" |
kubectl apply -f -

echo "Waiting for node-problem-detector DaemonSet to become ready..."
kubectl --namespace=kube-system rollout status daemonset/node-problem-detector --timeout=5m
12 changes: 12 additions & 0 deletions test/e2e/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

# Reuse the production base in deployment/ so this e2e overlay never drifts from
# it; only the image is overridden, to the per-branch community staging build.
resources:
- ../../../deployment

images:
- name: registry.k8s.io/node-problem-detector/node-problem-detector
newName: gcr.io/k8s-staging-npd/node-problem-detector
newTag: master