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

Use radix external registry default auth secret in buildah #1187

Merged
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c0b8648
restructure volumes and mounts to only use those required by acr or b…
nilsgstrabo Sep 2, 2024
0c259fd
split build job env vars into common, acr-specific and buildah-specific
nilsgstrabo Sep 3, 2024
f99a5ef
refactored acr build job
nilsgstrabo Sep 3, 2024
37c09b1
Merge branch 'master' into use-radix-external-registry-default-auth-s…
nilsgstrabo Sep 3, 2024
f31c723
add deprecated flag to prevent errors
nilsgstrabo Sep 3, 2024
5c57cda
use hash function to generate build job name for buildah
nilsgstrabo Sep 3, 2024
dc48579
refactor buildah job
nilsgstrabo Sep 4, 2024
603e09a
alias package
nilsgstrabo Sep 4, 2024
9f44173
rename buildah to buildkit
nilsgstrabo Sep 4, 2024
ea77b31
define new image for buildkit and mount default external registry secret
nilsgstrabo Sep 9, 2024
018ba96
misc restructure
nilsgstrabo Sep 10, 2024
eabac50
refactor and cleanup
nilsgstrabo Sep 10, 2024
07868f9
start refactor pipeline build test
nilsgstrabo Sep 12, 2024
d92c253
add tests for acr and buildkit jobs
nilsgstrabo Sep 12, 2024
331d548
use contruction function to create new build jobs
nilsgstrabo Sep 13, 2024
36699d7
unit tests
nilsgstrabo Sep 13, 2024
b70ddca
Merge branch 'master' into use-radix-external-registry-default-auth-s…
nilsgstrabo Sep 16, 2024
a479079
update chart versions
nilsgstrabo Sep 16, 2024
97e16f4
renamed methods and interface
nilsgstrabo Sep 16, 2024
01378fa
add comments to public methods
nilsgstrabo Sep 16, 2024
57813d1
remove unused err
nilsgstrabo Sep 16, 2024
6e076d0
unit tests
nilsgstrabo Sep 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,29 @@
"--DEBUG=true",
"--RADIX_TEKTON_IMAGE=radix-tekton:main-latest",
"--RADIX_IMAGE_BUILDER=radix-image-builder:master-latest",
"--RADIX_BUILDAH_IMAGE_BUILDER=quay.io/buildah/stable:v1.31",
"--RADIX_BUILDKIT_IMAGE_BUILDER=radix-buildkit-builder:main-latest",
// "--RADIX_BUILDAH_IMAGE_BUILDER=quay.io/buildah/stable:v1.31",
"--SECCOMP_PROFILE_FILENAME=allow-buildah.json",
"--RADIX_PIPELINE_GIT_CLONE_NSLOOKUP_IMAGE=radixdevcache.azurecr.io/alpine:3.20",
"--RADIX_PIPELINE_GIT_CLONE_GIT_IMAGE=radixdevcache.azurecr.io/alpine/git:2.45.2",
"--RADIX_PIPELINE_GIT_CLONE_BASH_IMAGE=radixdevcache.azurecr.io/bash:5.2",
"--RADIX_CLUSTER_TYPE=development",
"--RADIX_ZONE=dev",
"--RADIX_CLUSTERNAME=weekly-23",
"--RADIX_CLUSTERNAME=weekly-37",
"--RADIX_CONTAINER_REGISTRY=radixdev.azurecr.io",
"--RADIX_APP_CONTAINER_REGISTRY=radixdevapp.azurecr.io",
"--AZURE_SUBSCRIPTION_ID=16ede44b-1f74-40a5-b428-46cca9a5741b",
"--IMAGE_TAG=abcdw",
"--IMAGE_TAG=abcde",
"--BRANCH=main",
// "--COMMIT_ID=4069bf49619be55ee7dbdd426194cc14c30fde10",
"--PUSH_IMAGE=true",
"--USE_CACHE=true",
"--RADIX_FILE_NAME=/workspace/radixconfig.yaml",
"--TO_ENVIRONMENT=dev",
// "--IMAGE_TAG_NAME=server=1.23-alpine-slim",
// "--IMAGE_TAG_NAME=server2=1.22.1-alpine-perl",
"--RADIX_RESERVED_APP_DNS_ALIASES=api=radix-api,canary=radix-canary-golang,console=radix-web-console,cost-api=radix-cost-allocation-api,webhook=radix-github-webhook",
"--RADIX_RESERVED_DNS_ALIASES=grafana,prometheus,www"
"--RADIX_RESERVED_DNS_ALIASES=grafana,prometheus,www",
"--RADIX_EXTERNAL_REGISTRY_DEFAULT_AUTH_SECRET=radix-external-registry-default-auth"
]
},
{
Expand Down Expand Up @@ -144,7 +145,8 @@
"RADIX_DEPLOYMENTS_PER_ENVIRONMENT_HISTORY_LIMIT": "10",
"RADIX_PIPELINE_JOBS_HISTORY_LIMIT": "5",
"SECCOMP_PROFILE_FILENAME": "allow-buildah.json",
"RADIX_BUILDAH_IMAGE_BUILDER": "quay.io/buildah/stable:v1.31",
// "RADIX_BUILDAH_IMAGE_BUILDER": "quay.io/buildah/stable:v1.31",
"RADIX_BUILDKIT_IMAGE_BUILDER": "radix-buildkit-builder:main-latest",
"RADIX_RESERVED_APP_DNS_ALIASES": "api=radix-api,canary=radix-canary-golang,console=radix-web-console,cost-api=radix-cost-allocation-api,webhook=radix-github-webhook",
"RADIX_RESERVED_DNS_ALIASES": "grafana,prometheus,www",
"RADIXOPERATOR_CERTIFICATE_AUTOMATION_CLUSTER_ISSUER": "digicert-http01",
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,18 @@ mocks: bootstrap
mockgen -source ./pkg/apis/job/job_history.go -destination ./radix-operator/job/job_history_mock.go -package job
mockgen -source ./pipeline-runner/internal/wait/job.go -destination ./pipeline-runner/internal/wait/job_mock.go -package wait
mockgen -source ./pipeline-runner/internal/watcher/radix_deployment_watcher.go -destination ./pipeline-runner/internal/watcher/radix_deployment_watcher_mock.go -package watcher
mockgen -source ./pipeline-runner/internal/jobs/build/interface.go -destination ./pipeline-runner/internal/jobs/build/mock/job.go -package mock



.PHONY: build-pipeline
build-pipeline:
docker build -t $(DOCKER_REGISTRY)/radix-pipeline:$(VERSION) -t $(DOCKER_REGISTRY)/radix-pipeline:$(BRANCH)-$(VERSION) -t $(DOCKER_REGISTRY)/radix-pipeline:$(TAG) -f pipeline.Dockerfile .
docker buildx build -t $(DOCKER_REGISTRY)/radix-pipeline:$(VERSION) -t $(DOCKER_REGISTRY)/radix-pipeline:$(BRANCH)-$(VERSION) -t $(DOCKER_REGISTRY)/radix-pipeline:$(TAG) --platform linux/arm64,linux/amd64 -f pipeline.Dockerfile .

.PHONY: deploy-pipeline
deploy-pipeline: build-pipeline
deploy-pipeline:
az acr login --name $(CONTAINER_REPO)
docker push $(DOCKER_REGISTRY)/radix-pipeline:$(BRANCH)-$(VERSION)
docker push $(DOCKER_REGISTRY)/radix-pipeline:$(VERSION)
docker push $(DOCKER_REGISTRY)/radix-pipeline:$(TAG)
docker buildx build -t $(DOCKER_REGISTRY)/radix-pipeline:$(VERSION) -t $(DOCKER_REGISTRY)/radix-pipeline:$(BRANCH)-$(VERSION) -t $(DOCKER_REGISTRY)/radix-pipeline:$(TAG) --platform linux/arm64,linux/amd64 -f pipeline.Dockerfile --push .

.PHONY: build-operator
build-operator:
Expand Down
4 changes: 2 additions & 2 deletions charts/radix-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: radix-operator
version: 1.38.4
appVersion: 1.58.4
version: 1.39.0
appVersion: 1.59.0
kubeVersion: ">=1.24.0"
description: Radix Operator
keywords:
Expand Down
6 changes: 3 additions & 3 deletions charts/radix-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ spec:
value: {{ .Values.imageBuilder }}
- name: RADIXOPERATOR_JOB_SCHEDULER
value: {{ .Values.jobScheduler }}
- name: USE_CACHE
value: {{ .Values.useImageBuilderCache | quote }}
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
- name: LOG_PRETTY
Expand Down Expand Up @@ -157,8 +155,10 @@ spec:
{{- end }}
- name: SECCOMP_PROFILE_FILENAME
value: {{ .Values.seccompProfile.fileNameOnNode }}
- name: RADIX_BUILDAH_IMAGE_BUILDER
- name: RADIX_BUILDAH_IMAGE_BUILDER # TODO: Deprecated, remove
value: {{ .Values.buildahImageBuilder }}
- name: RADIX_BUILDKIT_IMAGE_BUILDER
value: {{ .Values.buildKitImageBuilder }}
- name: RADIX_PIPELINE_GIT_CLONE_NSLOOKUP_IMAGE
value: {{ .Values.gitCloneNsLookupImage }}
- name: RADIX_PIPELINE_GIT_CLONE_GIT_IMAGE
Expand Down
4 changes: 2 additions & 2 deletions charts/radix-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ kubeClientRateLimitQPS: 5

configToMap: radix-config-2-map:master-latest
imageBuilder: radix-image-builder:master-latest
buildahImageBuilder: xx
buildKitImageBuilder: radix-buildkit-builder:main-latest # TODO: Configure in radix-flux
buildahImageBuilder: xx # TODO: Deprecated, remove
jobScheduler: radix-job-scheduler:main-latest
radixTekton: radix-tekton:main-latest

Expand All @@ -25,7 +26,6 @@ gitCloneNsLookupImage: "" # Image containing nslookup, e.g. "alpine:3.20". Defau
gitCloneGitImage: "" # Image containing git, e.g. "alpine/git:2.45.2". Defaults to "alpine/git:latest" if not set
gitCloneBashImage: "" # Image containing bash, e.g. "bash:5.2". Defaults to "bash:latest" if not set

useImageBuilderCache: 0
reservedAppDNSAlias:
api: radix-api
canary: radix-canary-golang
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ require (
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.26.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/sync v0.8.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.31.0
Expand Down Expand Up @@ -80,7 +81,6 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
Expand Down
5 changes: 1 addition & 4 deletions operator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@ FROM gcr.io/distroless/static
WORKDIR /app
COPY --from=builder /build/radix-operator .
USER 1000
ENTRYPOINT ["/app/radix-operator"]



ENTRYPOINT ["/app/radix-operator"]
65 changes: 0 additions & 65 deletions pipeline-runner/internal/commandbuilder/command.go

This file was deleted.

54 changes: 0 additions & 54 deletions pipeline-runner/internal/commandbuilder/command_test.go

This file was deleted.

Loading
Loading