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
54f43f5f
Commit
54f43f5f
authored
Aug 01, 2017
by
gmarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow configuration of logrorate in GCE
parent
5ce3b359
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
common.sh
cluster/common.sh
+3
-1
config-default.sh
cluster/gce/config-default.sh
+8
-1
config-test.sh
cluster/gce/config-test.sh
+8
-1
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+2
-2
No files found.
cluster/common.sh
View file @
54f43f5f
...
@@ -759,7 +759,9 @@ EOF
...
@@ -759,7 +759,9 @@ EOF
for
var_name
in
${
PROVIDER_VARS
}
;
do
for
var_name
in
${
PROVIDER_VARS
}
;
do
eval
"local var_value=
\$
(yaml-quote
\$
{
${
var_name
}
})"
eval
"local var_value=
\$
(yaml-quote
\$
{
${
var_name
}
})"
echo
"
${
var_name
}
:
${
var_value
}
"
>>
$file
cat
>>
$file
<<
EOF
${
var_name
}
:
${
var_value
}
EOF
done
done
fi
fi
...
...
cluster/gce/config-default.sh
View file @
54f43f5f
...
@@ -229,7 +229,7 @@ if [ ${ENABLE_IP_ALIASES} = true ]; then
...
@@ -229,7 +229,7 @@ if [ ${ENABLE_IP_ALIASES} = true ]; then
# the subnet and is the range used for node instance IPs.
# the subnet and is the range used for node instance IPs.
NODE_IP_RANGE
=
"
$(
get-node-ip-range
)
"
NODE_IP_RANGE
=
"
$(
get-node-ip-range
)
"
# Add to the provider custom variables.
# Add to the provider custom variables.
PROVIDER_VARS
=
"
${
PROVIDER_VARS
}
ENABLE_IP_ALIASES"
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-
}
ENABLE_IP_ALIASES"
fi
fi
# Admission Controllers to invoke prior to persisting objects in cluster
# Admission Controllers to invoke prior to persisting objects in cluster
...
@@ -278,3 +278,10 @@ SOFTLOCKUP_PANIC="${SOFTLOCKUP_PANIC:-false}" # true, false
...
@@ -278,3 +278,10 @@ SOFTLOCKUP_PANIC="${SOFTLOCKUP_PANIC:-false}" # true, false
METADATA_CLOBBERS_CONFIG
=
"
${
METADATA_CLOBBERS_CONFIG
:-
false
}
"
METADATA_CLOBBERS_CONFIG
=
"
${
METADATA_CLOBBERS_CONFIG
:-
false
}
"
ENABLE_BIG_CLUSTER_SUBNETS
=
"
${
ENABLE_BIG_CLUSTER_SUBNETS
:-
false
}
"
ENABLE_BIG_CLUSTER_SUBNETS
=
"
${
ENABLE_BIG_CLUSTER_SUBNETS
:-
false
}
"
if
[[
-n
"
${
LOGROTATE_FILES_MAX_COUNT
:-}
"
]]
;
then
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
LOGROTATE_FILES_MAX_COUNT"
fi
if
[[
-n
"
${
LOGROTATE_MAX_SIZE
:-}
"
]]
;
then
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
LOGROTATE_MAX_SIZE"
fi
cluster/gce/config-test.sh
View file @
54f43f5f
...
@@ -263,7 +263,7 @@ if [ ${ENABLE_IP_ALIASES} = true ]; then
...
@@ -263,7 +263,7 @@ if [ ${ENABLE_IP_ALIASES} = true ]; then
# the subnet and is the range used for node instance IPs.
# the subnet and is the range used for node instance IPs.
NODE_IP_RANGE
=
"
${
NODE_IP_RANGE
:-
10
.40.0.0/22
}
"
NODE_IP_RANGE
=
"
${
NODE_IP_RANGE
:-
10
.40.0.0/22
}
"
# Add to the provider custom variables.
# Add to the provider custom variables.
PROVIDER_VARS
=
"
${
PROVIDER_VARS
}
ENABLE_IP_ALIASES"
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-
}
ENABLE_IP_ALIASES"
fi
fi
# If we included ResourceQuota, we should keep it at the end of the list to prevent incrementing quota usage prematurely.
# If we included ResourceQuota, we should keep it at the end of the list to prevent incrementing quota usage prematurely.
...
@@ -327,3 +327,10 @@ if [[ "${ENABLE_APISERVER_ADVANCED_AUDIT}" == "true" ]]; then
...
@@ -327,3 +327,10 @@ if [[ "${ENABLE_APISERVER_ADVANCED_AUDIT}" == "true" ]]; then
fi
fi
ENABLE_BIG_CLUSTER_SUBNETS
=
"
${
ENABLE_BIG_CLUSTER_SUBNETS
:-
false
}
"
ENABLE_BIG_CLUSTER_SUBNETS
=
"
${
ENABLE_BIG_CLUSTER_SUBNETS
:-
false
}
"
if
[[
-n
"
${
LOGROTATE_FILES_MAX_COUNT
:-}
"
]]
;
then
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
LOGROTATE_FILES_MAX_COUNT"
fi
if
[[
-n
"
${
LOGROTATE_MAX_SIZE
:-}
"
]]
;
then
PROVIDER_VARS
=
"
${
PROVIDER_VARS
:-}
LOGROTATE_MAX_SIZE"
fi
cluster/gce/gci/configure-helper.sh
View file @
54f43f5f
...
@@ -163,12 +163,12 @@ function setup-logrotate() {
...
@@ -163,12 +163,12 @@ function setup-logrotate() {
# * keep only 5 old (rotated) logs, and will discard older logs.
# * keep only 5 old (rotated) logs, and will discard older logs.
cat
>
/etc/logrotate.d/allvarlogs
<<
EOF
cat
>
/etc/logrotate.d/allvarlogs
<<
EOF
/var/log/*.log {
/var/log/*.log {
rotate
5
rotate
${
LOGROTATE_FILES_MAX_COUNT
:-
5
}
copytruncate
copytruncate
missingok
missingok
notifempty
notifempty
compress
compress
maxsize
100M
maxsize
${
LOGROTATE_MAX_SIZE
:-
100M
}
daily
daily
dateext
dateext
dateformat -%Y%m%d-%s
dateformat -%Y%m%d-%s
...
...
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