Skip to content

Commit b459abe

Browse files
[feature] change default image repository to ghcr (kubeflow#872)
* change default image repository to ghcr Signed-off-by: mahdikhashan <[email protected]> * remove docker credential access in csi workflow Signed-off-by: mahdikhashan <[email protected]> * remove docker credentials from workflow Signed-off-by: mahdikhashan <[email protected]> * remove docker credentials from ui workflow Signed-off-by: mahdikhashan <[email protected]> * set registry in build script and remove credential Signed-off-by: mahdikhashan <[email protected]> * revert docker credentials Signed-off-by: mahdikhashan <[email protected]> * use github action credentials in the workflow Signed-off-by: mahdikhashan <[email protected]> * use github action credentials Signed-off-by: mahdikhashan <[email protected]> * use github action credentials Signed-off-by: mahdikhashan <[email protected]> * pull images from ghcr Signed-off-by: mahdikhashan <[email protected]> * pull from ghcr Signed-off-by: mahdikhashan <[email protected]> * gha: align py test to registry param Signed-off-by: Matteo Mortari <[email protected]> * gha: align .github/workflows/build-image-pr.yml to img registry param Signed-off-by: Matteo Mortari <[email protected]> --------- Signed-off-by: mahdikhashan <[email protected]> Signed-off-by: Matteo Mortari <[email protected]> Co-authored-by: Matteo Mortari <[email protected]>
1 parent 48c4546 commit b459abe

10 files changed

+18
-16
lines changed

.github/workflows/build-and-push-csi-image.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ on:
1616
env:
1717
IMG_ORG: kubeflow
1818
IMG_REPO: model-registry-storage-initializer
19-
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
20-
DOCKER_PWD: ${{ secrets.DOCKERHUB_TOKEN }}
2119
PUSH_IMAGE: true
20+
DOCKER_USER: ${{ github.actor }}
21+
DOCKER_PWD: ${{ secrets.GITHUB_TOKEN }}
2222
jobs:
2323
build-csi-image:
2424
runs-on: ubuntu-latest

.github/workflows/build-and-push-image.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ on:
1616
env:
1717
IMG_ORG: kubeflow
1818
IMG_REPO: model-registry
19-
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
20-
DOCKER_PWD: ${{ secrets.DOCKERHUB_TOKEN }}
2119
PUSH_IMAGE: true
20+
DOCKER_USER: ${{ github.actor }}
21+
DOCKER_PWD: ${{ secrets.GITHUB_TOKEN }}
2222
jobs:
2323
build-image:
2424
runs-on: ubuntu-latest

.github/workflows/build-and-push-ui-images.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ on:
1010
env:
1111
IMG_ORG: kubeflow
1212
IMG_UI_REPO: model-registry-ui
13-
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
14-
DOCKER_PWD: ${{ secrets.DOCKERHUB_TOKEN }}
1513
PUSH_IMAGE: true
14+
DOCKER_USER: ${{ github.actor }}
15+
DOCKER_PWD: ${{ secrets.GITHUB_TOKEN }}
1616
jobs:
1717
build-image:
1818
runs-on: ubuntu-latest

.github/workflows/build-image-pr.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- "docs/**"
1313
- "clients/python/**"
1414
env:
15+
IMG_REGISTRY: ghcr.io
1516
IMG_ORG: kubeflow
1617
IMG_REPO: model-registry
1718
PUSH_IMAGE: false
@@ -44,12 +45,12 @@ jobs:
4445
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
4546
- name: Load Local Registry Test Image
4647
env:
47-
IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
48+
IMG: "${{ env.IMG_REGISTRY }}/${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
4849
run: |
4950
kind load docker-image -n chart-testing ${IMG}
5051
- name: Deploy Model Registry using manifests
5152
env:
52-
IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
53+
IMG: "${{ env.IMG_REGISTRY }}/${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
5354
run: ./scripts/deploy_on_kind.sh
5455
- name: Deployment logs
5556
run: |

.github/workflows/python-tests.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ jobs:
134134
kubernetes-version: "v1.27.11"
135135
env:
136136
FORCE_COLOR: "1"
137+
IMG_REGISTRY: ghcr.io
137138
IMG_ORG: kubeflow
138139
IMG_REPO: model-registry
139140
steps:
@@ -199,12 +200,12 @@ jobs:
199200
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
200201
- name: Load Local Registry Test Image
201202
env:
202-
IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
203+
IMG: "${{ env.IMG_REGISTRY }}/${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
203204
run: |
204205
kind load docker-image -n chart-testing-py-${{ matrix.python }} ${IMG}
205206
- name: Deploy Model Registry using manifests
206207
env:
207-
IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
208+
IMG: "${{ env.IMG_REGISTRY }}/${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
208209
run: ./scripts/deploy_on_kind.sh
209210
- name: Deploy Minio using manifests
210211
run: |

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ MLMD_VERSION ?= 1.14.0
1919
DOCKER ?= docker
2020
# default Dockerfile
2121
DOCKERFILE ?= Dockerfile
22-
# container registry, default to empty (dockerhub) if not explicitly set
23-
IMG_REGISTRY ?=
22+
# container registry, default to github container registry
23+
IMG_REGISTRY ?= ghcr.io
2424
# container image organization
2525
IMG_ORG ?= kubeflow
2626
# container image version

manifests/kustomize/base/model-registry-deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
command:
3030
- /model-registry
3131
- proxy
32-
image: kubeflow/model-registry:latest
32+
image: ghcr.io/kubeflow/model-registry:latest
3333
# empty placeholder environment for patching
3434
env: []
3535
ports:

manifests/kustomize/options/csi/clusterstoragecontainer.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
spec:
66
container:
77
name: storage-initializer
8-
image: kubeflow/model-registry-storage-initializer:latest
8+
image: ghcr.io/kubeflow/model-registry-storage-initializer:latest
99
env:
1010
- name: MODEL_REGISTRY_BASE_URL
1111
value: "model-registry-service.kubeflow.svc.cluster.local:8080"

manifests/kustomize/options/ui/base/kustomization.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ resources:
99

1010
images:
1111
- name: model-registry-ui
12-
newName: docker.io/kubeflow/model-registry-ui
12+
newName: ghcr.io/kubeflow/model-registry-ui
1313
newTag: latest

scripts/build_deploy.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
# see Makefile for the IMG_ variables semantic
6-
IMG_REGISTRY=""
6+
IMG_REGISTRY="${IMG_REGISTRY:-ghcr.io}"
77
IMG_ORG="${IMG_ORG:-kubeflow}"
88
IMG_REPO="${IMG_REPO:-model-registry}"
99
DOCKER_USER="${DOCKER_USER}"

0 commit comments

Comments
 (0)