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
ccf40abd
Commit
ccf40abd
authored
Sep 12, 2017
by
Mik Vyatskov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make advanced audit policy on GCP configurable
parent
01154dd3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
common.sh
cluster/common.sh
+1
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+7
-1
No files found.
cluster/common.sh
View file @
ccf40abd
...
@@ -672,6 +672,7 @@ ENABLE_APISERVER_BASIC_AUDIT: $(yaml-quote ${ENABLE_APISERVER_BASIC_AUDIT:-})
...
@@ -672,6 +672,7 @@ ENABLE_APISERVER_BASIC_AUDIT: $(yaml-quote ${ENABLE_APISERVER_BASIC_AUDIT:-})
ENABLE_APISERVER_ADVANCED_AUDIT:
$(
yaml-quote
${
ENABLE_APISERVER_ADVANCED_AUDIT
:-})
ENABLE_APISERVER_ADVANCED_AUDIT:
$(
yaml-quote
${
ENABLE_APISERVER_ADVANCED_AUDIT
:-})
ENABLE_CACHE_MUTATION_DETECTOR:
$(
yaml-quote
${
ENABLE_CACHE_MUTATION_DETECTOR
:-
false
})
ENABLE_CACHE_MUTATION_DETECTOR:
$(
yaml-quote
${
ENABLE_CACHE_MUTATION_DETECTOR
:-
false
})
ENABLE_PATCH_CONVERSION_DETECTOR:
$(
yaml-quote
${
ENABLE_PATCH_CONVERSION_DETECTOR
:-
false
})
ENABLE_PATCH_CONVERSION_DETECTOR:
$(
yaml-quote
${
ENABLE_PATCH_CONVERSION_DETECTOR
:-
false
})
ADVANCED_AUDIT_POLICY:
$(
yaml-quote
${
ADVANCED_AUDIT_POLICY
:-})
ADVANCED_AUDIT_BACKEND:
$(
yaml-quote
${
ADVANCED_AUDIT_BACKEND
:-
log
})
ADVANCED_AUDIT_BACKEND:
$(
yaml-quote
${
ADVANCED_AUDIT_BACKEND
:-
log
})
GCE_API_ENDPOINT:
$(
yaml-quote
${
GCE_API_ENDPOINT
:-})
GCE_API_ENDPOINT:
$(
yaml-quote
${
GCE_API_ENDPOINT
:-})
PROMETHEUS_TO_SD_ENDPOINT:
$(
yaml-quote
${
PROMETHEUS_TO_SD_ENDPOINT
:-})
PROMETHEUS_TO_SD_ENDPOINT:
$(
yaml-quote
${
PROMETHEUS_TO_SD_ENDPOINT
:-})
...
...
cluster/gce/gci/configure-helper.sh
View file @
ccf40abd
...
@@ -480,6 +480,12 @@ EOF
...
@@ -480,6 +480,12 @@ EOF
# Write the config for the audit policy.
# Write the config for the audit policy.
function
create-master-audit-policy
{
function
create-master-audit-policy
{
local
-r
path
=
"
${
1
}
"
local
-r
path
=
"
${
1
}
"
local
-r
policy
=
"
${
2
:-}
"
if
[[
-n
"
${
policy
}
"
]]
;
then
echo
"
${
policy
}
"
>
"
${
path
}
"
return
fi
# Known api groups
# Known api groups
local
-r
known_apis
=
'
local
-r
known_apis
=
'
...
@@ -1317,7 +1323,7 @@ function start-kube-apiserver {
...
@@ -1317,7 +1323,7 @@ function start-kube-apiserver {
local
-r
audit_policy_file
=
"/etc/audit_policy.config"
local
-r
audit_policy_file
=
"/etc/audit_policy.config"
params+
=
" --audit-policy-file=
${
audit_policy_file
}
"
params+
=
" --audit-policy-file=
${
audit_policy_file
}
"
# Create the audit policy file, and mount it into the apiserver pod.
# Create the audit policy file, and mount it into the apiserver pod.
create-master-audit-policy
"
${
audit_policy_file
}
"
create-master-audit-policy
"
${
audit_policy_file
}
"
"
${
ADVANCED_AUDIT_POLICY
:-}
"
audit_policy_config_mount
=
"{
\"
name
\"
:
\"
auditpolicyconfigmount
\"
,
\"
mountPath
\"
:
\"
${
audit_policy_file
}
\"
,
\"
readOnly
\"
: true},"
audit_policy_config_mount
=
"{
\"
name
\"
:
\"
auditpolicyconfigmount
\"
,
\"
mountPath
\"
:
\"
${
audit_policy_file
}
\"
,
\"
readOnly
\"
: true},"
audit_policy_config_volume
=
"{
\"
name
\"
:
\"
auditpolicyconfigmount
\"
,
\"
hostPath
\"
: {
\"
path
\"
:
\"
${
audit_policy_file
}
\"
,
\"
type
\"
:
\"
FileOrCreate
\"
}},"
audit_policy_config_volume
=
"{
\"
name
\"
:
\"
auditpolicyconfigmount
\"
,
\"
hostPath
\"
: {
\"
path
\"
:
\"
${
audit_policy_file
}
\"
,
\"
type
\"
:
\"
FileOrCreate
\"
}},"
...
...
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