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

feat(backend): isolate artifacts per namespace/profile/user using only one bucket #7725

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c9c3a9e
Seperate artifacts per namespace/profile/user
juliusvonkohout May 13, 2022
1218655
sync.py
juliusvonkohout May 13, 2022
fb03d90
Create Dockerfile.pipelines-profile-controller
juliusvonkohout May 13, 2022
8ca1101
Merge branch 'kubeflow:master' into patch-22
juliusvonkohout May 13, 2022
e8a7122
Update deployment.yaml
juliusvonkohout May 13, 2022
e99ab6a
Update sync.py
juliusvonkohout May 13, 2022
b681570
more secure iam policy
juliusvonkohout May 14, 2022
27c6795
enable lifecycle policy
juliusvonkohout May 14, 2022
f1ab99b
Version 9 is more compatible
juliusvonkohout May 14, 2022
9f3efc4
typographical error
juliusvonkohout May 14, 2022
8b15871
Update sync.py
juliusvonkohout May 14, 2022
8e15e56
Update Dockerfile.pipelines-profile-controller
juliusvonkohout May 14, 2022
eff65ea
Merge branch 'kubeflow:master' into patch-22
juliusvonkohout May 18, 2022
1c292a9
Update composite-controller.yaml
juliusvonkohout May 18, 2022
6bdffd5
Merge branch 'kubeflow:master' into patch-22
juliusvonkohout Aug 23, 2022
cbc549a
move changes to the minio distribution
Aug 23, 2022
5743208
rename distribution
Aug 23, 2022
a869701
rename distribution
Aug 23, 2022
63ffae9
fix kustomize build
Aug 23, 2022
1b13e66
remove unecessary changes
Aug 23, 2022
42a3a1a
remove wrong files
Aug 23, 2022
f6f3755
Update composite-controller-patch.yaml
juliusvonkohout Aug 26, 2022
1485d6e
Update sync.py
juliusvonkohout Aug 26, 2022
4988713
Update OWNERS
juliusvonkohout Aug 29, 2022
a4906e0
Update sync.py
juliusvonkohout Nov 3, 2022
b195034
Merge branch 'kubeflow:master' into patch-22
juliusvonkohout Nov 3, 2022
5674951
Update sync.py
juliusvonkohout Nov 4, 2022
82883b5
Merge branch 'kubeflow:master' into patch-22
juliusvonkohout Nov 4, 2022
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: 8 additions & 0 deletions backend/Dockerfile.pipelines-profile-controller
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM docker.io/minio/mc:RELEASE.2019-08-14T20-49-49Z as minio-cli

FROM python:3.7
# curl -o mc 'https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2019-08-14T20-49-49Z'
COPY --from=minio-cli /usr/bin/mc /app/mc
RUN pip3 install 'boto3==1.22.*' 'minio==7.1.*' 'kubernetes==23.3.*'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My advice is to install these python library and minio cli client during runtime. New image has to pass license review and has to be served under new registry path. I would avoid that if possible.

Copy link
Member Author

@juliusvonkohout juliusvonkohout Jun 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could make a runtime check and install them if they are not already there (self-built images), but we need them for the minio configuration. Another option could be to use the minio python client only. Anyway having downloads at runtime makes us dependent on the network and availability of pypi.org and the minio mc download site. I would prefer a static image that always works.

By the way did you read "@zijianjoy The minio mc license was changed quite late minio/mc@1402987 so that should be fine. We are using a way older mc, exactly the same date as your current minio-license-compatible image. The python SDK is still Apache 2.0 https://github.com/minio/minio-py/blob/master/LICENSE.

which minio alternative do you have in mind for the next years? ceph-rook?"

Boto3 is also apache 2.0 https://github.com/boto/boto3/blob/develop/LICENSE together with the kubernetes library https://github.com/kubernetes-client/python/blob/master/LICENSE

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you were to create a new image, then it needs to be integrated into our test and release process. Here're some pointers on top of my head, there could be more.
https://github.com/kubeflow/pipelines/blob/master/.cloudbuild.yaml
https://github.com/kubeflow/pipelines/blob/master/.release.cloudbuild.yaml


ENTRYPOINT ["python3" ]
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Change resyncPeriodSeconds to 1 hour from insane 20 seconds
# Only sync namespaces with pipelines.kubeflow.org/enabled = "true"
# For some crazy reasons the crd name is often different...
# CRD is network-attachment-definitions while the instance is NetworkAttachmentDefinition
apiVersion: metacontroller.k8s.io/v1alpha1
kind: CompositeController
metadata:
Expand Down Expand Up @@ -27,15 +28,24 @@ spec:
resource: services
updateStrategy:
method: InPlace
- apiVersion: networking.istio.io/v1alpha3
resource: destinationrules
- apiVersion: k8s.cni.cncf.io/v1
resource: network-attachment-definitions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change exclusive to OpenShift cluster? I would suggest creating an overlay to contain this change.

Copy link
Member Author

@juliusvonkohout juliusvonkohout Jun 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is for any Kubernetes that uses Multus as CNI https://github.com/k8snetworkplumbingwg/multus-cni

This change would also affect the python code. Either we leave it in, since it does no harm or we remove it entirely in the composite controller and python code. One could argue that it belongs in the other kubeflow profile controller, so removing it entirely or using overlays as described below is a valid option.

updateStrategy:
method: InPlace
- apiVersion: security.istio.io/v1beta1
resource: authorizationpolicies
- apiVersion: v1
resource: limitranges
updateStrategy:
method: InPlace
- apiVersion: kubeflow.org/v1alpha1
resource: poddefaults
updateStrategy:
method: InPlace
- apiVersion: networking.k8s.io/v1
resource: networkpolicies
updateStrategy:
method: InPlace
hooks:
sync:
webhook:
url: http://kubeflow-pipelines-profile-controller/sync

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
spec:
containers:
- name: profile-controller
image: python:3.7
image: mtr.external.otc.telekomcloud.com/ai/pipelines-profile-controller:1.8.1-namespace-isolation # until the new container is build
command: ["python", "/hooks/sync.py"]
envFrom:
- configMapRef:
Expand Down
Loading