Skip to content

Commit 984bd3d

Browse files
Merge pull request #176 from hbelmiro/rebase-master
Rebase over kubeflow/pipelines@4c966f7
2 parents 30d0c45 + c62d012 commit 984bd3d

File tree

230 files changed

+14423
-6228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+14423
-6228
lines changed

.github/OWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
approvers:
22
- hbelmiro
33
- DharmitD
4+
- mprahl
45
reviewers:
56
- rimolive

.github/actions/kfp-cluster/action.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ inputs:
55
k8s_version:
66
description: "The Kubernetes version to use for the Kind cluster"
77
required: true
8+
pipeline_store:
9+
description: "Flag to deploy KFP with K8s Native API"
10+
default: 'database'
11+
required: false
812
proxy:
913
description: "If KFP should be deployed with proxy configuration"
1014
required: false
1115
default: false
16+
cache_enabled:
17+
description: "If KFP should be deployed with cache enabled globally"
18+
required: false
19+
default: 'true'
1220

1321
runs:
1422
using: "composite"
@@ -23,7 +31,7 @@ runs:
2331

2432
- name: Deploy Squid
2533
id: deploy-squid
26-
if: ${{ (inputs.proxy == 'true' )}}
34+
if: ${{ inputs.proxy == 'true' }}
2735
shell: bash
2836
run: ./.github/resources/squid/deploy-squid.sh
2937

@@ -39,8 +47,14 @@ runs:
3947
- name: Deploy KFP
4048
shell: bash
4149
run: |
50+
ARGS=""
51+
4252
if [ "${{ inputs.proxy }}" = "true" ]; then
43-
./.github/resources/scripts/deploy-kfp.sh --proxy
44-
else
45-
./.github/resources/scripts/deploy-kfp.sh
53+
ARGS="${ARGS} --proxy"
54+
elif [ "${{inputs.cache_enabled }}" = "false" ]; then
55+
ARGS="${ARGS} --cache-disabled"
56+
elif [ "${{inputs.pipeline_store }}" = "kubernetes" ]; then
57+
ARGS="${ARGS} --deploy-k8s-native"
4658
fi
59+
60+
./.github/resources/scripts/deploy-kfp.sh $ARGS
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: ml-pipeline
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- name: ml-pipeline-api-server
10+
env:
11+
- name: CACHEENABLED
12+
value: "false"

.github/resources/manifests/kubernetes-native/overlays/proxy/kustomization.yaml renamed to .github/resources/manifests/argo/overlays/cache-disabled/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resources:
55
- ../no-proxy
66

77
patches:
8-
- path: proxy-env.yaml
8+
- path: cache-env.yaml
99
target:
1010
kind: Deployment
1111
name: ml-pipeline

.github/resources/manifests/kubernetes-native/overlays/proxy/proxy-env.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/resources/scripts/deploy-kfp.sh

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,47 +24,68 @@ C_DIR="${BASH_SOURCE%/*}"
2424
if [[ ! -d "$C_DIR" ]]; then C_DIR="$PWD"; fi
2525
source "${C_DIR}/helper-functions.sh"
2626

27+
TEST_MANIFESTS=".github/resources/manifests/argo"
28+
PIPELINES_STORE="database"
2729
USE_PROXY=false
28-
29-
while getopts ":p-:" OPT; do
30-
case $OPT in
31-
-) [ "$OPTARG" = "proxy" ] && USE_PROXY=true || { echo "Unknown option --$OPTARG"; exit 1; };;
32-
\?) echo "Invalid option: -$OPTARG" >&2; exit 1;;
33-
esac
30+
CACHE_DISABLED=false
31+
32+
# Loop over script arguments passed. This uses a single switch-case
33+
# block with default value in case we want to make alternative deployments
34+
# in the future.
35+
while [ "$#" -gt 0 ]; do
36+
case "$1" in
37+
--deploy-k8s-native)
38+
PIPELINES_STORE="kubernetes"
39+
shift
40+
;;
41+
--proxy)
42+
USE_PROXY=true
43+
shift
44+
;;
45+
--cache-disabled)
46+
CACHE_DISABLED=true
47+
shift
48+
;;
49+
esac
3450
done
3551

36-
shift $((OPTIND-1))
52+
if [ "${USE_PROXY}" == "true" && "${PIPELINES_STORE}" == "kubernetes" ]; then
53+
echo "ERROR: Kubernetes Pipeline store cannot be deployed with proxy support."
54+
exit 1
55+
fi
3756

3857
kubectl apply -k "manifests/kustomize/cluster-scoped-resources/"
39-
kubectl apply -k "manifests/kustomize/base/crds"
4058
kubectl wait crd/applications.app.k8s.io --for condition=established --timeout=60s || EXIT_CODE=$?
4159
if [[ $EXIT_CODE -ne 0 ]]
4260
then
4361
echo "Failed to deploy cluster-scoped resources."
4462
exit $EXIT_CODE
4563
fi
4664

47-
#Install cert-manager
48-
make -C ./backend install-cert-manager || EXIT_CODE=$?
49-
if [[ $EXIT_CODE -ne 0 ]]
50-
then
51-
echo "Failed to deploy cert-manager."
52-
exit $EXIT_CODE
65+
# If pipelines store is set to 'kubernetes', cert-manager must be deployed
66+
if [ "${PIPELINES_STORE}" == "kubernetes" ]; then
67+
#Install cert-manager
68+
make -C ./backend install-cert-manager || EXIT_CODE=$?
69+
if [[ $EXIT_CODE -ne 0 ]]
70+
then
71+
echo "Failed to deploy cert-manager."
72+
exit $EXIT_CODE
73+
fi
5374
fi
5475

55-
# Deploy manifest
56-
TEST_MANIFESTS=".github/resources/manifests/argo"
57-
58-
if [[ "$PIPELINE_STORE" == "kubernetes" ]]; then
59-
TEST_MANIFESTS=".github/resources/manifests/kubernetes-native"
60-
fi
61-
62-
if $USE_PROXY; then
76+
# Manifests will be deployed according to the flag provided
77+
if $CACHE_DISABLED; then
78+
TEST_MANIFESTS="${TEST_MANIFESTS}/overlays/cache-disabled"
79+
elif $USE_PROXY; then
6380
TEST_MANIFESTS="${TEST_MANIFESTS}/overlays/proxy"
81+
elif [ "${PIPELINES_STORE}" == "kubernetes" ]; then
82+
TEST_MANIFESTS="${TEST_MANIFESTS}/overlays/kubernetes-native"
6483
else
6584
TEST_MANIFESTS="${TEST_MANIFESTS}/overlays/no-proxy"
6685
fi
6786

87+
echo "Deploying ${TEST_MANIFESTS}..."
88+
6889
kubectl apply -k "${TEST_MANIFESTS}" || EXIT_CODE=$?
6990
if [[ $EXIT_CODE -ne 0 ]]
7091
then
@@ -83,4 +104,3 @@ fi
83104
collect_artifacts kubeflow
84105

85106
echo "Finished KFP deployment."
86-

0 commit comments

Comments
 (0)