Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDEV-19889 : exclude the nirmata resources from the policy #157

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/rbac-best-practices/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: rbac-best-practice-policies
description: Rbac Best Practice policy set
type: application
version: 0.2.0
version: 0.2.1
appVersion: 0.1.0
keywords:
- kubernetes
Expand Down
74 changes: 74 additions & 0 deletions charts/rbac-best-practices/pols/restrict-automount-sa-token.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,80 @@ spec:
- resources:
kinds:
- Pod
exclude:
any:
- resources:
kinds:
- Pod
selector:
matchLabels:
app: nirmata-kube-controller
- resources:
kinds:
- Pod
selector:
matchLabels:
app: otel-agent
- resources:
kinds:
- Pod
selector:
matchLabels:
app.kubernetes.io/name: nirmata-kyverno-operator
- resources:
kinds:
- Pod
selector:
matchLabels:
app.kubernetes.io/component: admission-controller
- resources:
kinds:
- Pod
selector:
matchLabels:
app.kubernetes.io/component: cleanup-controller
- resources:
kinds:
- Pod
selector:
matchLabels:
app.kubernetes.io/component: background-controller
- resources:
kinds:
- Pod
selector:
matchLabels:
app.kubernetes.io/component: reports-controller
- resources:
kinds:
- Pod
selector:
matchLabels:
job-name: "kyverno-cleanup-admission-reports-*"
- resources:
kinds:
- Pod
selector:
matchLabels:
job-name: "kyverno-cleanup-cluster-admission-reports-*"
- resources:
kinds:
- Pod
selector:
matchLabels:
job-name: "kyverno-cleanup-ephemeral-reports-*"
- resources:
kinds:
- Pod
selector:
matchLabels:
job-name: "kyverno-cleanup-cluster-ephemeral-reports-*"
- resources:
kinds:
- Pod
selector:
matchLabels:
job-name: "kyverno-cleanup-update-requests-*"
preconditions:
all:
- key: "{{ request.\"object\".metadata.labels.\"app.kubernetes.io/part-of\" || '' }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ spec:
message: "Auto-mounting of Service Account tokens is not allowed."
pattern:
spec:
automountServiceAccountToken: "false"
automountServiceAccountToken: "false"
Loading