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(agent): add option to override security.openshift.io/v1 API presence #2051

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jsecchiero
Copy link
Collaborator

@jsecchiero jsecchiero commented Nov 21, 2024

What this PR does / why we need it:

Checklist

  • Title of the PR starts with type and scope, (e.g. feat(agent,node-analyzer,sysdig-deploy):)
  • Chart Version bumped for the respective charts
  • Variables are documented in the README.md (or README.tpl in some charts)
  • Check GithubAction checks (like lint) to avoid merge-check stoppers
  • All test files are added in the tests folder of their respective chart and have a "_test" suffix

@jsecchiero jsecchiero requested a review from a team as a code owner November 21, 2024 10:29
Copy link
Contributor

Hi @jsecchiero. Thanks for your PR.

After inspecting your changes someone with write access to this repo needs
to approve and run the workflow.

github-actions[bot]

This comment was marked as resolved.

@jsecchiero jsecchiero changed the title feat(agent) add option to override security.openshift.io/v1 API presence feat(agent): add option to override security.openshift.io/v1 API presence Nov 21, 2024
@github-actions github-actions bot dismissed their stale review November 21, 2024 10:30

All good!

@@ -404,3 +404,6 @@ tests:
tag: 1.31.2
# Allow to modify DNS policy
dnsPolicy: null
# Overrides `security.openshift.io/v1` API detection
# useful while using "helm template" and to generate security context constraints
hasAPISecurityOpenshiftV1Override: false

Choose a reason for hiding this comment

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

Given (as discussed):
• If .Values.hasAPISecurityOpenshiftV1Override is provided the SCC template will use that value, overriding (.Capabilities.APIVersions.Has "security.openshift.io/v1")
• If .Values.hasAPISecurityOpenshiftV1Override is not provided it will use (.Capabilities.APIVersions.Has "security.openshift.io/v1")

I would be inclined not to provide a default value here. This means the default behaviour will be to use (.Capabilities.APIVersions.Has "security.openshift.io/v1") and only if a value is purposefully provided will we override it.

I don't know if that has documentation implications though (ie will the chart docs not mention this value and essentially make it a secret override only found by reading charts/agent/templates/securitycontextconstraint.yaml? Maybe that is a desired side-effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants