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

PodSecurityPolicy is a cluster-wide resource and should not have a namespace field #2234

Closed
iakat opened this issue Jun 17, 2020 · 2 comments · Fixed by #2241
Closed

PodSecurityPolicy is a cluster-wide resource and should not have a namespace field #2234

iakat opened this issue Jun 17, 2020 · 2 comments · Fixed by #2241
Labels
component/packaging good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! keepalive An issue or PR that will be kept alive and never marked as stale.

Comments

@iakat
Copy link

iakat commented Jun 17, 2020

From https://kubernetes.io/docs/concepts/policy/pod-security-policy/:

A Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification.

Examples as to where it's set:

namespace: {{ .Release.Namespace }}

This is an issue when using the manifests through other tools such as Terraform where they hit different API endpoints when a resource is expected to be cluster-wide or namespace-wide, thus resulting in errors until manually fixing the manifests.

@iakat
Copy link
Author

iakat commented Jun 17, 2020

ClusterRole in promtail is also an offender

namespace: {{ .Release.Namespace }}

iakat pushed a commit to Day2Tech/infra that referenced this issue Jun 17, 2020
@cyriltovena cyriltovena added component/packaging good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! keepalive An issue or PR that will be kept alive and never marked as stale. labels Jun 19, 2020
@cyriltovena
Copy link
Contributor

Thanks for reporting! If you want to contribute that’s an easy one ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/packaging good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! keepalive An issue or PR that will be kept alive and never marked as stale.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants