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
2f2b7c8c
Commit
2f2b7c8c
authored
May 20, 2016
by
Filip Grzadkowski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #25734 from jszczepkowski/kac-test
Added enforcing of setting nodes numbers for cluster autoscaler.
parents
d1627111
858eb038
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
config-default.sh
cluster/gce/config-default.sh
+2
-2
config-test.sh
cluster/gce/config-test.sh
+2
-3
util.sh
cluster/gce/util.sh
+12
-0
No files found.
cluster/gce/config-default.sh
View file @
2f2b7c8c
...
...
@@ -107,8 +107,8 @@ ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}"
# Optional: Create autoscaler for cluster's nodes.
ENABLE_NODE_AUTOSCALER
=
"
${
KUBE_ENABLE_NODE_AUTOSCALER
:-
false
}
"
if
[[
"
${
ENABLE_NODE_AUTOSCALER
}
"
==
"true"
]]
;
then
AUTOSCALER_MIN_NODES
=
"
${
KUBE_AUTOSCALER_MIN_NODES
:-
1
}
"
AUTOSCALER_MAX_NODES
=
"
${
KUBE_AUTOSCALER_MAX_NODES
:-
${
NUM_NODES
}
}
"
AUTOSCALER_MIN_NODES
=
"
${
KUBE_AUTOSCALER_MIN_NODES
:-}
"
AUTOSCALER_MAX_NODES
=
"
${
KUBE_AUTOSCALER_MAX_NODES
:-}
"
fi
# Admission Controllers to invoke prior to persisting objects in cluster
...
...
cluster/gce/config-test.sh
View file @
2f2b7c8c
...
...
@@ -128,9 +128,8 @@ ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}"
# Optional: Create autoscaler for cluster's nodes.
ENABLE_NODE_AUTOSCALER
=
"
${
KUBE_ENABLE_NODE_AUTOSCALER
:-
false
}
"
if
[[
"
${
ENABLE_NODE_AUTOSCALER
}
"
==
"true"
]]
;
then
AUTOSCALER_MIN_NODES
=
"
${
KUBE_AUTOSCALER_MIN_NODES
:-
1
}
"
AUTOSCALER_MAX_NODES
=
"
${
KUBE_AUTOSCALER_MAX_NODES
:-${
NUM_NODES
}}
"
TARGET_NODE_UTILIZATION
=
"
${
KUBE_TARGET_NODE_UTILIZATION
:-
0
.7
}
"
AUTOSCALER_MIN_NODES
=
"
${
KUBE_AUTOSCALER_MIN_NODES
:-}
"
AUTOSCALER_MAX_NODES
=
"
${
KUBE_AUTOSCALER_MAX_NODES
:-}
"
fi
# If we included ResourceQuota, we should keep it at the end of the list to prevent incremeting quota usage prematurely.
...
...
cluster/gce/util.sh
View file @
2f2b7c8c
...
...
@@ -45,6 +45,18 @@ else
exit
1
fi
# Verfiy cluster autoscaler configuration.
if
[[
"
${
ENABLE_NODE_AUTOSCALER
}
"
==
"true"
]]
;
then
if
[
-z
$AUTOSCALER_MIN_NODES
]
;
then
echo
"AUTOSCALER_MIN_NODES not set."
exit
1
fi
if
[
-z
$AUTOSCALER_MAX_NODES
]
;
then
echo
"AUTOSCALER_MAX_NODES not set."
exit
1
fi
fi
NODE_INSTANCE_PREFIX
=
"
${
INSTANCE_PREFIX
}
-minion"
ALLOCATE_NODE_CIDRS
=
true
...
...
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