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
d903d328
Commit
d903d328
authored
May 31, 2018
by
Koonwah Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add netd as an addon for GKE.
parent
9fee771b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
0 deletions
+23
-0
config-default.sh
cluster/gce/config-default.sh
+3
-0
config-test.sh
cluster/gce/config-test.sh
+3
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+16
-0
util.sh
cluster/gce/util.sh
+1
-0
No files found.
cluster/gce/config-default.sh
View file @
d903d328
...
@@ -349,6 +349,9 @@ STORAGE_BACKEND=${STORAGE_BACKEND:-}
...
@@ -349,6 +349,9 @@ STORAGE_BACKEND=${STORAGE_BACKEND:-}
# Networking plugin specific settings.
# Networking plugin specific settings.
NETWORK_PROVIDER
=
"
${
NETWORK_PROVIDER
:-
kubenet
}
"
# none, kubenet
NETWORK_PROVIDER
=
"
${
NETWORK_PROVIDER
:-
kubenet
}
"
# none, kubenet
# Optional: Enable netd.
ENABLE_NETD
=
"
${
KUBE_ENABLE_NETD
:-
false
}
"
# Network Policy plugin specific settings.
# Network Policy plugin specific settings.
NETWORK_POLICY_PROVIDER
=
"
${
NETWORK_POLICY_PROVIDER
:-
none
}
"
# calico
NETWORK_POLICY_PROVIDER
=
"
${
NETWORK_POLICY_PROVIDER
:-
none
}
"
# calico
...
...
cluster/gce/config-test.sh
View file @
d903d328
...
@@ -359,6 +359,9 @@ STORAGE_MEDIA_TYPE=${STORAGE_MEDIA_TYPE:-}
...
@@ -359,6 +359,9 @@ STORAGE_MEDIA_TYPE=${STORAGE_MEDIA_TYPE:-}
NETWORK_PROVIDER
=
"
${
NETWORK_PROVIDER
:-
kubenet
}
"
# none, kubenet
NETWORK_PROVIDER
=
"
${
NETWORK_PROVIDER
:-
kubenet
}
"
# none, kubenet
# Optional: Enable netd.
ENABLE_NETD
=
"
${
KUBE_ENABLE_NETD
:-
false
}
"
# Network Policy plugin specific settings.
# Network Policy plugin specific settings.
NETWORK_POLICY_PROVIDER
=
"
${
NETWORK_POLICY_PROVIDER
:-
none
}
"
# calico
NETWORK_POLICY_PROVIDER
=
"
${
NETWORK_POLICY_PROVIDER
:-
none
}
"
# calico
...
...
cluster/gce/gci/configure-helper.sh
View file @
d903d328
...
@@ -2235,6 +2235,19 @@ EOF
...
@@ -2235,6 +2235,19 @@ EOF
fi
fi
}
}
# Sets up the manifests of netd for k8s addons.
function
setup-netd-manifest
{
local
-r
netd_file
=
"
${
dst_dir
}
/netd/netd.yaml"
mkdir
-p
"
${
dst_dir
}
/netd"
touch
"
${
netd_file
}
"
if
[
-n
"
${
CUSTOM_NETD_YAML
:-}
"
]
;
then
# Replace with custom GKE netd deployment.
cat
>
"
${
netd_file
}
"
<<
EOF
$(
echo
"
$CUSTOM_NETD_YAML
"
)
EOF
fi
}
# Prepares the manifests of k8s addons, and starts the addon manager.
# Prepares the manifests of k8s addons, and starts the addon manager.
# Vars assumed:
# Vars assumed:
# CLUSTER_NAME
# CLUSTER_NAME
...
@@ -2348,6 +2361,9 @@ EOF
...
@@ -2348,6 +2361,9 @@ EOF
setup-kube-dns-manifest
setup-kube-dns-manifest
fi
fi
fi
fi
if
[[
"
${
ENABLE_NETD
:-}
"
==
"true"
]]
;
then
setup-netd-manifest
fi
if
[[
"
${
ENABLE_NODE_LOGGING
:-}
"
==
"true"
]]
&&
\
if
[[
"
${
ENABLE_NODE_LOGGING
:-}
"
==
"true"
]]
&&
\
[[
"
${
LOGGING_DESTINATION
:-}
"
==
"elasticsearch"
]]
&&
\
[[
"
${
LOGGING_DESTINATION
:-}
"
==
"elasticsearch"
]]
&&
\
[[
"
${
ENABLE_CLUSTER_LOGGING
:-}
"
==
"true"
]]
;
then
[[
"
${
ENABLE_CLUSTER_LOGGING
:-}
"
==
"true"
]]
;
then
...
...
cluster/gce/util.sh
View file @
d903d328
...
@@ -898,6 +898,7 @@ REGION: $(yaml-quote ${REGION})
...
@@ -898,6 +898,7 @@ REGION: $(yaml-quote ${REGION})
VOLUME_PLUGIN_DIR:
$(
yaml-quote
${
VOLUME_PLUGIN_DIR
})
VOLUME_PLUGIN_DIR:
$(
yaml-quote
${
VOLUME_PLUGIN_DIR
})
KUBELET_ARGS:
$(
yaml-quote
${
KUBELET_ARGS
})
KUBELET_ARGS:
$(
yaml-quote
${
KUBELET_ARGS
})
REQUIRE_METADATA_KUBELET_CONFIG_FILE:
$(
yaml-quote
true
)
REQUIRE_METADATA_KUBELET_CONFIG_FILE:
$(
yaml-quote
true
)
ENABLE_NETD:
$(
yaml-quote
${
ENABLE_NETD
:-
false
})
EOF
EOF
if
[[
"
${
master
}
"
==
"true"
&&
"
${
MASTER_OS_DISTRIBUTION
}
"
==
"gci"
]]
||
\
if
[[
"
${
master
}
"
==
"true"
&&
"
${
MASTER_OS_DISTRIBUTION
}
"
==
"gci"
]]
||
\
[[
"
${
master
}
"
==
"false"
&&
"
${
NODE_OS_DISTRIBUTION
}
"
==
"gci"
]]
||
\
[[
"
${
master
}
"
==
"false"
&&
"
${
NODE_OS_DISTRIBUTION
}
"
==
"gci"
]]
||
\
...
...
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