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
9aa48b76
Commit
9aa48b76
authored
Jan 05, 2015
by
Joe Beda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move heapster data files to cluster/addons.
Also pretty up the JSON (make it real JSON) and streamline the sed in cluster/gce/init.sh.
parent
6df6aab0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
50 deletions
+90
-50
README.md
cluster/addons/cluster-monitoring/README.md
+0
-0
heapster-pod.json
cluster/addons/cluster-monitoring/heapster-pod.json
+7
-5
influx-grafana-pod.json
cluster/addons/cluster-monitoring/influx-grafana-pod.json
+71
-0
influx-grafana-service.json
...ter/addons/cluster-monitoring/influx-grafana-service.json
+3
-1
util.sh
cluster/gce/util.sh
+7
-8
influx-grafana-pod.json
examples/monitoring/influx-grafana-pod.json
+0
-34
monitoring.sh
hack/e2e-suite/monitoring.sh
+2
-2
No files found.
examples/
monitoring/README.md
→
cluster/addons/cluster-
monitoring/README.md
View file @
9aa48b76
File moved
examples/
monitoring/heapster-pod.json
→
cluster/addons/cluster-
monitoring/heapster-pod.json
View file @
9aa48b76
...
@@ -6,13 +6,15 @@
...
@@ -6,13 +6,15 @@
"manifest"
:
{
"manifest"
:
{
"version"
:
"v1beta1"
,
"version"
:
"v1beta1"
,
"id"
:
"heapster"
,
"id"
:
"heapster"
,
"containers"
:
[{
"containers"
:
[
"name"
:
"heapster"
,
{
"image"
:
"kubernetes/heapster"
,
"name"
:
"heapster"
,
}]
"image"
:
"kubernetes/heapster"
}
]
}
}
},
},
"labels"
:
{
"labels"
:
{
"name"
:
"heapster"
,
"name"
:
"heapster"
}
}
}
}
cluster/addons/cluster-monitoring/influx-grafana-pod.json
0 → 100644
View file @
9aa48b76
{
"id"
:
"influx-grafana"
,
"kind"
:
"Pod"
,
"apiVersion"
:
"v1beta1"
,
"desiredState"
:
{
"manifest"
:
{
"version"
:
"v1beta1"
,
"id"
:
"influx-grafana"
,
"containers"
:
[
{
"name"
:
"influxdb"
,
"image"
:
"kubernetes/heapster_influxdb"
,
"ports"
:
[
{
"containerPort"
:
8083
,
"hostPort"
:
8083
},
{
"containerPort"
:
8086
,
"hostPort"
:
8086
},
{
"containerPort"
:
8090
,
"hostPort"
:
8090
},
{
"containerPort"
:
8099
,
"hostPort"
:
8099
}
]
},
{
"name"
:
"grafana"
,
"image"
:
"kubernetes/heapster_grafana"
,
"ports"
:
[
{
"containerPort"
:
80
,
"hostPort"
:
80
}
],
"env"
:
[
{
"name"
:
"HTTP_USER"
,
"value"
:
"{KUBE_USER}"
},
{
"name"
:
"HTTP_PASS"
,
"value"
:
"{KUBE_PASSWORD}"
}
]
},
{
"name"
:
"elasticsearch"
,
"image"
:
"dockerfile/elasticsearch"
,
"ports"
:
[
{
"containerPort"
:
9200
,
"hostPort"
:
9200
},
{
"containerPort"
:
9300
}
]
}
]
}
},
"labels"
:
{
"name"
:
"influxdb"
}
}
examples/
monitoring/influx-grafana-service.json
→
cluster/addons/cluster-
monitoring/influx-grafana-service.json
View file @
9aa48b76
...
@@ -6,5 +6,7 @@
...
@@ -6,5 +6,7 @@
"containerPort"
:
8086
,
"containerPort"
:
8086
,
"provider"
:
"kubernetes-default"
,
"provider"
:
"kubernetes-default"
,
"component"
:
"influxdb"
,
"component"
:
"influxdb"
,
"selector"
:
{
"name"
:
"influxdb"
}
"selector"
:
{
"name"
:
"influxdb"
}
}
}
cluster/gce/util.sh
View file @
9aa48b76
...
@@ -746,15 +746,14 @@ function setup-monitoring {
...
@@ -746,15 +746,14 @@ function setup-monitoring {
get-password
get-password
ensure-temp-dir
ensure-temp-dir
cp
"
${
KUBE_ROOT
}
/examples/monitoring/influx-grafana-pod.json"
"
${
KUBE_TEMP
}
/influx-grafana-pod.0.json"
sed
-e
"s/{KUBE_USER}/
$KUBE_USER
/g"
\
sed
"s/HTTP_USER,
\"
value
\"
:
\"
[^
\"
]*
\"
/HTTP_USER,
\"
value
\"
:
\"
$KUBE_USER
\"
/g"
\
-e
"s/{KUBE_PASSWORD}/
$KUBE_PASSWORD
/g"
\
"
${
KUBE_TEMP
}
/influx-grafana-pod.0.json"
>
"
${
KUBE_TEMP
}
/influx-grafana-pod.1.json"
"
${
KUBE_ROOT
}
/cluster/addons/cluster-monitoring/influx-grafana-pod.json"
\
sed
"s/HTTP_PASS,
\"
value
\"
:
\"
[^
\"
]*
\"
/HTTP_PASS,
\"
value
\"
:
\"
$KUBE_PASSWORD
\"
/g"
\
>
"
${
KUBE_TEMP
}
/influx-grafana-pod.json"
"
${
KUBE_TEMP
}
/influx-grafana-pod.1.json"
>
"
${
KUBE_TEMP
}
/influx-grafana-pod.2.json"
local
kubectl
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
local
kubectl
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
if
"
${
kubectl
}
"
create
-f
"
${
KUBE_TEMP
}
/influx-grafana-pod.
2.
json"
&> /dev/null
\
if
"
${
kubectl
}
"
create
-f
"
${
KUBE_TEMP
}
/influx-grafana-pod.json"
&> /dev/null
\
&&
"
${
kubectl
}
"
create
-f
"
${
KUBE_ROOT
}
/
examples/
monitoring/influx-grafana-service.json"
&> /dev/null
\
&&
"
${
kubectl
}
"
create
-f
"
${
KUBE_ROOT
}
/
cluster/addons/cluster-
monitoring/influx-grafana-service.json"
&> /dev/null
\
&&
"
${
kubectl
}
"
create
-f
"
${
KUBE_ROOT
}
/
examples/
monitoring/heapster-pod.json"
&> /dev/null
;
then
&&
"
${
kubectl
}
"
create
-f
"
${
KUBE_ROOT
}
/
cluster/addons/cluster-
monitoring/heapster-pod.json"
&> /dev/null
;
then
local
dashboard_url
=
"http://
$(${
kubectl
}
get
-o
json pod influx-grafana |
grep
hostIP |
awk
'{print $2}'
|
sed
's/[,|\"]//g'
)
"
local
dashboard_url
=
"http://
$(${
kubectl
}
get
-o
json pod influx-grafana |
grep
hostIP |
awk
'{print $2}'
|
sed
's/[,|\"]//g'
)
"
echo
echo
echo
"Grafana dashboard will be available at
$dashboard_url
. Wait for the monitoring dashboard to be online."
echo
"Grafana dashboard will be available at
$dashboard_url
. Wait for the monitoring dashboard to be online."
...
...
examples/monitoring/influx-grafana-pod.json
deleted
100644 → 0
View file @
6df6aab0
{
"id"
:
"influx-grafana"
,
"kind"
:
"Pod"
,
"apiVersion"
:
"v1beta1"
,
"desiredState"
:
{
"manifest"
:
{
"version"
:
"v1beta1"
,
"id"
:
"influx-grafana"
,
"containers"
:
[{
"name"
:
"influxdb"
,
"image"
:
"kubernetes/heapster_influxdb"
,
"ports"
:
[
{
"containerPort"
:
8083
,
"hostPort"
:
8083
},
{
"containerPort"
:
8086
,
"hostPort"
:
8086
},
{
"containerPort"
:
8090
,
"hostPort"
:
8090
},
{
"containerPort"
:
8099
,
"hostPort"
:
8099
}]
},
{
"name"
:
"grafana"
,
"image"
:
"kubernetes/heapster_grafana"
,
"ports"
:
[{
"containerPort"
:
80
,
"hostPort"
:
80
}],
"env"
:
[{
"name"
:
HTTP_USER
,
"value"
:
"admin"
},
{
"name"
:
HTTP_PASS
,
"value"
:
"admin"
}],
},
{
"name"
:
"elasticsearch"
,
"image"
:
"dockerfile/elasticsearch"
,
"ports"
:
[{
"containerPort"
:
9200
,
"hostPort"
:
9200
},
{
"containerPort"
:
9300
}],
}]
},
},
"labels"
:
{
"name"
:
"influxdb"
,
}
}
hack/e2e-suite/monitoring.sh
View file @
9aa48b76
...
@@ -26,7 +26,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
...
@@ -26,7 +26,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
source
"
${
KUBE_ROOT
}
/cluster/kube-env.sh"
source
"
${
KUBE_ROOT
}
/cluster/kube-env.sh"
source
"
${
KUBE_ROOT
}
/cluster/
$KUBERNETES_PROVIDER
/util.sh"
source
"
${
KUBE_ROOT
}
/cluster/
$KUBERNETES_PROVIDER
/util.sh"
MONITORING
=
"
${
KUBE_ROOT
}
/
examples/
monitoring"
MONITORING
=
"
${
KUBE_ROOT
}
/
cluster/addons/cluster-
monitoring"
KUBECTL
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
KUBECTL
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
MONITORING_FIREWALL_RULE
=
"monitoring-test"
MONITORING_FIREWALL_RULE
=
"monitoring-test"
...
@@ -54,7 +54,7 @@ function cleanup {
...
@@ -54,7 +54,7 @@ function cleanup {
"
${
KUBECTL
}
"
delete
-f
"
${
MONITORING
}
/influx-grafana-pod.json"
||
true
"
${
KUBECTL
}
"
delete
-f
"
${
MONITORING
}
/influx-grafana-pod.json"
||
true
"
${
KUBECTL
}
"
delete
-f
"
${
MONITORING
}
/influx-grafana-service.json"
||
true
"
${
KUBECTL
}
"
delete
-f
"
${
MONITORING
}
/influx-grafana-service.json"
||
true
"
${
KUBECTL
}
"
delete
-f
"
${
MONITORING
}
/heapster-pod.json"
||
true
"
${
KUBECTL
}
"
delete
-f
"
${
MONITORING
}
/heapster-pod.json"
||
true
# This only has work to do on gce and gke
# This only has work to do on gce and gke
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
||
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gke"
]]
;
then
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
||
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gke"
]]
;
then
detect-project
detect-project
...
...
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