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

[Manifest] Cache - Enable cache and cache deployer in base kustomization file #3376

Merged
merged 43 commits into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
6994984
Initial execution cache
rui5i Feb 10, 2020
1534782
Merge branch 'master' of https://github.com/kubeflow/pipelines
rui5i Feb 27, 2020
d5ce005
Merge branch 'master' of https://github.com/kubeflow/pipelines
rui5i Mar 3, 2020
fdb3ba4
fix master
rui5i Mar 3, 2020
2b69c1e
Merge branch 'master' of https://github.com/kubeflow/pipelines
rui5i Mar 19, 2020
6a4dca2
Merge branch 'master' of https://github.com/kubeflow/pipelines
rui5i Mar 20, 2020
295f155
Merge branch 'master' of https://github.com/kubeflow/pipelines
rui5i Mar 23, 2020
b38e642
Change cache deployer job to stateful set
rui5i Mar 23, 2020
ad3fae9
Delete cache deployer job
rui5i Mar 23, 2020
0d42daf
Delete cache deployer job after it completes
rui5i Mar 24, 2020
d2e6b8d
minor fix
rui5i Mar 24, 2020
c84e716
fix indention
rui5i Mar 24, 2020
42ddf93
Change cache deployer job to statefulset
rui5i Mar 24, 2020
ee1b5e0
Remove extra cluster role for cache deployer
rui5i Mar 24, 2020
7e10184
remove cache in base kustomize file for upgrade test
rui5i Mar 24, 2020
b7e72da
minor fix
rui5i Mar 24, 2020
0bfd8c1
Merge branch 'master' of https://github.com/kubeflow/pipelines into f…
rui5i Mar 27, 2020
24c0514
Enable cache and cache-deployer in base kustomization file
rui5i Mar 27, 2020
1800597
fix
rui5i Mar 27, 2020
d55d563
fix
rui5i Mar 27, 2020
1c7614a
Merge branch 'master' of https://github.com/kubeflow/pipelines into f…
rui5i Mar 27, 2020
7f3ee4c
test
rui5i Mar 30, 2020
f28ff43
test
rui5i Mar 30, 2020
f47004d
test
rui5i Mar 30, 2020
742606b
Refactor cluster scope resources
rui5i Mar 30, 2020
072c7f2
refactor
rui5i Mar 30, 2020
9bece27
Add namespace for sa
rui5i Mar 30, 2020
7fc8984
Fix
rui5i Mar 30, 2020
50453b0
Add crds folder to cluster kustomization yaml
rui5i Mar 30, 2020
aacf0f2
namespace change
rui5i Mar 30, 2020
a6ed7f1
fix
rui5i Mar 30, 2020
502d4e0
fix
rui5i Mar 31, 2020
7336de5
fix
rui5i Mar 31, 2020
27f3f24
update test
rui5i Mar 31, 2020
a9b12e7
Merge master
rui5i Apr 1, 2020
23b2742
Rename cluster to cluster-scoped-resource
rui5i Apr 1, 2020
a56fac3
test adding namespace in kustomization file
rui5i Apr 1, 2020
96d0f91
revert namespace for clusterrolebinding
rui5i Apr 1, 2020
1a4db2c
fix
rui5i Apr 1, 2020
2f1ed15
Add db_name in cache_deployment manifest
rui5i Apr 1, 2020
fe6aa25
rename
rui5i Apr 2, 2020
f5dce81
Merge branch 'master' of https://github.com/kubeflow/pipelines into f…
rui5i Apr 2, 2020
08e80f0
change secret cluster role to role
rui5i Apr 2, 2020
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 manifests/kustomize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Deploy latest version of Kubeflow Pipelines

```
export PIPELINE_VERSION=0.3.0
kubectl apply -f https://storage.googleapis.com/ml-pipeline/pipeline-lite/$PIPELINE_VERSION/crd.yaml
kubectl apply -f https://storage.googleapis.com/ml-pipeline/pipeline-lite/$PIPELINE_VERSION/cluster-scoped-resources.yaml
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
kubectl apply -f https://storage.googleapis.com/ml-pipeline/pipeline-lite/$PIPELINE_VERSION/namespaced-install.yaml
```
Expand Down Expand Up @@ -44,7 +44,7 @@ To deploy Kubeflow Pipelines in namespace FOO,
- Then run

```
kubectl kustomize base/crds | kubectl apply -f -
kubectl kustomize cluster-scoped-resources | kubectl apply -f -
# then
kubectl kustomize env/dev | kubectl apply -f -
# or
Expand Down Expand Up @@ -87,7 +87,7 @@ You can uninstall Kubeflow Pipelines by running
```
export PIPELINE_VERSION=0.1.38
kubectl delete -f https://storage.googleapis.com/ml-pipeline/pipeline-lite/$PIPELINE_VERSION/namespaced-install.yaml
kubectl delete -f https://storage.googleapis.com/ml-pipeline/pipeline-lite/$PIPELINE_VERSION/crd.yaml
kubectl delete -f https://storage.googleapis.com/ml-pipeline/pipeline-lite/$PIPELINE_VERSION/cluster-scoped-resources.yaml
```

Or if you deploy through kustomize
Expand All @@ -97,7 +97,7 @@ kubectl kustomize env/dev | kubectl delete -f -
# or
kubectl kustomize env/gcp | kubectl delete -f -
# then
kubectl kustomize base/crds | kubectl delete -f -
kubectl kustomize cluster-scoped-resources | kubectl delete -f -
```

## Upgrade
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ metadata:
name: kubeflow-pipelines-cache-deployer-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kubeflow-pipelines-cache-deployer-secret-clusterrole
kind: Role
name: kubeflow-pipelines-cache-deployer-secret-role
subjects:
- kind: ServiceAccount
name: kubeflow-pipelines-cache-deployer-sa
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
kind: Role
metadata:
labels:
app: kubeflow-pipelines-cache-deployer-secret-clusterrole
name: kubeflow-pipelines-cache-deployer-secret-clusterrole
app: kubeflow-pipelines-cache-deployer-secret-role
name: kubeflow-pipelines-cache-deployer-secret-role
rules:
- apiGroups:
- ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ roleRef:
name: kubeflow-pipelines-cache-deployer-clusterrole
subjects:
- kind: ServiceAccount
name: kubeflow-pipelines-cache-deployer-sa
name: kubeflow-pipelines-cache-deployer-sa
namespace: kubeflow
Bobgy marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- cache-deployer-clusterrole.yaml
rui5i marked this conversation as resolved.
Show resolved Hide resolved
- cache-deployer-clusterrolebinding.yaml

4 changes: 1 addition & 3 deletions manifests/kustomize/base/cache-deployer/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- cache-deployer-clusterrole.yaml
- cache-deployer-clusterrolebinding.yaml
- cache-deployer-secret-clusterrole.yaml
- cache-deployer-secret-role.yaml
- cache-deployer-rolebinding.yaml
- cache-deployer-sa.yaml
- cache-deployer-statefulset.yaml
Expand Down
1 change: 1 addition & 0 deletions manifests/kustomize/base/cache/cache-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
args: ["--db_driver=$(DBCONFIG_DRIVER)",
"--db_host=$(DBCONFIG_HOST_NAME)",
"--db_port=$(DBCONFIG_PORT)",
"--db_name=$(DBCONFIG_DB_NAME)",
"--namespace_to_watch=$(NAMESPACE_TO_WATCH)",
]
imagePullPolicy: Always
Expand Down
6 changes: 6 additions & 0 deletions manifests/kustomize/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ bases:
- pipeline
- proxy
- metadata
- cache
- cache-deployer

resources:
- pipeline-application.yaml
Expand All @@ -28,3 +30,7 @@ images:
newTag: 0.3.0
- name: gcr.io/ml-pipeline/metadata-writer
newTag: 0.3.0
- name: gcr.io/ml-pipeline/cache-server
newTag: 0.3.0
- name: gcr.io/ml-pipeline/cache-deployer
newTag: 0.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../base/cache-deployer/cluster
- ../base/crds
16 changes: 12 additions & 4 deletions test/deploy-pipeline-lite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if [ -z "$KFP_DEPLOY_RELEASE" ]; then
echo "Deploying KFP in working directory..."
KFP_MANIFEST_DIR=${DIR}/manifests

pushd ${KFP_MANIFEST_DIR}/crd
rui5i marked this conversation as resolved.
Show resolved Hide resolved
pushd ${KFP_MANIFEST_DIR}/cluster-scoped-resources
kustomize build . | kubectl apply -f -
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
popd
Expand All @@ -58,8 +58,8 @@ if [ -z "$KFP_DEPLOY_RELEASE" ]; then
kustomize edit set image gcr.io/ml-pipeline/visualization-server=${GCR_IMAGE_BASE_DIR}/visualization-server:${GCR_IMAGE_TAG}
kustomize edit set image gcr.io/ml-pipeline/inverse-proxy-agent=${GCR_IMAGE_BASE_DIR}/inverse-proxy-agent:${GCR_IMAGE_TAG}
kustomize edit set image gcr.io/ml-pipeline/metadata-writer=${GCR_IMAGE_BASE_DIR}/metadata-writer:${GCR_IMAGE_TAG}
kustomize edit set image gcr.io/ml-pipeline-test/cache-server=${GCR_IMAGE_BASE_DIR}/cache-server:${GCR_IMAGE_TAG}
kustomize edit set image gcr.io/ml-pipeline-test/cache-deployer=${GCR_IMAGE_BASE_DIR}/cache-deployer:${GCR_IMAGE_TAG}
kustomize edit set image gcr.io/ml-pipeline/cache-server=${GCR_IMAGE_BASE_DIR}/cache-server:${GCR_IMAGE_TAG}
kustomize edit set image gcr.io/ml-pipeline/cache-deployer=${GCR_IMAGE_BASE_DIR}/cache-deployer:${GCR_IMAGE_TAG}
cat kustomization.yaml

kustomize build . | kubectl apply -f -
Expand All @@ -71,13 +71,16 @@ else
# temporarily checkout last release tag
git checkout $KFP_LATEST_RELEASE

# TODO: rename crd to cluster-scoped-resources after the release next to 0.3.0
pushd ${KFP_MANIFEST_DIR}/crd
kustomize build . | kubectl apply -f -
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
popd

pushd ${KFP_MANIFEST_DIR}/dev
kustomize build . | kubectl apply -f -
# TODO: remove line below after the release next to 0.3.0
kubectl delete deployment cache-server -n ${NAMESPACE}
rui5i marked this conversation as resolved.
Show resolved Hide resolved
popd

# go back to previous commit
Expand All @@ -89,12 +92,17 @@ echo "Status of pods after kubectl apply"
kubectl get pods -n ${NAMESPACE}

# wait for all deployments to be successful
# note, after we introduce statefulsets or daemonsets, we need to wait their rollout status here too
# note, after we introduce daemonsets, we need to wait their rollout status here too
for deployment in $(kubectl get deployments -n ${NAMESPACE} -o name)
do
kubectl rollout status $deployment -n ${NAMESPACE}
done

for statefulset in $(kubectl get statefulset -n ${NAMESPACE} -o name)
rui5i marked this conversation as resolved.
Show resolved Hide resolved
do
kubectl rollout status $statefulset -n ${NAMESPACE}
done

echo "Status of pods after rollouts are successful"
kubectl get pods -n ${NAMESPACE}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../manifests/kustomize/base/crds
- ../../../manifests/kustomize/cluster-scoped-resources
5 changes: 0 additions & 5 deletions test/manifests/dev/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: kubeflow
Bobgy marked this conversation as resolved.
Show resolved Hide resolved

# Actual image overrides will be added in test scripts.
images: []
resources:
- ../../../manifests/kustomize/env/dev
# Disables cache and cache-deployer temporarily because they block upgrade tests
# - ../../../manifests/kustomize/base/cache
# - ../../../manifests/kustomize/base/cache-deployer