Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
195e2494
Commit
195e2494
authored
May 20, 2016
by
Random-Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add node problem detector as an addon pod.
parent
96259268
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
1 deletion
+82
-1
kube-addon-update.sh
cluster/addons/addon-manager/kube-addon-update.sh
+1
-0
MAINTAINERS.md
cluster/addons/node-problem-detector/MAINTAINERS.md
+6
-0
README.md
cluster/addons/node-problem-detector/README.md
+10
-0
node-problem-detector.yaml.in
...ddons/node-problem-detector/node-problem-detector.yaml.in
+44
-0
common.sh
cluster/common.sh
+2
-0
config-default.sh
cluster/gce/config-default.sh
+3
-1
config-test.sh
cluster/gce/config-test.sh
+3
-0
configure-vm.sh
cluster/gce/configure-vm.sh
+2
-0
init.sls
cluster/saltbase/salt/kube-addons/init.sls
+11
-0
No files found.
cluster/addons/addon-manager/kube-addon-update.sh
View file @
195e2494
...
...
@@ -476,6 +476,7 @@ function update-addons() {
# be careful, reconcile-objects uses global variables
reconcile-objects
${
addon_path
}
ReplicationController
"-"
&
reconcile-objects
${
addon_path
}
Deployment
"-"
&
reconcile-objects
${
addon_path
}
DaemonSet
"-"
&
# We don't expect names to be versioned for the following kinds, so
# we match the entire name, ignoring version suffix.
...
...
cluster/addons/node-problem-detector/MAINTAINERS.md
0 → 100644
View file @
195e2494
# Maintainers
Lantao Liu
<lantaol@google.com>
[

]()
cluster/addons/node-problem-detector/README.md
0 → 100644
View file @
195e2494
# Node Problem Detector
==============
Node Problem Detector is a DaemonSet running on each node, detecting node
problems.
Learn more at: https://github.com/kubernetes/node-problem-detector
[

]()
cluster/addons/node-problem-detector/node-problem-detector.yaml.in
0 → 100644
View file @
195e2494
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: node-problem-detector-v0.1
namespace: kube-system
labels:
k8s-app: node-problem-detector
version: v0.1
kubernetes.io/cluster-service: "true"
spec:
template:
metadata:
labels:
k8s-app: node-problem-detector
version: v0.1
kubernetes.io/cluster-service: "true"
spec:
hostNetwork: true
containers:
- name: node-problem-detector
image: gcr.io/google_containers/node-problem-detector:v0.1
env:
# Config the host ip and port of apiserver.
- name: "KUBERNETES_SERVICE_HOST"
value: "{{ pillar['master_node'] }}"
- name: "KUBERNETES_SERVICE_PORT"
value: "443"
securityContext:
privileged: true
resources:
limits:
cpu: "200m"
memory: "100Mi"
requests:
cpu: "50m"
memory: "20Mi"
volumeMounts:
- name: log
mountPath: /log
readOnly: true
volumes:
- name: log
hostPath:
path: /var/log/
cluster/common.sh
View file @
195e2494
...
...
@@ -485,6 +485,7 @@ ENABLE_CLUSTER_MONITORING: $(yaml-quote ${ENABLE_CLUSTER_MONITORING:-none})
ENABLE_L7_LOADBALANCING:
$(
yaml-quote
${
ENABLE_L7_LOADBALANCING
:-
none
})
ENABLE_CLUSTER_LOGGING:
$(
yaml-quote
${
ENABLE_CLUSTER_LOGGING
:-
false
})
ENABLE_CLUSTER_UI:
$(
yaml-quote
${
ENABLE_CLUSTER_UI
:-
false
})
ENABLE_NODE_PROBLEM_DETECTOR:
$(
yaml-quote
${
ENABLE_NODE_PROBLEM_DETECTOR
:-
false
})
ENABLE_NODE_LOGGING:
$(
yaml-quote
${
ENABLE_NODE_LOGGING
:-
false
})
LOGGING_DESTINATION:
$(
yaml-quote
${
LOGGING_DESTINATION
:-})
ELASTICSEARCH_LOGGING_REPLICAS:
$(
yaml-quote
${
ELASTICSEARCH_LOGGING_REPLICAS
:-})
...
...
@@ -578,6 +579,7 @@ ENABLE_MANIFEST_URL: $(yaml-quote ${ENABLE_MANIFEST_URL:-false})
MANIFEST_URL:
$(
yaml-quote
${
MANIFEST_URL
:-})
MANIFEST_URL_HEADER:
$(
yaml-quote
${
MANIFEST_URL_HEADER
:-})
NUM_NODES:
$(
yaml-quote
${
NUM_NODES
})
MASTER_NAME:
$(
yaml-quote
${
MASTER_NAME
})
EOF
if
[
-n
"
${
APISERVER_TEST_ARGS
:-}
"
]
;
then
cat
>>
$file
<<
EOF
...
...
cluster/gce/config-default.sh
View file @
195e2494
...
...
@@ -104,6 +104,9 @@ CLUSTER_REGISTRY_DISK_TYPE_GCE="${CLUSTER_REGISTRY_DISK_TYPE_GCE:-pd-standard}"
# Optional: Install Kubernetes UI
ENABLE_CLUSTER_UI
=
"
${
KUBE_ENABLE_CLUSTER_UI
:-
true
}
"
# Optional: Install node problem detector.
ENABLE_NODE_PROBLEM_DETECTOR
=
"
${
KUBE_ENABLE_NODE_PROBLEM_DETECTOR
:-
true
}
"
# Optional: Create autoscaler for cluster's nodes.
ENABLE_NODE_AUTOSCALER
=
"
${
KUBE_ENABLE_NODE_AUTOSCALER
:-
false
}
"
if
[[
"
${
ENABLE_NODE_AUTOSCALER
}
"
==
"true"
]]
;
then
...
...
@@ -126,6 +129,5 @@ OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}"
# How should the kubelet configure hairpin mode?
HAIRPIN_MODE
=
"
${
HAIRPIN_MODE
:-
promiscuous
-bridge
}
"
# promiscuous-bridge, hairpin-veth, none
# Optional: if set to true, kube-up will configure the cluster to run e2e tests.
E2E_STORAGE_TEST_ENVIRONMENT
=
${
KUBE_E2E_STORAGE_TEST_ENVIRONMENT
:-
false
}
cluster/gce/config-test.sh
View file @
195e2494
...
...
@@ -125,6 +125,9 @@ CLUSTER_REGISTRY_DISK_TYPE_GCE="${CLUSTER_REGISTRY_DISK_TYPE_GCE:-pd-standard}"
# Optional: Install Kubernetes UI
ENABLE_CLUSTER_UI
=
"
${
KUBE_ENABLE_CLUSTER_UI
:-
true
}
"
# Optional: Install node problem detector.
ENABLE_NODE_PROBLEM_DETECTOR
=
"
${
KUBE_ENABLE_NODE_PROBLEM_DETECTOR
:-
true
}
"
# Optional: Create autoscaler for cluster's nodes.
ENABLE_NODE_AUTOSCALER
=
"
${
KUBE_ENABLE_NODE_AUTOSCALER
:-
false
}
"
if
[[
"
${
ENABLE_NODE_AUTOSCALER
}
"
==
"true"
]]
;
then
...
...
cluster/gce/configure-vm.sh
View file @
195e2494
...
...
@@ -429,6 +429,7 @@ service_cluster_ip_range: '$(echo "$SERVICE_CLUSTER_IP_RANGE" | sed -e "s/'/''/g
enable_cluster_monitoring: '
$(
echo
"
$ENABLE_CLUSTER_MONITORING
"
|
sed
-e
"s/'/''/g"
)
'
enable_cluster_logging: '
$(
echo
"
$ENABLE_CLUSTER_LOGGING
"
|
sed
-e
"s/'/''/g"
)
'
enable_cluster_ui: '
$(
echo
"
$ENABLE_CLUSTER_UI
"
|
sed
-e
"s/'/''/g"
)
'
enable_node_problem_detector: '
$(
echo
"
$ENABLE_NODE_PROBLEM_DETECTOR
"
|
sed
-e
"s/'/''/g"
)
'
enable_l7_loadbalancing: '
$(
echo
"
$ENABLE_L7_LOADBALANCING
"
|
sed
-e
"s/'/''/g"
)
'
enable_node_logging: '
$(
echo
"
$ENABLE_NODE_LOGGING
"
|
sed
-e
"s/'/''/g"
)
'
logging_destination: '
$(
echo
"
$LOGGING_DESTINATION
"
|
sed
-e
"s/'/''/g"
)
'
...
...
@@ -448,6 +449,7 @@ enable_manifest_url: '$(echo "${ENABLE_MANIFEST_URL:-}" | sed -e "s/'/''/g")'
manifest_url: '
$(
echo
"
${
MANIFEST_URL
:-}
"
|
sed
-e
"s/'/''/g"
)
'
manifest_url_header: '
$(
echo
"
${
MANIFEST_URL_HEADER
:-}
"
|
sed
-e
"s/'/''/g"
)
'
num_nodes:
$(
echo
"
${
NUM_NODES
:-}
"
|
sed
-e
"s/'/''/g"
)
master_node:
$(
echo
"
${
MASTER_NAME
:-}
"
|
sed
-e
"s/'/''/g"
)
e2e_storage_test_environment: '
$(
echo
"
$E2E_STORAGE_TEST_ENVIRONMENT
"
|
sed
-e
"s/'/''/g"
)
'
kube_uid: '
$(
echo
"
${
KUBE_UID
}
"
|
sed
-e
"s/'/''/g"
)
'
EOF
...
...
cluster/saltbase/salt/kube-addons/init.sls
View file @
195e2494
...
...
@@ -150,6 +150,17 @@ addon-dir-create:
- file_mode: 644
{% endif %}
{% if pillar.get('enable_node_problem_detector', '').lower() == 'true' %}
/etc/kubernetes/addons/node-problem-detector/node-problem-detector.yaml:
file.managed:
- source: salt://kube-addons/node-problem-detector/node-problem-detector.yaml.in
- template: jinja
- user: root
- group: root
- file_mode: 644
- makedirs: True
{% endif %}
/etc/kubernetes/manifests/kube-addon-manager.yaml:
file.managed:
- source: salt://kube-addons/kube-addon-manager.yaml
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment