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
b48b1b80
Commit
b48b1b80
authored
Jul 17, 2017
by
Daniel Kłobuszewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable overriding fluentd resources in GCP
parent
7bc1c676
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
0 deletions
+43
-0
config-default.sh
cluster/gce/config-default.sh
+7
-0
config-test.sh
cluster/gce/config-test.sh
+7
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+22
-0
config-default.sh
cluster/gke/config-default.sh
+7
-0
No files found.
cluster/gce/config-default.sh
View file @
b48b1b80
...
@@ -285,3 +285,10 @@ fi
...
@@ -285,3 +285,10 @@ fi
if
[[
-n
"
${
LOGROTATE_MAX_SIZE
:-}
"
]]
;
then
if
[[
-n
"
${
LOGROTATE_MAX_SIZE
:-}
"
]]
;
then
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
LOGROTATE_MAX_SIZE"
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
LOGROTATE_MAX_SIZE"
fi
fi
# Fluentd requirements
FLUENTD_GCP_MEMORY_LIMIT
=
"
${
FLUENTD_GCP_MEMORY_LIMIT
:-
300Mi
}
"
FLUENTD_GCP_CPU_REQUEST
=
"
${
FLUENTD_GCP_CPU_REQUEST
:-
100m
}
"
FLUENTD_GCP_MEMORY_REQUEST
=
"
${
FLUENTD_GCP_MEMORY_REQUEST
:-
200Mi
}
"
# Adding to PROVIDER_VARS, since this is GCP-specific.
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
FLUENTD_GCP_MEMORY_LIMIT FLUENTD_GCP_CPU_REQUEST FLUENTD_GCP_MEMORY_REQUEST"
cluster/gce/config-test.sh
View file @
b48b1b80
...
@@ -334,3 +334,10 @@ fi
...
@@ -334,3 +334,10 @@ fi
if
[[
-n
"
${
LOGROTATE_MAX_SIZE
:-}
"
]]
;
then
if
[[
-n
"
${
LOGROTATE_MAX_SIZE
:-}
"
]]
;
then
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
LOGROTATE_MAX_SIZE"
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
LOGROTATE_MAX_SIZE"
fi
fi
# Fluentd requirements
FLUENTD_GCP_MEMORY_LIMIT
=
"
${
FLUENTD_GCP_MEMORY_LIMIT
:-
300Mi
}
"
FLUENTD_GCP_CPU_REQUEST
=
"
${
FLUENTD_GCP_CPU_REQUEST
:-
100m
}
"
FLUENTD_GCP_MEMORY_REQUEST
=
"
${
FLUENTD_GCP_MEMORY_REQUEST
:-
200Mi
}
"
# Adding to PROVIDER_VARS, since this is GCP-specific.
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
FLUENTD_GCP_MEMORY_LIMIT FLUENTD_GCP_CPU_REQUEST FLUENTD_GCP_MEMORY_REQUEST"
cluster/gce/gci/configure-helper.sh
View file @
b48b1b80
...
@@ -1596,6 +1596,26 @@ function setup-addon-manifests {
...
@@ -1596,6 +1596,26 @@ function setup-addon-manifests {
chmod
644
"
${
dst_dir
}
"
/
*
chmod
644
"
${
dst_dir
}
"
/
*
}
}
# Fluentd manifest is modified using kubectl, which may not be available at
# this point. Run this as a background process.
function
wait-for-apiserver-and-update-fluentd
{
until
kubectl get nodes
do
sleep
10
done
kubectl
set
resources
--dry-run
--local
-f
${
fluentd_gcp_yaml
}
\
--limits
=
memory
=
${
FLUENTD_GCP_MEMORY_LIMIT
}
\
--requests
=
cpu
=
${
FLUENTD_GCP_CPU_REQUEST
}
,memory
=
${
FLUENTD_GCP_MEMORY_REQUEST
}
\
-o
yaml
>
${
fluentd_gcp_yaml
}
.tmp
mv
${
fluentd_gcp_yaml
}
.tmp
${
fluentd_gcp_yaml
}
}
# Trigger background process that will ultimately update fluentd resource
# requirements.
function
start-fluentd-resource-update
{
wait-for-apiserver-and-update-fluentd &
}
# 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
...
@@ -1679,6 +1699,8 @@ function start-kube-addons {
...
@@ -1679,6 +1699,8 @@ function start-kube-addons {
if
[[
"
${
ENABLE_NODE_LOGGING
:-}
"
==
"true"
]]
&&
\
if
[[
"
${
ENABLE_NODE_LOGGING
:-}
"
==
"true"
]]
&&
\
[[
"
${
LOGGING_DESTINATION
:-}
"
==
"gcp"
]]
;
then
[[
"
${
LOGGING_DESTINATION
:-}
"
==
"gcp"
]]
;
then
setup-addon-manifests
"addons"
"fluentd-gcp"
setup-addon-manifests
"addons"
"fluentd-gcp"
local
-r
fluentd_gcp_yaml
=
"
${
dst_dir
}
/fluentd-gcp/fluentd-gcp-ds.yaml"
start-fluentd-resource-update
fi
fi
if
[[
"
${
ENABLE_CLUSTER_UI
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_CLUSTER_UI
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"dashboard"
setup-addon-manifests
"addons"
"dashboard"
...
...
cluster/gke/config-default.sh
View file @
b48b1b80
...
@@ -47,3 +47,10 @@ KUBE_DELETE_NETWORK=${KUBE_DELETE_NETWORK:-false}
...
@@ -47,3 +47,10 @@ KUBE_DELETE_NETWORK=${KUBE_DELETE_NETWORK:-false}
# authentication) in metadata should be treated as canonical, and therefore disk
# authentication) in metadata should be treated as canonical, and therefore disk
# copies ought to be recreated/clobbered.
# copies ought to be recreated/clobbered.
METADATA_CLOBBERS_CONFIG
=
true
METADATA_CLOBBERS_CONFIG
=
true
# Fluentd requirements
FLUENTD_GCP_MEMORY_LIMIT
=
"
${
FLUENTD_GCP_MEMORY_LIMIT
:-
300Mi
}
"
FLUENTD_GCP_CPU_REQUEST
=
"
${
FLUENTD_GCP_CPU_REQUEST
:-
100m
}
"
FLUENTD_GCP_MEMORY_REQUEST
=
"
${
FLUENTD_GCP_MEMORY_REQUEST
:-
200Mi
}
"
# Adding to PROVIDER_VARS, since this is GCP-specific.
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
FLUENTD_GCP_MEMORY_LIMIT FLUENTD_GCP_CPU_REQUEST FLUENTD_GCP_MEMORY_REQUEST"
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