Infra 48603 kubelock support new version rbac#387
Open
nabadger wants to merge 2 commits into
Open
Conversation
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.
Summary
Updates
standard-application-stackto v11.4.0 for kubelock v0.4.x: scoped Lease RBAC for the new GitLab kubelock release, retained legacy Endpoints RBAC for migration, and optional centralised kubelock binary injection via Helm.Background
kubelock v0.4.0+ (
gitlab.com/mintel/satoshi/tools/kubelock) switched from Endpoints-based to Lease-based leader election. Apps still on the oldmintel/kubelockimage need Endpoints RBAC; new kubelock needs scoped Lease RBAC.Today many teams bundle kubelock into application images. This MR adds an opt-in Helm path to inject the binary from a centrally managed ECR image instead.
Changes
Kubelock RBAC (when
kubelock.enabled)helpers/_kubelock.yaml(mintel_common.kubelockRoleRules)resourceNamestokubelock.nameOverrideor release/job fullname (new kubelock)Kubelock binary injection (opt-in:
kubelock.injectBinary: true)kubelock.imageinto a sharedemptyDir/usr/local/bin/kubelock(overwrites any bundled copy)551844124467.dkr.ecr.${CLUSTER_REGION}.amazonaws.com/gitlab/mintel/satoshi/tools/kubelock:v0.4.1New values
Job-level overrides via
jobDefaults.kubelock/jobs[].kubelock(image defaults fall back to release-level config).Adoption
RBAC only (existing bundled kubelock, upgrading to v0.4.x):
Centralised binary (remove kubelock from app Dockerfile):
Requires kubelock v0.4.1+ (busybox-based image with
/bin/shfor the init copy step).Upgrade notes
kubelock.enabled: false(default)kubelock.enabled: true: Lease rules gainresourceNamesscoping; Endpoints rules unchangedinjectBinaryis false by default — no init container/volume changes unless explicitly enabledinjectBinary: falseuntil ready to migrate