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

fix(ci): update v2 deployment and ci tests #1380

Merged
merged 7 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.20.x
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: "run go unit tests"
run: go test -v -cover ./backend/...
backend-integration:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create k8s Kind Cluster
uses: container-tools/kind-action@v2
with:
Expand All @@ -43,7 +43,7 @@ jobs:
- name: build images
run: ./scripts/deploy/github/build-images.sh
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: "deploy kfp-tekton"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/v2/compiler/tektoncompiler/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
MetadataGPRCServicePort = "8080"
MLPipelineServiceHost = "ml-pipeline.kubeflow.svc.cluster.local"
MLPipelineServicePort = "8887"
LauncherImage = "gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4"
LauncherImage = "gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -276,7 +276,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -434,7 +434,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ spec:
value: metadata-grpc-service.kubeflow.svc.cluster.local
- name: METADATA_GRPC_SERVICE_PORT
value: "8080"
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
name: importer-main
computeResources: {}
- name: root-system-dag-driver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -313,7 +313,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -514,7 +514,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -256,7 +256,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -420,7 +420,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -599,7 +599,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -928,7 +928,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -1119,7 +1119,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -1284,7 +1284,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -1457,7 +1457,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -1630,7 +1630,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -326,7 +326,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -538,7 +538,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down Expand Up @@ -751,7 +751,7 @@ spec:
- launcher-v2
- --copy
- /tekton/home/launch
image: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
image: gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7
imagePullPolicy: Always
name: kfp-launcher
computeResources: {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: kubeflow

resources:
- namespace.yaml
bases:
- ../third-party/application/cluster-scoped
# - ../third-party/argo/installs/namespace/cluster-scoped
- ../base/pipeline/cluster-scoped
- ../base/cache-deployer/cluster-scoped
vars:
# NOTE: var name must be unique globally to allow composition of multiple kustomize
# packages. Therefore, we added prefix `kfp-cluster-scoped-` to distinguish it from
# others.
- name: kfp-cluster-scoped-namespace
objref:
# cache deployer sa's metadata.namespace will be first transformed by namespace field in kustomization.yaml
# so that we only need to change kustomization.yaml's namespace field for namespace customization.
kind: ServiceAccount
name: kubeflow-pipelines-cache-deployer-sa
apiVersion: v1
fieldref:
fieldpath: metadata.namespace
configurations:
- params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: '$(kfp-cluster-scoped-namespace)'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Allow Kustomize var to replace following fields.
varReference:
- path: metadata/name
kind: Namespace
1 change: 1 addition & 0 deletions manifests/kustomize/env/plain/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../cluster-scoped-resources-tekton
- ../../base/installs/generic
- ../../base/metadata/base
- ../../third-party/minio/base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ commonLabels:
images:
- name: gcr.io/ml-pipeline/api-server
newName: quay.io/aipipeline/apiserver
newTag: 2.0.0
newTag: 2.0.2
- name: gcr.io/ml-pipeline/persistenceagent
newName: quay.io/aipipeline/persistenceagent
newTag: 2.0.0
newTag: 2.0.2
- name: gcr.io/ml-pipeline/scheduledworkflow
newName: quay.io/aipipeline/scheduledworkflow
newTag: 2.0.0
newTag: 2.0.2

patchesStrategicMerge:
- tekton-config.yaml

patches:
- patch: |-
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: feature-flags
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
data:
running-in-environment-with-injected-sidecars: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ resources:
images:
- name: gcr.io/ml-pipeline/api-server
newName: quay.io/aipipeline/apiserver
newTag: 2.0.0
newTag: 2.0.2
- name: gcr.io/ml-pipeline/persistenceagent
newName: quay.io/aipipeline/persistenceagent
newTag: 2.0.0
newTag: 2.0.2
- name: gcr.io/ml-pipeline/scheduledworkflow
newName: quay.io/aipipeline/scheduledworkflow
newTag: 2.0.0
newTag: 2.0.2

labels:
- includeSelectors: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ images:
newTag: 1.8.0
- name: kfp-v2-dev-driver-controller
newName: quay.io/aipipeline/tekton-driver
newTag: 2.0.0
newTag: 2.0.2
- name: tekton-exithandler-controller
newName: quay.io/aipipeline/tekton-exithandler-controller
newTag: 2.0.0
newTag: 2.0.2
- name: tekton-exithandler-webhook
newName: quay.io/aipipeline/tekton-exithandler-webhook
newTag: 2.0.0
newTag: 2.0.2
- name: tekton-kfptask-controller
newName: quay.io/aipipeline/tekton-kfptask-controller
newTag: 2.0.0
newTag: 2.0.2
- name: tekton-kfptask-webhook
newName: quay.io/aipipeline/tekton-kfptask-webhook
newTag: 2.0.0
newTag: 2.0.2
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ metadata:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
data:
embedded-status: "full"
custom-task-version: "v1beta1"
running-in-environment-with-injected-sidecars: "false"
10 changes: 3 additions & 7 deletions scripts/deploy/github/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@ TAG="${TAG:-latest}"

docker system prune -a -f

docker build -q -t "${REGISTRY}/apiserver:${TAG}" -f backend/Dockerfile . && docker push "${REGISTRY}/apiserver:${TAG}"
docker build -q -t "${REGISTRY}/persistenceagent:${TAG}" -f backend/Dockerfile.persistenceagent . && docker push "${REGISTRY}/persistenceagent:${TAG}"
docker build -q -t "${REGISTRY}/scheduledworkflow:${TAG}" -f backend/Dockerfile.scheduledworkflow . && docker push "${REGISTRY}/scheduledworkflow:${TAG}"
docker build -q -t "${REGISTRY}/apiserver:${TAG}" -f backend/Dockerfile . && docker push "${REGISTRY}/apiserver:${TAG}" &
docker build -q -t "${REGISTRY}/persistenceagent:${TAG}" -f backend/Dockerfile.persistenceagent . && docker push "${REGISTRY}/persistenceagent:${TAG}" &
docker build -q -t "${REGISTRY}/scheduledworkflow:${TAG}" -f backend/Dockerfile.scheduledworkflow . && docker push "${REGISTRY}/scheduledworkflow:${TAG}" &
docker build -q -t "${REGISTRY}/tekton-driver:${TAG}" -f backend/Dockerfile.tektondriver . && docker push "${REGISTRY}/tekton-driver:${TAG}" &
docker build -q -t "${REGISTRY}/tekton-exithandler-controller:${TAG}" -f backend/Dockerfile.tekton-exithandler.controller . && docker push "${REGISTRY}/tekton-exithandler-controller:${TAG}" &
docker build -q -t "${REGISTRY}/tekton-exithandler-webhook:${TAG}" -f backend/Dockerfile.tekton-exithandler.webhook . && docker push "${REGISTRY}/tekton-exithandler-webhook:${TAG}"
docker build -q -t "${REGISTRY}/tekton-kfptask-controller:${TAG}" -f backend/Dockerfile.tekton-kfptask.controller . && docker push "${REGISTRY}/tekton-kfptask-controller:${TAG}" &
docker build -q -t "${REGISTRY}/tekton-kfptask-webhook:${TAG}" -f backend/Dockerfile.tekton-kfptask.webhook . && docker push "${REGISTRY}/tekton-kfptask-webhook:${TAG}" &

wait

Expand Down
3 changes: 3 additions & 0 deletions scripts/deploy/github/deploy-kfp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ then
exit 1
fi

echo "List Tekton control plane: "
kubectl get pod -n tekton-pipelines

echo "Finished kfp-tekton deployment."

Loading
Loading