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
a6f6f25d
Commit
a6f6f25d
authored
Jan 12, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3387 from zmerlynn/fix_monitor_flake
Fix monitoring.sh flake (hopefully)
parents
af0e2fd5
0918bdbd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
monitoring.sh
hack/e2e-suite/monitoring.sh
+10
-12
No files found.
hack/e2e-suite/monitoring.sh
View file @
a6f6f25d
...
@@ -28,20 +28,19 @@ source "${KUBE_ROOT}/cluster/$KUBERNETES_PROVIDER/util.sh"
...
@@ -28,20 +28,19 @@ source "${KUBE_ROOT}/cluster/$KUBERNETES_PROVIDER/util.sh"
MONITORING
=
"
${
KUBE_ROOT
}
/cluster/addons/cluster-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"
BIGRAND
=
$(
printf
"%x
\n
"
$((
$RANDOM
<<
16
|
$RANDOM
))) # random 2^32 in hex
MONITORING_FIREWALL_RULE="monitoring-test-
${
BIGRAND
}
"
function setup {
function setup {
# 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
if
!
"
${
GCLOUD
}
"
compute firewall-rules describe
$MONITORING_FIREWALL_RULE
&> /dev/null
;
then
if ! "
${
GCLOUD
}
" compute firewall-rules create "
${
MONITORING_FIREWALL_RULE
}
" \
if
!
"
${
GCLOUD
}
"
compute firewall-rules create
$MONITORING_FIREWALL_RULE
\
--project "
${
PROJECT
}
" \
--project
"
${
PROJECT
}
"
\
--network "
${
NETWORK
}
" \
--network
"
${
NETWORK
}
"
\
--quiet \
--quiet
\
--allow tcp:80 tcp:8083 tcp:8086 tcp:9200; then
--allow
tcp:80 tcp:8083 tcp:8086 tcp:9200
;
then
echo "Failed to set up firewall for monitoring" && false
echo
"Failed to set up firewall for monitoring"
&&
false
fi
fi
fi
fi
fi
...
@@ -58,11 +57,11 @@ function cleanup {
...
@@ -58,11 +57,11 @@ function cleanup {
# 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
if
"
${
GCLOUD
}
"
compute firewall-rules describe
$MONITORING_FIREWALL_RULE
&> /dev/null
;
then
if "
${
GCLOUD
}
" compute firewall-rules describe
"
${
MONITORING_FIREWALL_RULE
}
"
&> /dev/null; then
"
${
GCLOUD
}
" compute firewall-rules delete \
"
${
GCLOUD
}
" compute firewall-rules delete \
--project "
${
PROJECT
}
" \
--project "
${
PROJECT
}
" \
--quiet \
--quiet \
$MONITORING_FIREWALL_RULE
||
true
"
${
MONITORING_FIREWALL_RULE
}
"
|| true
fi
fi
fi
fi
}
}
...
@@ -123,4 +122,3 @@ influx-data-exists
...
@@ -123,4 +122,3 @@ influx-data-exists
echo "monitoring setup works"
echo "monitoring setup works"
exit 0
exit 0
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