feat: surface the authn service-certificate renewal knobs as values - #46
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to krateoplatformops/authn#76, which adds background renewal of authn's own
authn-clientconfigcertificate.Neither change is required for the fix to work.
.Values.envis a free-form map rendered into the ConfigMap, so the three new variables were already settable, and they need no new RBAC (the validity annotations are written with theget+updateon secrets the Role already grants). This PR is about making them discoverable and validated.chart/values.yaml— surface the knobsAUTHN_SERVICE_CRT_EXPIRES_IN: "8760h"— duration requested for authn's own certificate; previously hardcoded inmain.go.AUTHN_CRT_RENEWAL_THRESHOLD: "0.66"— fraction of the granted lifetime after which it is re-issued.AUTHN_CRT_RENEWAL_ENABLED: "true"— escape hatch back to the pre-renewal behaviour.All three defaults match the binary's own, so rendering is behaviourally unchanged — the ConfigMap simply gains three keys whose values the process would have used anyway.
chart/values.schema.json— newThe chart had no schema. This one types every key of
values.yaml, documents the certificate knobs, and isadditionalProperties: falseat the top level so typos are caught rather than silently ignored.Three things it must tolerate, each of which a naive strict schema gets wrong and each found by testing against a real install rather than by reading
values.yaml:service.nodePortis set by real installs but is not declared invalues.yaml. Added explicitly.envvalues may benull(installs nullAUTHN_KUBECONFIG_SERVER_URLto fall back to the in-cluster URL), so env entries are["string","null"]and unlisted variables are permitted.authn-crdandglobalare injected by Helm for subchart value passing, so a top-leveladditionalProperties: falserejects every install without them.Free-form blocks (
podSecurityContext,securityContext,resources, probes,affinity,nodeSelector, volumes, tolerations) are deliberately left open so arbitrary Kubernetes fields still pass.Verified with
helm template— passing: chart defaults, the real install's values (nodePort + null env), an explicit dev image override, the new knobs set explicitly, an arbitrary extra env var, andservice.type=LoadBalancer. Correctly rejected:replicaCountas a string, a bogusimage.pullPolicy, a bogusservice.type, and a typo'd top-level key.crd-chartis untouched — itsvalues.yamlis empty, so it has nothing to validate.