chore(manager): tighten Deployment manifest defaults#134
Draft
viniciusdc wants to merge 1 commit into
Draft
Conversation
Three small Kubernetes-best-practice additions on the controller-manager Deployment template: - Add `runAsGroup: 65532` and `fsGroup: 65532` to the pod-level securityContext. The pod already runs `runAsUser: 65532` / `runAsNonRoot: true`; setting the matching group keeps uid/gid consistent and avoids inheriting whatever default group the base image ships with. - Declare `containerPort: 8081, name: health` on the manager container. The probes were already configured against `:8081` via `--health-probe-bind-address`, but the container's `ports` array was empty — manifest hygiene that lint tools flag. - Add an inline comment on `KEYCLOAK_ADMIN_SECRET_NAME` / `KEYCLOAK_ADMIN_SECRET_NAMESPACE` clarifying that those env vars hold Secret pointers (name + namespace), not credential values. Static-analysis rules that match `*_SECRET_*` env var names sometimes flag these as "secrets in env"; they're not. Routine manifest hygiene before the v0.1.0 cut. No code change, no runtime behaviour change. `make build-installer` renders the expected fields into `dist/install.yaml`; build + lint clean.
3 tasks
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
Three small Kubernetes-best-practice additions on the controller-manager Deployment template (
config/manager/manager.yaml). No code change, no runtime behaviour change.runAsGroup: 65532+fsGroup: 65532securityContextrunAsUser: 65532/runAsNonRoot: true. Setting the matching group keeps uid/gid consistent across the pod and avoids inheriting whatever default group the base image ships with.containerPort: 8081, name: healthports:8081via--health-probe-bind-address, but the container'sportswas empty. Manifest hygiene — common lint rule.KEYCLOAK_ADMIN_SECRET_*env vars*_SECRET_*patterns; the comment makes the intent explicit so future linters and reviewers don't re-relitigate the question.Verification
go build ./...— passesmake lint— 0 issuesmake build-installer IMG=...renders the expected fields intodist/install.yaml(verified locally:runAsGroup,fsGroup, thehealthcontainerPort all present)dist/chart/via the release pipeline on next tag — pure manifest changes propagate automaticallyRelated