Skip to content

fix: kube-rbac-proxy defunct registry fix and dynamic-link library fix#379

Merged
dejanzele merged 3 commits intomainfrom
rich/registry-and-libc-fix
Mar 17, 2026
Merged

fix: kube-rbac-proxy defunct registry fix and dynamic-link library fix#379
dejanzele merged 3 commits intomainfrom
rich/registry-and-libc-fix

Conversation

@richscott
Copy link
Member

@richscott richscott commented Mar 16, 2026

Description

These changes fix two issues that cause the creation failure of a local cluster by the kind-all Make target.

  1. The gcr.io registry no longer hosts the kube-rbac-proxy:v0.16.0 image (that registry appears to have other, much older versions but not this one, nor any newer/higher version) - the two mentions of this image have been replaced by using docker.io instead.
  2. After that is fixed, there is a subsequent error where the armada-operator-controller pod immediately fails, with a message of /armada-operator: not found. After some research and testing, I verified that /armada-operator was indeed there, had correct permissions, etc. Replacing the scratch image base with alpine, then manually running a shell to attempt to run /armada-operator also failed with the same message.

Some more online research yielded a possible solution of changing the Dockerfile for the image with:

diff --git a/Dockerfile b/Dockerfile
index 0f8d47a..d61bc20 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,5 @@
-FROM scratch
+FROM alpine:latest
+RUN apk add libc6-compat

 COPY armada-operator /

This is due to the MUSL libc implementation being incompatible with the GNU libc implementation that most full-sized Linux systems have (e.g. Ubuntu). This did fix the problem, however it seemed like more of a change than would be preferred. I then reverted to using the scratch image, and instead changed the compilation to make a statically-linked binary:

 .PHONY: build
build: generate ## Build armada operator binary.
-       go build -o $(LOCALBIN_APP)/armada-operator cmd/main.go
+       CGO_ENABLED=0 go build -o $(LOCALBIN_APP)/armada-operator cmd/main.go

.PHONY: build-linux-amd64
build-linux-amd64: generate ## Build armada operator binary for linux/amd64.
-       GOOS=linux GOARCH=amd64 go build -o $(LOCALBIN_APP)/armada-operator cmd/main.go
+       CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(LOCALBIN_APP)/armada-operator cmd/main.go

This then worked correctly. All unit and integration tests passed, and make build docker-build kind-all-dev successfully builds and starts a functioning Armada cluster again. There are no user-visible changes with this PR.

Fixes #378

Type of change

Please select the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code Style Update (formatting, renaming)
  • Refactor (code changes that do not fix a bug or add a feature)
  • Documentation Update
  • Other (please describe):

How Has This Been Tested?

make test-unit, make test-integration, make build docker-build kind-all-dev all succeeded.

  • Test Configuration:

    • Kubernetes Version: kind v0.31.0 go1.25.8 linux/amd64
    • Helm Version: version.BuildInfo{Version:"v3.18.4", GitCommit:"d80839cf37d860c8aa9a0503fe463278f26cd5e2", GitTreeState:"clean", GoVersion:"go1.24.4"}
    • OS: Ubuntu 24.04.4 LTS
  • Test Steps:

    1. make test-unit
    2. make test-integration
    3. make build docker-build kind-all-dev, then verify all the expected Armada K8s pods are running, e.g. kubectl get pods -A.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Fetch kube-rbac-proxy image from docker.io, as grc.io
has stopped hosting it.

Signed-off-by: Rich Scott <richscott@sent.com>
This fixes the recent issue where running the container
results in an `exec /armada-operator: no such file or directory`
error.

Signed-off-by: Rich Scott <richscott@sent.com>
Revert back to using `scratch` image base, and don't add libc6-compat
package, but instead just build a static armada-operator binary.

Signed-off-by: Rich Scott <richscott@sent.com>
@richscott richscott self-assigned this Mar 16, 2026
@richscott richscott changed the title kube-rbac-proxy defunct registry fix and dynamic-link library fix fix: kube-rbac-proxy defunct registry fix and dynamic-link library fix Mar 16, 2026
@richscott richscott requested a review from nikola-jokic March 16, 2026 22:54
@dejanzele dejanzele merged commit 970a0ee into main Mar 17, 2026
5 of 6 checks passed
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.

kind-all Make target fails to start cluster due to now-defunct registry entry and dynamic lib problem

3 participants