From 077e878721c49f3dc69fcc2b3a7e39c342711382 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 24 Aug 2020 13:32:43 +0200 Subject: [PATCH] Add quay.io image registry Docker Hub introduced container retention, which might delete some unused tags. Using quay.io as mirror. --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 6 ++++-- .goreleaser.yml | 3 +++ pkg/provisioner/provisioner.go | 12 ++++++------ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1d99c3..0579601 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-go@v2-beta with: - go-version: '^1.14.1' + go-version: '^1.14.3' - uses: actions/cache@v1 with: path: /home/runner/go/pkg/mod @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-go@v2-beta with: - go-version: '^1.14.1' + go-version: '^1.14.3' - uses: actions/cache@v1 with: path: /home/runner/go/pkg/mod diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f82910..c5c5bbf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,13 +13,15 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-go@v2-beta with: - go-version: '^1.14.1' + go-version: '^1.14.3' - uses: actions/cache@v1 with: path: /home/runner/go/pkg/mod key: go-mod-release - name: Login to Docker hub - run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_TOKEN }} + run: docker login -u "${{ secrets.DOCKER_HUB_USER }}" -p "${{ secrets.DOCKER_HUB_TOKEN }}" + - name: Login to Quay.io + run: docker login -u "${{ secrets.QUAY_IO_USER }}" -p "${{ secrets.QUAY_IO_TOKEN }}" quay.io - uses: goreleaser/goreleaser-action@v1 with: args: release --release-footer=.github/release-footer.md diff --git a/.goreleaser.yml b/.goreleaser.yml index aa018c1..f3c132c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,6 +3,7 @@ before: hooks: - go vet ./... + - go fmt ./... - go test -coverprofile c.out ./... builds: @@ -27,6 +28,8 @@ dockers: - image_templates: - "docker.io/ccremer/zfs-provisioner:v{{ .Version }}" - "docker.io/ccremer/zfs-provisioner:v{{ .Major }}" + - "quay.io/ccremer/zfs-provisioner:v{{ .Version }}" + - "quay.io/ccremer/zfs-provisioner:v{{ .Major }}" extra_files: - docker/zfs.sh - docker/update-permissions.sh diff --git a/pkg/provisioner/provisioner.go b/pkg/provisioner/provisioner.go index ef499de..9e4aed1 100644 --- a/pkg/provisioner/provisioner.go +++ b/pkg/provisioner/provisioner.go @@ -5,13 +5,13 @@ import ( ) const ( - DatasetPathAnnotation = "zfs.pv.kubernetes.io/zfs-dataset-path" - ZFSHostAnnotation = "zfs.pv.kubernetes.io/zfs-host" + DatasetPathAnnotation = "zfs.pv.kubernetes.io/zfs-dataset-path" + ZFSHostAnnotation = "zfs.pv.kubernetes.io/zfs-host" - RefQuotaProperty = "refquota" - RefReservationProperty = "refreservation" - ManagedByProperty = "io.kubernetes.pv.zfs:managed_by" - ReclaimPolicyProperty = "io.kubernetes.pv.zfs:reclaim_policy" + RefQuotaProperty = "refquota" + RefReservationProperty = "refreservation" + ManagedByProperty = "io.kubernetes.pv.zfs:managed_by" + ReclaimPolicyProperty = "io.kubernetes.pv.zfs:reclaim_policy" ) // ZFSProvisioner implements the Provisioner interface to create and export ZFS volumes