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: Mutating webhook #352

Open
wants to merge 9 commits into
base: 6/edge
Choose a base branch
from
Open

feat: Mutating webhook #352

wants to merge 9 commits into from

Conversation

Gu1nness
Copy link
Contributor

Issue

With big databases we need to have a long time to shutdown our databases.
Juju only leaves 30s to do that which is way too low.

With this PR, we deploy a sidecar container that serves mutating and validation webhook endpoints.
We then create the service for this webhook and the mutating endpoint associated with this service.
We take care of removing it at the end and to keep the certificates so all (fastapi) services can answer on that endpoint.

builder = builder.subject_name(x509.Name([x509.NameAttribute(NameOID.COMMON_NAME, app_name)]))
builder = builder.issuer_name(x509.Name([x509.NameAttribute(NameOID.COMMON_NAME, ns)]))
builder = builder.not_valid_before(datetime.datetime.today() - one_day)
builder = builder.not_valid_after(datetime.datetime.today() + (one_day * 365 * 100))
Copy link
Contributor

Choose a reason for hiding this comment

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

nice :)

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