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
af42fbd3
Commit
af42fbd3
authored
Dec 05, 2017
by
Minhan Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix gce.conf multi-value parameter processing
parent
db2977fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
9 deletions
+28
-9
configure-helper.sh
cluster/gce/container-linux/configure-helper.sh
+13
-4
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+13
-4
gce.go
pkg/cloudprovider/providers/gce/gce.go
+2
-1
No files found.
cluster/gce/container-linux/configure-helper.sh
View file @
af42fbd3
...
...
@@ -215,14 +215,19 @@ EOF
if
[[
-n
"
${
NODE_INSTANCE_PREFIX
:-}
"
]]
;
then
use_cloud_config
=
"true"
if
[[
-n
"
${
NODE_TAGS
:-}
"
]]
;
then
local
-r
node_tags
=
"
${
NODE_TAGS
}
"
# split NODE_TAGS into an array by comma.
IFS
=
','
read
-r
-a
node_tags
<<<
${
NODE_TAGS
}
else
local
-r
node_tags
=
"
${
NODE_INSTANCE_PREFIX
}
"
fi
cat
<<
EOF
>>/etc/gce.conf
node-tags =
${
node_tags
}
node-instance-prefix =
${
NODE_INSTANCE_PREFIX
}
EOF
for
tag
in
${
node_tags
[@]
}
;
do
cat
<<
EOF
>>/etc/gce.conf
node-tags =
${
tag
}
EOF
done
fi
if
[[
-n
"
${
MULTIZONE
:-}
"
]]
;
then
use_cloud_config
=
"true"
...
...
@@ -232,9 +237,13 @@ EOF
fi
if
[[
-n
"
${
GCE_ALPHA_FEATURES
:-}
"
]]
;
then
use_cloud_config
=
"true"
cat
<<
EOF
>>/etc/gce.conf
alpha-features =
${
GCE_ALPHA_FEATURES
}
# split GCE_ALPHA_FEATURES into an array by comma.
IFS
=
','
read
-r
-a
alpha_features
<<<
${
GCE_ALPHA_FEATURES
}
for
feature
in
${
alpha_features
[@]
}
;
do
cat
<<
EOF
>>/etc/gce.conf
alpha-features =
${
feature
}
EOF
done
fi
if
[[
-n
"
${
SECONDARY_RANGE_NAME
:-}
"
]]
;
then
use_cloud_config
=
"true"
...
...
cluster/gce/gci/configure-helper.sh
View file @
af42fbd3
...
...
@@ -585,14 +585,19 @@ EOF
if
[[
-n
"
${
NODE_INSTANCE_PREFIX
:-}
"
]]
;
then
use_cloud_config
=
"true"
if
[[
-n
"
${
NODE_TAGS
:-}
"
]]
;
then
local
-r
node_tags
=
"
${
NODE_TAGS
}
"
# split NODE_TAGS into an array by comma.
IFS
=
','
read
-r
-a
node_tags
<<<
${
NODE_TAGS
}
else
local
-r
node_tags
=
"
${
NODE_INSTANCE_PREFIX
}
"
fi
cat
<<
EOF
>>/etc/gce.conf
node-tags =
${
node_tags
}
node-instance-prefix =
${
NODE_INSTANCE_PREFIX
}
EOF
for
tag
in
${
node_tags
[@]
}
;
do
cat
<<
EOF
>>/etc/gce.conf
node-tags =
${
tag
}
EOF
done
fi
if
[[
-n
"
${
MULTIZONE
:-}
"
]]
;
then
use_cloud_config
=
"true"
...
...
@@ -602,9 +607,13 @@ EOF
fi
if
[[
-n
"
${
GCE_ALPHA_FEATURES
:-}
"
]]
;
then
use_cloud_config
=
"true"
cat
<<
EOF
>>/etc/gce.conf
alpha-features =
${
GCE_ALPHA_FEATURES
}
# split GCE_ALPHA_FEATURES into an array by comma.
IFS
=
','
read
-r
-a
alpha_features
<<<
${
GCE_ALPHA_FEATURES
}
for
feature
in
${
alpha_features
[@]
}
;
do
cat
<<
EOF
>>/etc/gce.conf
alpha-features =
${
feature
}
EOF
done
fi
if
[[
-n
"
${
SECONDARY_RANGE_NAME
:-}
"
]]
;
then
use_cloud_config
=
"true"
...
...
pkg/cloudprovider/providers/gce/gce.go
View file @
af42fbd3
...
...
@@ -149,6 +149,7 @@ type GCECloud struct {
AlphaFeatureGate
*
AlphaFeatureGate
}
// TODO: replace gcfg with json
type
ConfigGlobal
struct
{
TokenURL
string
`gcfg:"token-url"`
TokenBody
string
`gcfg:"token-body"`
...
...
@@ -173,7 +174,7 @@ type ConfigGlobal struct {
// located in (i.e. where the controller will be running). If this is
// blank, then the local zone will be discovered via the metadata server.
LocalZone
string
`gcfg:"local-zone"`
//
Possible values: List of api names separated by comma.
Default to none.
// Default to none.
// For example: MyFeatureFlag
AlphaFeatures
[]
string
`gcfg:"alpha-features"`
}
...
...
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