Skip to content

Commit c052095

Browse files
jason1028krjasonjung
authored and
jasonjung
committed
revert edited files for testing -1
1 parent 3e13109 commit c052095

File tree

8 files changed

+25
-71
lines changed

8 files changed

+25
-71
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ junit*.xml
77
debug.test
88
/output/
99
coverage.out
10-
.idea
10+
.idea
11+
.gitignore

Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,4 @@ ARG LOGCOUNTER
2828
COPY ./bin/health-checker ${LOGCOUNTER} /home/kubernetes/bin/
2929

3030
COPY config /config
31-
32-
COPY ./config/test_condition_fail.sh /home/kubernetes/
33-
COPY ./config/test_condition_succeed.sh /home/kubernetes/
34-
35-
RUN chmod 777 -R /home/kubernetes
36-
3731
ENTRYPOINT ["/node-problem-detector", "--config.system-log-monitor=/config/kernel-monitor.json"]

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ VERSION?=$(shell if [ -d .git ]; then echo `git describe --tags --dirty`; else e
3232
TAG?=$(VERSION)
3333

3434
# REGISTRY is the container registry to push into.
35-
#REGISTRY?=gcr.io/k8s-staging-npd
36-
REGISTRY?=jasonjungacr.azurecr.io/k8s-staging-npd
35+
REGISTRY?=gcr.io/k8s-staging-npd
3736

3837
# UPLOAD_PATH is the cloud storage path to upload release tar.
3938
UPLOAD_PATH?=gs://kubernetes-release
@@ -63,7 +62,7 @@ IMAGE:=$(REGISTRY)/node-problem-detector:$(TAG)
6362

6463
# ENABLE_JOURNALD enables build journald support or not. Building journald
6564
# support needs libsystemd-dev or libsystemd-journal-dev.
66-
ENABLE_JOURNALD?=0
65+
ENABLE_JOURNALD?=1
6766

6867
ifeq ($(go env GOHOSTOS), darwin)
6968
ENABLE_JOURNALD=0
@@ -261,6 +260,7 @@ build-in-docker: clean docker-builder
261260
-c 'cd /gopath/src/k8s.io/node-problem-detector/ && make build-binaries'
262261

263262
push-container: build-container
263+
gcloud auth configure-docker
264264
docker push $(IMAGE)
265265

266266
push-tar: build-tar

config/test_condition_fail.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

config/test_condition_succeed.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

deployment/node-problem-detector-config.yaml

Lines changed: 16 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -64,58 +64,25 @@ data:
6464
}
6565
]
6666
}
67-
cpm-test.json: |
67+
docker-monitor.json: |
6868
{
69-
"plugin": "custom",
70-
"pluginConfig": {
71-
"invoke_interval": "60s",
72-
"timeout": "60s"
73-
},
74-
"source": "test-custom-plugin-monitor",
75-
"metricsReporting": true,
76-
"conditions": [
77-
{
78-
"type": "TestConditionHasProblem",
79-
"reason": "TestIsOK",
80-
"message": "test condition is OK"
81-
}
82-
],
83-
"rules": [
84-
{
85-
"type": "permanent",
86-
"condition": "TestConditionHasProblem",
87-
"reason": "TestIsIntentionallyFailing",
88-
"path": "/home/kubernetes/test_condition_fail.sh",
89-
"timeout": "60s"
69+
"plugin": "journald",
70+
"pluginConfig": {
71+
"source": "dockerd"
9072
},
91-
{
92-
"type": "permanent",
93-
"condition": "TestConditionHasProblem",
94-
"reason": "TestIsIntentionallySucceeding",
95-
"path": "/home/kubernetes/test_condition_succeed.sh",
96-
"timeout": "60s"
97-
}
98-
]
73+
"logPath": "/var/log/journal",
74+
"lookback": "5m",
75+
"bufferSize": 10,
76+
"source": "docker-monitor",
77+
"conditions": [],
78+
"rules": [
79+
{
80+
"type": "temporary",
81+
"reason": "CorruptDockerImage",
82+
"pattern": "Error trying v2 registry: failed to register layer: rename /var/lib/docker/image/(.+) /var/lib/docker/image/(.+): directory not empty.*"
83+
}
84+
]
9985
}
100-
# docker-monitor.json: |
101-
# {
102-
# "plugin": "journald",
103-
# "pluginConfig": {
104-
# "source": "dockerd"
105-
# },
106-
# "logPath": "/var/log/journal",
107-
# "lookback": "5m",
108-
# "bufferSize": 10,
109-
# "source": "docker-monitor",
110-
# "conditions": [],
111-
# "rules": [
112-
# {
113-
# "type": "temporary",
114-
# "reason": "CorruptDockerImage",
115-
# "pattern": "Error trying v2 registry: failed to register layer: rename /var/lib/docker/image/(.+) /var/lib/docker/image/(.+): directory not empty.*"
116-
# }
117-
# ]
118-
# }
11986
kind: ConfigMap
12087
metadata:
12188
name: node-problem-detector-config

deployment/node-problem-detector.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ spec:
2323
operator: In
2424
values:
2525
- linux
26-
serviceAccountName: node-controller
2726
containers:
2827
- name: node-problem-detector
2928
command:
3029
- /node-problem-detector
3130
- --logtostderr
32-
#- --config.system-log-monitor=/config/kernel-monitor.json,/config/docker-monitor.json
33-
- --config.custom-plugin-monitor=/config/cpm-test.json
34-
image: jasonjungacr.azurecr.io/k8s-staging-npd/node-problem-detector:v0.8.10-14-g2eed64d-dirty
31+
- --config.system-log-monitor=/config/kernel-monitor.json,/config/docker-monitor.json
32+
image: k8s.gcr.io/node-problem-detector/node-problem-detector:v0.8.7
3533
resources:
3634
limits:
3735
cpu: 10m
@@ -79,10 +77,8 @@ spec:
7977
items:
8078
- key: kernel-monitor.json
8179
path: kernel-monitor.json
82-
# - key: docker-monitor.json
83-
# path: docker-monitor.json
84-
- key: cpm-test.json
85-
path: cpm-test.json
80+
- key: docker-monitor.json
81+
path: docker-monitor.json
8682
tolerations:
8783
- effect: NoSchedule
8884
operator: Exists

docker

Whitespace-only changes.

0 commit comments

Comments
 (0)