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(KSPM admission controller): SSPROD-35354 - Make Dry Run mode configurable to a user in Chart Values. #1560

Merged
merged 17 commits into from
Jan 25, 2024

Conversation

dimar-apolicy
Copy link
Collaborator

What this PR does / why we need it:

Proposed changes will allow configuring the dry-run and the denyOnError settings of KSPM admission controller.
JIRA ticket: Make Dry Run mode configurable to a user in Chart Values

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

Check Contribution guidelines in README.md for more insight.

@dimar-apolicy dimar-apolicy requested a review from a team as a code owner January 7, 2024 18:45
@dimar-apolicy dimar-apolicy marked this pull request as draft January 7, 2024 22:20
@dimar-apolicy dimar-apolicy marked this pull request as ready for review January 7, 2024 22:57
Copy link
Collaborator

@lior-alafi-work lior-alafi-work left a comment

Choose a reason for hiding this comment

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

@dimar-apolicy can you also add the default value to be true?
i.e
value: {{ .Values.webhook.dryRun | default "true" | quote }}

@airadier airadier self-requested a review January 11, 2024 10:39
@dimar-apolicy dimar-apolicy requested a review from a team as a code owner January 14, 2024 21:54
@@ -54,8 +54,12 @@ spec:
image: {{ include "admissionController.kspm.image" . }}
imagePullPolicy: {{ .Values.webhook.v2.image.pullPolicy | default .Values.global.image.pullPolicy }}
env:
- name: DEFAULT_TIMEOUT
- value: {{ .Values.webhook.timeoutSeconds}}
- name: DENY_ON_ERROR
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we configure the failurePolicy accordingly?

EG: heres what happens with the webhook right now https://github.com/sysdiglabs/charts/blob/master/charts/admission-controller/templates/_helpers.tpl#L453

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@AlbertoBarba there is no change in existing logic, just using the value in another container.

@dimar-apolicy dimar-apolicy enabled auto-merge (squash) January 25, 2024 11:14
@dimar-apolicy dimar-apolicy merged commit 48a4f16 into main Jan 25, 2024
5 checks passed
@dimar-apolicy dimar-apolicy deleted the SSPROD-35354-dryrun-from-chart branch January 25, 2024 12:01
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.

4 participants