Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sysadmin-ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Teckids
Team Sysadmin
sysadmin-ansible
Commits
9f6422a0
Commit
9f6422a0
authored
2 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Enable kubernetes api logging
parent
221d5122
No related branches found
No related tags found
1 merge request
!30
Enable kubernetes api logging
Pipeline
#100260
passed
2 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/k8s_master/files/custom/teckids-apiserver.yaml
+10
-0
10 additions, 0 deletions
roles/k8s_master/files/custom/teckids-apiserver.yaml
roles/k8s_master/files/custom/teckids-logging.yaml
+24
-0
24 additions, 0 deletions
roles/k8s_master/files/custom/teckids-logging.yaml
with
34 additions
and
0 deletions
roles/k8s_master/files/custom/teckids-apiserver.yaml
0 → 100644
+
10
−
0
View file @
9f6422a0
apiVersion
:
kubeadm.k8s.io/v1beta3
kind
:
ClusterConfiguration
kubernetesVersion
:
v1.23.5
apiServer
:
extraArgs
:
oidc-issuer-url
:
"
https://ticdesk.teckids.org/oauth"
oidc-client-id
:
"
RcO3weOpSnlenZcBaBbXKFoNpElQzxjU0O20T273"
oidc-username-claim
:
"
preferred_username"
audit-log-path
:
"
/var/log/audit.log"
audit-policy-file
:
"
/etc/kubernetes/manifests/custom/teckids-logging.yaml"
This diff is collapsed.
Click to expand it.
roles/k8s_master/files/custom/teckids-logging.yaml
0 → 100644
+
24
−
0
View file @
9f6422a0
apiVersion
:
audit.k8s.io/v1
kind
:
Policy
omitStages
:
-
RequestReceived
rules
:
# Log alle Requests für APIs mit deprecated Versionen. Leider kann man hier nicht
# auf die API-Version filtern, d.h. im Log werden auch aktuelle API-Versionen auftauchen.
-
level
:
Metadata
resources
:
# v1.25
-
group
:
batch
resources
:
[
"
cronjobs"
]
-
group
:
autoscaling
resources
:
[
"
horizontalpodautoscalers"
]
-
group
:
policy
resources
:
[
"
poddisruptionbudgets"
,
"
podsecuritypolicies"
]
# v1.26
-
group
:
autoscaling
resources
:
[
"
horizontalpodautoscalers"
]
-
group
:
flowcontrol.apiserver.k8s.io
resources
:
[
"
flowschemas"
,
"
prioritylevelconfigurations"
]
# v1.27
-
group
:
storage.k8s.io
resources
:
[
"
csistoragecapacities"
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment