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

feat: add seccompProfile #307

Merged
merged 2 commits into from
Aug 23, 2022
Merged

Conversation

joebowbeer
Copy link
Contributor

@joebowbeer joebowbeer commented Aug 19, 2022

Add/update securityContext configs:

  • seccompProfile.type RuntimeDefault is needed for compliance with restricted policies in Kubernetes 1.19+
  • Updated comment in metrics Deployment and README regarding readOnlyRootFilesystem

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • A PR is opened to update KEDA core (repo) (if applicable, ie. when deployment manifests are modified)
  • README is updated with new configuration values (if applicable)

Fixes #306
Fixes #301

@joebowbeer
Copy link
Contributor Author

NOTE: seccompProfile is only supported in Kubernetes 1.19+

This is causing the 1.17 and 1.18 tests to fail.

@tomkerkhove
Copy link
Member

It is best to use Helm operators to check if the feature is available to avoid this, can you take a look at this? This is typically done through the API version

@joebowbeer
Copy link
Contributor Author

@tomkerkhove wrote:

It is best to use Helm operators to check if the feature is available to avoid this, can you take a look at this? This is typically done through the API version

I think the options are:

  1. Add code to the templates to conditionally remove these elements from the replacement
  2. Comment-out these elements in values until 1.19 is the minimum supported version

@tomkerkhove
Copy link
Member

Add code to the templates to conditionally remove these elements from the replacement

I think that's the best approach

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
@joebowbeer
Copy link
Contributor Author

@tomkerkhove PTAL

Since seccompProfile requires Kubernetes 1.19+ (otherwise validation fails), I think this is the best that should be done until the minimum version is raised from 1.17 to 1.19.

While it should be possible to finagle the values here, it is not possible in keda/config (kedacore/keda#3562) and I think it's better to keep the two in sync.

@tomkerkhove
Copy link
Member

Let's make sure the change is being applied because nobody will notice the comment.

As per https://github.com/kedacore/governance/blob/main/SUPPORT.md#kubernetes-support I'll enforce Kubernetes v1.20.

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
@joebowbeer
Copy link
Contributor Author

joebowbeer commented Aug 23, 2022

@tomkerkhove PTAL

I restored the seccompProfile changes.

Copy link
Member

@tomkerkhove tomkerkhove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@tomkerkhove tomkerkhove added this to the KEDA Core vNext milestone Aug 23, 2022
@tomkerkhove tomkerkhove merged commit ddeb782 into kedacore:main Aug 23, 2022
@joebowbeer joebowbeer deleted the seccomp-profile branch August 23, 2022 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants