-
-
Notifications
You must be signed in to change notification settings - Fork 276
feat: add extra containers to kratos cleanup cronjob #795
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 extra containers to kratos cleanup cronjob #795
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there!
All of those features sound great, and I think they would be an overall benefit to the system and not only kratos :) Could you expand the features to hydra as well?
Additionally:
- please run
make helm-docs
to update the readme after changes to the values.yaml - please add a new test case - values.yaml to the
hacks/values
directory with examples of the new fields, like extraContainres for the cronjob. This allows us to rener the manifests and verify them in the CI :)
164573f
to
55691b7
Compare
# image: ... | ||
|
||
# -- Set automounting of the SA token | ||
automountServiceAccountToken: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matched the default value for Hydra's janitor cron job.
@Demonsthere and @piotrmsc I've addressed the feedback:
The Hydra Janitor cron job already supports extra containers and extra init containers, but I added test values to In addition, I added support for extra init containers to the Kratos cleanup cron job because they were supported for Hydra Janitor. |
55691b7
to
8e5e1cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
This pull request enhances the Kratos Helm chart, specifically focusing on the cleanup cronjob.
Support for Extra Containers: Added the ability to define extra containers for the Kratos cleanup cronjob, allowing users to specify sidecar containers such as a cloud SQL proxy for database connections.
Service Account Configuration:
automountServiceAccountToken
,shareProcessNamespace
, and a dedicated service account for the cleanup cronjob.cronjob-cleanup.yaml
to include these configurations, ensuring the cronjob can operate with specific permissions and namespace sharing as needed.Values File: Added new fields under
cronjob.cleanup
invalues.yaml
to configureautomountServiceAccountToken
,shareProcessNamespace
, and service account settings.Helper Function Update: Updated
_helpers.tpl
to include a new helper functionkratos.cleanup.serviceAccountName
for generating the service account name for the cleanup cronjob.RBAC Configuration: Created a new
rbac-cleanup.yaml
file to define a ServiceAccount for the cleanup cronjob, similar to the existing job configuration.These changes expand the flexibility of the Kratos cleanup cronjob, allowing for more customized deployments.
Related Issue or Design Document
This PR comprises of simple changes to existing templates and the Kratos
values.yaml
file following the same pattern used for other jobs (e.g. the migration job).Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
Further comments