Skip to content

Commit

Permalink
Revert "Use Chainguard's minio, rqlite, and dex images (#4191)"
Browse files Browse the repository at this point in the history
This reverts commit ad7d0ea.
  • Loading branch information
sgalsaleh committed Dec 6, 2023
1 parent 4db82ed commit e4f6e89
Show file tree
Hide file tree
Showing 42 changed files with 137 additions and 278 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/alpha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
id: scan
uses: aquasecurity/trivy-action@master
with:
image-ref: "cgr.dev/chainguard/rqlite:${{ steps.dotenv.outputs.RQLITE_TAG }}"
image-ref: "rqlite/rqlite:${{ steps.dotenv.outputs.RQLITE_TAG }}"
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'rqlite-scan-output.sarif'
Expand All @@ -111,7 +111,7 @@ jobs:
id: scan
uses: aquasecurity/trivy-action@master
with:
image-ref: "cgr.dev/chainguard/minio:${{ steps.dotenv.outputs.minio_tag }}"
image-ref: "minio/minio:${{ steps.dotenv.outputs.minio_tag }}"
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'minio-scan-output.sarif'
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
id: scan
uses: aquasecurity/trivy-action@master
with:
image-ref: "cgr.dev/chainguard/dex:${{ steps.dotenv.outputs.dex_tag }}"
image-ref: "ghcr.io/dexidp/dex:${{ steps.dotenv.outputs.dex_tag }}"
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'dex-scan-output.sarif'
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ jobs:

- name: push minio for e2e
run: |
docker pull cgr.dev/chainguard/minio:${{ steps.dotenv.outputs.minio_tag }}
docker tag cgr.dev/chainguard/minio:${{ steps.dotenv.outputs.minio_tag }} ttl.sh/automated-${{ github.run_id }}/minio:${{ steps.dotenv.outputs.minio_tag }}
docker pull minio/minio:${{ steps.dotenv.outputs.minio_tag }}
docker tag minio/minio:${{ steps.dotenv.outputs.minio_tag }} ttl.sh/automated-${{ github.run_id }}/minio:${{ steps.dotenv.outputs.minio_tag }}
docker push ttl.sh/automated-${{ github.run_id }}/minio:${{ steps.dotenv.outputs.minio_tag }}
Expand All @@ -448,8 +448,8 @@ jobs:

- name: push rqlite for CI
run: |
docker pull cgr.dev/chainguard/rqlite:${{ steps.dotenv.outputs.RQLITE_TAG }}
docker tag cgr.dev/chainguard/rqlite:${{ steps.dotenv.outputs.RQLITE_TAG }} ttl.sh/automated-${{ github.run_id }}/rqlite:${{ steps.dotenv.outputs.RQLITE_TAG }}
docker pull rqlite/rqlite:${{ steps.dotenv.outputs.RQLITE_TAG }}
docker tag rqlite/rqlite:${{ steps.dotenv.outputs.RQLITE_TAG }} ttl.sh/automated-${{ github.run_id }}/rqlite:${{ steps.dotenv.outputs.RQLITE_TAG }}
docker push ttl.sh/automated-${{ github.run_id }}/rqlite:${{ steps.dotenv.outputs.RQLITE_TAG }}
Expand All @@ -467,8 +467,7 @@ jobs:

- name: push dex for CI
run: |
docker pull cgr.dev/chainguard/dex:${{ steps.dotenv.outputs.DEX_TAG }}
docker tag cgr.dev/chainguard/dex:${{ steps.dotenv.outputs.DEX_TAG }} ttl.sh/automated-${{ github.run_id }}/dex:${{ steps.dotenv.outputs.DEX_TAG }}
docker build --pull -f deploy/dex.Dockerfile -t ttl.sh/automated-${{ github.run_id }}/dex:${{ steps.dotenv.outputs.DEX_TAG }} --build-arg TAG=${{ steps.dotenv.outputs.DEX_TAG }} .
docker push ttl.sh/automated-${{ github.run_id }}/dex:${{ steps.dotenv.outputs.DEX_TAG }}
Expand Down
4 changes: 2 additions & 2 deletions .image.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated file, do not modify. This file is generated from a text file containing a list of images. The
# most recent tag is interpolated from the source repository and used to generate a fully qualified image
# name.
MINIO_TAG='0.20231101-dev'
MINIO_TAG='RELEASE.2023-11-11T08-14-41Z'
RQLITE_TAG='7.21.4'
DEX_TAG='2.37.0'
DEX_TAG='v2.37.0'
SCHEMAHERO_TAG='0.16.0'
LVP_TAG='v0.5.5'
39 changes: 17 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include Makefile.build.mk
CURRENT_USER := $(shell id -u -n)
MINIO_TAG ?= 0.20231101-dev
MINIO_TAG ?= RELEASE.2023-11-11T08-14-41Z
RQLITE_TAG ?= 7.21.4
DEX_TAG ?= 2.37.0
DEX_TAG ?= v2.37.0
LVP_TAG ?= v0.5.5

define sendMetrics
Expand Down Expand Up @@ -118,36 +118,31 @@ build-ttl.sh: build
all-ttl.sh: build-ttl.sh
source .image.env && IMAGE=ttl.sh/${CURRENT_USER}/kotsadm-migrations:24h make -C migrations build_schema

docker pull cgr.dev/chainguard/minio:${MINIO_TAG}
docker tag cgr.dev/chainguard/minio:${MINIO_TAG} ttl.sh/${CURRENT_USER}/minio:${MINIO_TAG}
docker pull minio/minio:${MINIO_TAG}
docker tag minio/minio:${MINIO_TAG} ttl.sh/${CURRENT_USER}/minio:${MINIO_TAG}
docker push ttl.sh/${CURRENT_USER}/minio:${MINIO_TAG}

docker pull cgr.dev/chainguard/rqlite:${RQLITE_TAG}
docker tag cgr.dev/chainguard/rqlite:${RQLITE_TAG} ttl.sh/${CURRENT_USER}/rqlite:${RQLITE_TAG}
docker pull rqlite/rqlite:${RQLITE_TAG}
docker tag rqlite/rqlite:${RQLITE_TAG} ttl.sh/${CURRENT_USER}/rqlite:${RQLITE_TAG}
docker push ttl.sh/${CURRENT_USER}/rqlite:${RQLITE_TAG}

.PHONY: build-alpha
build-alpha:
docker build --pull -f deploy/Dockerfile --build-arg version=${GIT_TAG} -t kotsadm/kotsadm:alpha .
docker push kotsadm/kotsadm:alpha

.PHONY: build-release
build-release:
mkdir -p bin/docker-archive/kotsadm
skopeo copy docker://kotsadm/kotsadm:${GIT_TAG} docker-archive:bin/docker-archive/kotsadm/${GIT_TAG}

mkdir -p bin/docker-archive/minio
docker pull cgr.dev/chainguard/minio:${MINIO_TAG}
docker tag cgr.dev/chainguard/minio:${MINIO_TAG} kotsadm/minio:${MINIO_TAG}
docker push kotsadm/minio:${MINIO_TAG}
skopeo copy docker-daemon:kotsadm/minio:${MINIO_TAG} docker-archive:bin/docker-archive/minio/${MINIO_TAG}

mkdir -p bin/docker-archive/rqlite
docker pull cgr.dev/chainguard/rqlite:${RQLITE_TAG}
docker tag cgr.dev/chainguard/rqlite:${RQLITE_TAG} kotsadm/rqlite:${RQLITE_TAG}
docker push kotsadm/rqlite:${RQLITE_TAG}
skopeo copy docker-daemon:kotsadm/rqlite:${RQLITE_TAG} docker-archive:bin/docker-archive/rqlite/${RQLITE_TAG}

mkdir -p bin/docker-archive/dex
docker pull cgr.dev/chainguard/dex:${DEX_TAG}
docker tag cgr.dev/chainguard/dex:${DEX_TAG} kotsadm/dex:${DEX_TAG}
docker build --pull -f deploy/dex.Dockerfile -t kotsadm/dex:${DEX_TAG} --build-arg TAG=${DEX_TAG} .
docker push kotsadm/dex:${DEX_TAG}
skopeo copy docker-daemon:kotsadm/dex:${DEX_TAG} docker-archive:bin/docker-archive/dex/${DEX_TAG}
mkdir -p bin/docker-archive/dex
skopeo copy docker://kotsadm/dex:${DEX_TAG} docker-archive:bin/docker-archive/dex/${DEX_TAG}

mkdir -p bin/docker-archive/minio
skopeo copy docker://minio/minio:${MINIO_TAG} docker-archive:bin/docker-archive/minio/${MINIO_TAG}

mkdir -p bin/docker-archive/local-volume-provider
skopeo copy docker://replicated/local-volume-provider:${LVP_TAG} docker-archive:bin/docker-archive/local-volume-provider/${LVP_TAG}
Expand Down
18 changes: 9 additions & 9 deletions cmd/imagedeps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ is useful to restrict release tags to a major version, or to filter out garbage

| Name | Image URI | Matcher Regexp (Optional) |
|------|--------------------|----------|
| Name of the image for example **minio** | Untagged image reference **cgr.dev/chainguard/minio**| An optional regular expression, only matching tags will be included. |
| Name of the image for example **minio** | Untagged image reference **ghcr.io/dexidp/dex**| An optional regular expression, only matching tags will be included. |

### Sample image-spec
```text
minio cgr.dev/chainguard/minio
rqlite cgr.dev/chainguard/rqlite
dex cgr.dev/chainguard/dex
minio minio/minio
rqlite rqlite/rqlite
dex ghcr.io/dexidp/dex
```
The preceding image spec will produce the following environment and Go files.
```shell
MINIO_TAG='0.20231025-dev'
RQLITE_TAG='7.21.4'
MINIO_TAG='RELEASE.2021-09-15T04-54-25Z'
RQLITE_TAG='7.7.0'
DEX_TAG='v2.30.0'
```
```go
package image

const (
Minio = "cgr.dev/chainguard/minio:0.20231025-dev"
Rqlite = "cgr.dev/chainguard/rqlite:7.21.4"
Dex = "cgr.dev/chainguard/dex:2.30.0"
Minio = "minio/minio:RELEASE.2021-09-15T04-54-25Z"
Rqlite = "rqlite/rqlite:7.7.0"
Dex = "ghcr.io/dexidp/dex:v2.30.0"
)
```

Expand Down
6 changes: 3 additions & 3 deletions cmd/imagedeps/image-spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
minio cgr.dev/chainguard/minio ^\b0\.\d+\b-dev$
rqlite cgr.dev/chainguard/rqlite ^([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)$
dex cgr.dev/chainguard/dex ^([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)$
minio minio/minio
rqlite rqlite/rqlite ^([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)$
dex ghcr.io/dexidp/dex
schemahero schemahero/schemahero ^([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)$
lvp replicated/local-volume-provider ^v([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)$
119 changes: 43 additions & 76 deletions cmd/imagedeps/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,72 +12,16 @@ import (
"github.com/stretchr/testify/require"
)

var (
minioTags = []string{
"sha256-00428f99c05677c91ad393c3017376e800d601708baa36e51091df3b9a67b324.att",
"latest-dev",
"latest",
"0.20231025.063325-r0-dev",
"0.20231025.063325-r0",
"0.20231025.063325-dev",
"0.20231025.063325",
"0.20231025-dev",
"0.20231025",
"0.20230904.195737-r1-dev",
"0.20230904.195737-r1",
"0.20230904.195737-dev",
"0.20230904.195737",
"0.20230904-dev",
"0.20230904",
"0-dev",
"0",
}

schemaheroTags = []string{
"0.13.2",
"0.13.1",
"0.12.7",
"0.12.2",
}

rqliteTags = []string{
"sha256-00122e405b3fa3b5105b0468f1fb72dcb32474968a971c45906a702120d55b58.att",
"latest-dev",
"latest",
"7",
"7-dev",
"7.7.0",
"7.7.0-dev",
"7.7.0-r2",
"7.7.0-r2-dev",
"7.6.2",
"7.6.1",
"7.6.0",
"6.10.2",
"6.10.1",
"6.8.2",
}

dexTags = []string{
"sha256-002adc734b3d83bb6be291b49eb8f3f95b905c411d404c2f4b52a759140739c9.att",
"latest-dev",
"latest",
"2.37.0",
"2.37.0-r3-dev",
"2.37.0-r3",
"2.37.0-dev",
"2.36.0",
"2.35.3",
"2.35.2",
"2.35.1",
}

lvpTags = []string{
"v0.3.3",
"v0.3.2",
"v0.3.1",
}
)
var releaseTags = []string{
"RELEASE.2022-06-11T19-55-32Z.fips",
"RELEASE.2021-09-09T21-37-06Z.xxx",
"RELEASE.2021-09-09T21-37-05Z",
"RELEASE.2021-09-09T21-37-04Z",
}
var semVerTags = []string{
"0.12.7", "0.12.6", "0.12.5",
"0.12.4", "0.12.3", "0.12.2",
}

func makeReleases(tags []string) []*github.RepositoryRelease {
var releases []*github.RepositoryRelease
Expand All @@ -102,21 +46,29 @@ func TestFunctional(t *testing.T) {
expectError bool
}{
{
name: "minio",
name: "basic",
fn: getTagFinder(
withRepoGetTags(
func(_ string) ([]string, error) {
return minioTags, nil
withGithubReleaseTagFinder(
func(_ string, _ string) ([]*github.RepositoryRelease, error) {
return makeReleases(releaseTags), nil
},
),
),
},
{
name: "schemahero",
name: "with-overrides",
fn: getTagFinder(
withRepoGetTags(
func(_ string) ([]string, error) {
return schemaheroTags, nil
return []string{
"0.13.2", "0.13.1",
"0.12.7", "0.12.2",
}, nil
},
),
withGithubReleaseTagFinder(
func(_ string, _ string) ([]*github.RepositoryRelease, error) {
return makeReleases(releaseTags), nil
},
),
),
Expand All @@ -130,17 +82,30 @@ func TestFunctional(t *testing.T) {
fn: getTagFinder(
withRepoGetTags(
func(_ string) ([]string, error) {
return rqliteTags, nil
return []string{
"7.7.0", "7.6.1", "7.6.0",
"6.10.2", "6.10.1", "6.8.2",
}, nil
},
),
),
},
{
name: "filter-github",
fn: getTagFinder(
withGithubReleaseTagFinder(
func(_ string, _ string) ([]*github.RepositoryRelease, error) {
return makeReleases(releaseTags), nil
},
),
),
},
{
name: "dex",
name: "schemahero",
fn: getTagFinder(
withRepoGetTags(
func(_ string) ([]string, error) {
return dexTags, nil
return semVerTags, nil
},
),
),
Expand All @@ -150,7 +115,9 @@ func TestFunctional(t *testing.T) {
fn: getTagFinder(
withRepoGetTags(
func(_ string) ([]string, error) {
return lvpTags, nil
return []string{
"v0.3.3",
}, nil
},
),
),
Expand Down
Loading

0 comments on commit e4f6e89

Please sign in to comment.