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
7febdde2
Commit
7febdde2
authored
May 17, 2017
by
Bowei Du
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update cluster startup scripts to use gcloud beta for alias IP support
The feature has gone from alpha to beta.
parent
799283f2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
config-default.sh
cluster/gce/config-default.sh
+1
-1
config-test.sh
cluster/gce/config-test.sh
+2
-2
master-helper.sh
cluster/gce/container-linux/master-helper.sh
+1
-1
util.sh
cluster/gce/util.sh
+5
-5
No files found.
cluster/gce/config-default.sh
View file @
7febdde2
...
...
@@ -188,7 +188,7 @@ ENABLE_RESCHEDULER="${KUBE_ENABLE_RESCHEDULER:-true}"
# Optional: Enable allocation of pod IPs using IP aliases.
#
#
ALPH
A FEATURE.
#
BET
A FEATURE.
#
# IP_ALIAS_SIZE is the size of the podCIDR allocated to a node.
# IP_ALIAS_SUBNETWORK is the subnetwork to allocate from. If empty, a
...
...
cluster/gce/config-test.sh
View file @
7febdde2
...
...
@@ -221,14 +221,14 @@ ENABLE_RESCHEDULER="${KUBE_ENABLE_RESCHEDULER:-true}"
# Optional: Enable allocation of pod IPs using IP aliases.
#
#
ALPH
A FEATURE.
#
BET
A FEATURE.
#
# IP_ALIAS_SIZE is the size of the podCIDR allocated to a node.
# IP_ALIAS_SUBNETWORK is the subnetwork to allocate from. If empty, a
# new subnetwork will be created for the cluster.
ENABLE_IP_ALIASES
=
${
KUBE_GCE_ENABLE_IP_ALIASES
:-
false
}
if
[
${
ENABLE_IP_ALIASES
}
=
true
]
;
then
# Size of ranges allocated to each node. gcloud
alpha
supports only /32 and /24.
# Size of ranges allocated to each node. gcloud
current
supports only /32 and /24.
IP_ALIAS_SIZE
=
${
KUBE_GCE_IP_ALIAS_SIZE
:-
/24
}
IP_ALIAS_SUBNETWORK
=
${
KUBE_GCE_IP_ALIAS_SUBNETWORK
:-${
INSTANCE_PREFIX
}
-subnet-default
}
# NODE_IP_RANGE is used when ENABLE_IP_ALIASES=true. It is the primary range in
...
...
cluster/gce/container-linux/master-helper.sh
View file @
7febdde2
...
...
@@ -67,7 +67,7 @@ function replicate-master-instance() {
function
create-master-instance-internal
()
{
local
gcloud
=
"gcloud"
if
[[
"
${
ENABLE_IP_ALIASES
:-}
"
==
'true'
]]
;
then
gcloud
=
"gcloud
alph
a"
gcloud
=
"gcloud
bet
a"
fi
local
-r
master_name
=
"
${
1
}
"
...
...
cluster/gce/util.sh
View file @
7febdde2
...
...
@@ -515,7 +515,7 @@ function create-node-template() {
fi
if
[[
"
${
ENABLE_IP_ALIASES
:-}
"
==
'true'
]]
;
then
gcloud
=
"gcloud
alph
a"
gcloud
=
"gcloud
bet
a"
fi
local
preemptible_minions
=
""
...
...
@@ -745,7 +745,7 @@ function create-subnetwork() {
# Look for the subnet, it must exist and have a secondary range
# configured.
local
subnet
=
$(
gcloud
alph
a compute networks subnets describe
\
local
subnet
=
$(
gcloud
bet
a compute networks subnets describe
\
--project
"
${
PROJECT
}
"
\
--region
${
REGION
}
\
${
IP_ALIAS_SUBNETWORK
}
2>/dev/null
)
...
...
@@ -762,7 +762,7 @@ function create-subnetwork() {
fi
echo
"Creating subnet
${
NETWORK
}
:
${
IP_ALIAS_SUBNETWORK
}
"
gcloud
alph
a compute networks subnets create
\
gcloud
bet
a compute networks subnets create
\
${
IP_ALIAS_SUBNETWORK
}
\
--description
"Automatically generated subnet for
${
INSTANCE_PREFIX
}
cluster. This will be removed on cluster teardown."
\
--project
"
${
PROJECT
}
"
\
...
...
@@ -812,11 +812,11 @@ function delete-subnetwork() {
fi
echo
"Removing auto-created subnet
${
NETWORK
}
:
${
IP_ALIAS_SUBNETWORK
}
"
if
[[
-n
$(
gcloud
alph
a compute networks subnets describe
\
if
[[
-n
$(
gcloud
bet
a compute networks subnets describe
\
--project
"
${
PROJECT
}
"
\
--region
${
REGION
}
\
${
IP_ALIAS_SUBNETWORK
}
2>/dev/null
)
]]
;
then
gcloud
alph
a
--quiet
compute networks subnets delete
\
gcloud
bet
a
--quiet
compute networks subnets delete
\
--project
"
${
PROJECT
}
"
\
--region
${
REGION
}
\
${
IP_ALIAS_SUBNETWORK
}
...
...
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