From c36ca04f87c77b54212dfac0c3b8ae7b687e91dc Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Mon, 4 Mar 2024 10:34:49 +0100 Subject: [PATCH] Remove the release to dockerhub, only releasing to ghcr.io from now on --- .github/workflows/golang.yml | 4 ---- .goreleaser.yml | 2 -- Makefile | 3 --- charts/spiffe-vault/values.yaml | 2 +- example/README.md | 4 ++-- example/k8s/spiffe-vault.yaml | 2 +- example/spiffe-vault-cosign/Dockerfile | 2 +- 7 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/golang.yml b/.github/workflows/golang.yml index dadc573..948066b 100644 --- a/.github/workflows/golang.yml +++ b/.github/workflows/golang.yml @@ -84,7 +84,6 @@ jobs: - name: Login to container registries if: startsWith(github.ref, 'refs/tags/') run: | - echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u philipssoftware --password-stdin echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin ghcr.io - name: Set release variables @@ -127,7 +126,6 @@ jobs: - name: Logout from container registries if: ${{ always() }} run: | - docker logout docker logout ghcr.io - name: Cleanup signing keys @@ -207,7 +205,6 @@ jobs: - name: Login to Container registries if: startsWith(github.ref, 'refs/tags/') run: | - echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u philipssoftware --password-stdin echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin ghcr.io - name: Attach provenance to image @@ -225,6 +222,5 @@ jobs: - name: Logout from Container registries if: ${{ always() }} run: | - docker logout docker logout ghcr.io rm -f cosign.key diff --git a/.goreleaser.yml b/.goreleaser.yml index 0886cc4..6f44e17 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -39,8 +39,6 @@ dockers: - goos: linux goarch: amd64 image_templates: - - "philipssoftware/{{ .ProjectName }}:v{{ .Version }}" - - "philipssoftware/{{ .ProjectName }}:{{ .FullCommit }}" - "ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}" - "ghcr.io/philips-labs/{{ .ProjectName }}:{{ .FullCommit }}" build_flag_templates: diff --git a/Makefile b/Makefile index 64d3a2d..cc869c8 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,6 @@ LDFLAGS="-X $(PKG).GitVersion=$(GIT_VERSION) -X $(PKG).gitCommit=$(GIT_HASH) -X GO_BUILD_FLAGS := -trimpath -ldflags $(LDFLAGS) COMMANDS := spiffe-vault -HUB_REPO := philipssoftware/spiffe-vault GHCR_REPO := ghcr.io/philips-labs/spiffe-vault .PHONY: help @@ -43,8 +42,6 @@ build: $(addprefix bin/,$(COMMANDS)) ## builds binaries .PHONY: image image: ## build the binary in a docker image docker build \ - -t "$(HUB_REPO):$(GIT_TAG)" \ - -t "$(HUB_REPO):$(GIT_HASH)" \ -t "$(GHCR_REPO):$(GIT_TAG)" \ -t "$(GHCR_REPO):$(GIT_HASH)" \ . diff --git a/charts/spiffe-vault/values.yaml b/charts/spiffe-vault/values.yaml index 5a4f95b..51ccf1d 100644 --- a/charts/spiffe-vault/values.yaml +++ b/charts/spiffe-vault/values.yaml @@ -6,7 +6,7 @@ vault: address: http://vault-internal.vault-system:8200 image: - repository: philipssoftware/spiffe-vault + repository: ghcr.io/philips-labs/spiffe-vault pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" diff --git a/example/README.md b/example/README.md index 9e6baf3..1f99bc7 100644 --- a/example/README.md +++ b/example/README.md @@ -58,13 +58,13 @@ terraform apply -auto-approve Within kubernetes our Spire Helm chart also deploys the [spire-k8s-workload-registrar][spire-k8s-workload-registrar]. This Spire component takes care of registering workloads/pods with the Spire server. Once a workload is registered with the Spire Server it will be given a SPIFFE ID. -In `k8s/spiffe-vault.yaml` we defined we want to use the `philipssoftware/spiffe-vault-cosign` image that adds the [Cosign][cosign] binary in the image as well. So we can also play with cosign later in this example. +In `k8s/spiffe-vault.yaml` we defined we want to use the `ghcr.io/philips-labs/spiffe-vault-cosign` image that adds the [Cosign][cosign] binary in the image as well. So we can also play with cosign later in this example. Let's build this custom build now and then deploy our workload to Kubernetes. ```bash # from the example folder -docker build -t philipssoftware/spiffe-vault-cosign:latest spiffe-vault-cosign +docker build -t ghcr.io/philips-labs/spiffe-vault-cosign:latest spiffe-vault-cosign helm -n my-app upgrade my-app ../charts/spiffe-vault --create-namespace --install -f k8s/spiffe-vault.yaml ``` diff --git a/example/k8s/spiffe-vault.yaml b/example/k8s/spiffe-vault.yaml index 2ae8ce7..444bafc 100644 --- a/example/k8s/spiffe-vault.yaml +++ b/example/k8s/spiffe-vault.yaml @@ -1,5 +1,5 @@ image: - repository: philipssoftware/spiffe-vault-cosign + repository: ghcr.io/philips-labs/spiffe-vault-cosign tag: latest docker: diff --git a/example/spiffe-vault-cosign/Dockerfile b/example/spiffe-vault-cosign/Dockerfile index 55dfa6b..cae8fff 100644 --- a/example/spiffe-vault-cosign/Dockerfile +++ b/example/spiffe-vault-cosign/Dockerfile @@ -1,4 +1,4 @@ -FROM philipssoftware/spiffe-vault:v0.5.0 +FROM ghcr.io/philips-labs/spiffe-vault:v0.5.0 LABEL maintainer="marco.franssen@philips.com" ENV DOCKER_CERT_PATH=/certs/client COPY --from=docker:20.10.21-alpine3.16 /usr/local/bin/docker /usr/local/bin/docker