Skip to content

Commit

Permalink
parameterize and upate argo v2 images.
Browse files Browse the repository at this point in the history
Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
  • Loading branch information
HumairAK committed Jan 20, 2024
1 parent a024919 commit b2a21fe
Show file tree
Hide file tree
Showing 17 changed files with 86 additions and 105 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,17 @@ undeploy-kind: ## Undeploy controller from the K8s cluster specified in ~/.kube/
&& kustomize edit set namespace ${OPERATOR_NS}
kustomize build config/overlays/kind-tests | kubectl delete --ignore-not-found=$(ignore-not-found) -f -

.PHONY: deployODH
deployODH: manifests kustomize
cd config/overlays/make-deploy && $(KUSTOMIZE) edit set image controller=${IMG} && $(KUSTOMIZE) edit set namespace ${OPERATOR_NS}
$(KUSTOMIZE) build config/overlays/odh | kubectl apply -f -

.PHONY: undeployODH
undeployODH:
cd config/overlays/odh && $(KUSTOMIZE) edit set namespace ${OPERATOR_NS}
$(KUSTOMIZE) build config/overlays/odh | kubectl delete --ignore-not-found=$(ignore-not-found) -f -


##@ Build Dependencies

## Location to install dependencies to
Expand Down
6 changes: 3 additions & 3 deletions api/v1alpha1/dspipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ type DSPASpec struct {
DSPVersion string `json:"dspVersion,omitempty"`
// WorkflowController is an argo-specific component that manages a DSPA's Workflow objects and handles the orchestration of them with the central Argo server
// +kubebuilder:validation:Optional
// +kubebuilder:default:={deploy: false}
*WorkflowController `json:"workflowController,omitempty"`
}

Expand Down Expand Up @@ -297,8 +296,9 @@ type CRDViewer struct {
type WorkflowController struct {
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
Deploy bool `json:"deploy"`
Image string `json:"image,omitempty"`
Deploy bool `json:"deploy"`
Image string `json:"image,omitempty"`
ArgoExecImage string `json:"argoExecImage,omitempty"`
}

// ResourceRequirements structures compute resource requirements.
Expand Down
41 changes: 0 additions & 41 deletions config/argo/crd.scheduledworkflows.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions config/argo/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resources:
- configmap.workflow-controller-configmap.yaml
- deployment.argo-server.yaml
# - deployment.workflow-controller.yaml
- priorityclass.yaml
# - priorityclass.yaml
- role.argo.yaml
- rolebinding.argo-binding.yaml
- service.argo-server.yaml
Expand All @@ -28,7 +28,6 @@ resources:
- crd.applications.yaml
- crd.clusterworkflowtemplates.yaml
- crd.cronworkflows.yaml
- crd.scheduledworkflows.yaml
- crd.viewers.yaml
- crd.workfloweventbinding.yaml
- crd.workflows.yaml
Expand Down
7 changes: 7 additions & 0 deletions config/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ vars:
apiVersion: v1
fieldref:
fieldpath: data.IMAGESV2_ARGO_MLMDGRPC
- name: IMAGESV2_ARGO_ARGOEXEC
objref:
kind: ConfigMap
name: dspo-parameters
apiVersion: v1
fieldref:
fieldpath: data.IMAGESV2_ARGO_ARGOEXEC
- name: IMAGESV2_ARGO_WORKFLOWCONTROLLER
objref:
kind: ConfigMap
Expand Down
41 changes: 21 additions & 20 deletions config/base/params.env
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
IMAGES_APISERVER=quay.io/opendatahub/ds-pipelines-api-server:latest
IMAGES_ARTIFACT=quay.io/opendatahub/ds-pipelines-artifact-manager:latest
IMAGES_PERSISTENTAGENT=quay.io/opendatahub/ds-pipelines-persistenceagent:latest
IMAGES_SCHEDULEDWORKFLOW=quay.io/opendatahub/ds-pipelines-scheduledworkflow:latest
IMAGES_MLMDENVOY=quay.io/opendatahub/ds-pipelines-metadata-envoy:latest
IMAGES_MLMDGRPC=quay.io/opendatahub/ds-pipelines-metadata-grpc:latest
IMAGES_MLMDWRITER=quay.io/opendatahub/ds-pipelines-metadata-writer:latest
IMAGES_DSPO=quay.io/opendatahub/data-science-pipelines-operator:latest
IMAGES_APISERVER=quay.io/opendatahub/ds-pipelines-api-server:v1.6.1
IMAGES_ARTIFACT=quay.io/opendatahub/ds-pipelines-artifact-manager:v1.6.1
IMAGES_PERSISTENTAGENT=quay.io/opendatahub/ds-pipelines-persistenceagent:v1.6.1
IMAGES_SCHEDULEDWORKFLOW=quay.io/opendatahub/ds-pipelines-scheduledworkflow:v1.6.1
IMAGES_MLMDENVOY=quay.io/opendatahub/ds-pipelines-metadata-envoy:v1.6.1
IMAGES_MLMDGRPC=quay.io/opendatahub/ds-pipelines-metadata-grpc:v1.6.1
IMAGES_MLMDWRITER=quay.io/opendatahub/ds-pipelines-metadata-writer:v1.6.1
IMAGES_CRDVIEWER=gcr.io/ml-pipeline/viewer-crd-controller:2.0.0-rc.2
IMAGESV2_ARGO_APISERVER=quay.io/opendatahub/ds-pipelines-api-server:latest
IMAGESV2_ARGO_ARTIFACT=quay.io/opendatahub/ds-pipelines-artifact-manager:latest
IMAGESV2_ARGO_PERSISTENCEAGENT=quay.io/opendatahub/ds-pipelines-persistenceagent:latest
IMAGESV2_ARGO_SCHEDULEDWORKFLOW=quay.io/opendatahub/ds-pipelines-scheduledworkflow:latest
IMAGESV2_ARGO_MLMDENVOY=quay.io/opendatahub/ds-pipelines-metadata-envoy:latest
IMAGESV2_ARGO_MLMDGRPC=quay.io/opendatahub/ds-pipelines-metadata-grpc:latest
IMAGESV2_ARGO_MLMDWRITER=quay.io/opendatahub/ds-pipelines-metadata-writer:latest
IMAGESV2_ARGO_CACHE=registry.access.redhat.com/ubi8/ubi-minimal:8.8
IMAGESV2_ARGO_MOVERESULTSIMAGE=registry.access.redhat.com/ubi8/ubi-micro:8.8
IMAGESV2_ARGO_WORKFLOWCONTROLLER=quay.io/opendatahub/ds-pipelines-argo-workflowcontroller:3.3.10-upstream
IMAGESV2_ARGO_ARGOEXEC=quay.io/opendatahub/ds-pipelines-argo-argoexec:3.3.10-upstream
V2_LAUNCHER_IMAGE=quay.io/opendatahub/ds-pipelines-launcher:latest
V2_DRIVER_IMAGE=quay.io/opendatahub/ds-pipelines-driver:latest
IMAGES_CACHE=registry.access.redhat.com/ubi8/ubi-minimal:8.8
IMAGES_MOVERESULTSIMAGE=registry.access.redhat.com/ubi8/ubi-micro:8.8
IMAGES_MARIADB=registry.redhat.io/rhel8/mariadb-103:1
IMAGES_OAUTHPROXY=registry.redhat.io/openshift4/ose-oauth-proxy@sha256:ab112105ac37352a2a4916a39d6736f5db6ab4c29bad4467de8d613e80e9bb33
IMAGES_CRDVIEWER=gcr.io/ml-pipeline/viewer-crd-controller:2.0.0-rc.2
IMAGESV2_ARGO_APISERVER=gcr.io/ml-pipeline/api-server:2.0.2
IMAGESV2_ARGO_ARTIFACT=quay.io/opendatahub/ds-pipelines-artifact-manager:main
IMAGESV2_ARGO_PERSISTENCEAGENT=gcr.io/ml-pipeline/persistenceagent:2.0.2
IMAGESV2_ARGO_SCHEDULEDWORKFLOW=gcr.io/ml-pipeline/scheduledworkflow:2.0.2
IMAGESV2_ARGO_MLMDENVOY=gcr.io/ml-pipeline/metadata-envoy:2.0.2
IMAGESV2_ARGO_MLMDGRPC=gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0
IMAGESV2_ARGO_MLMDWRITER=gcr.io/ml-pipeline/metadata-writer:2.0.2
IMAGESV2_ARGO_CACHE=registry.access.redhat.com/ubi8/ubi-minimal:8.7
IMAGESV2_ARGO_MOVERESULTSIMAGE=registry.access.redhat.com/ubi8/ubi-micro:8.7
IMAGESV2_ARGO_WORKFLOWCONTROLLER=gcr.io/ml-pipeline/workflow-controller:v3.3.10-license-compliance
V2_LAUNCHER_IMAGE=gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
V2_DRIVER_IMAGE=gcr.io/ml-pipeline/kfp-driver@sha256:8e60086b04d92b657898a310ca9757631d58547e76bbbb8bfc376d654bef1707
ZAP_LOG_LEVEL=info
MAX_CONCURRENT_RECONCILES=10
DSPO_HEALTHCHECK_DATABASE_CONNECTIONTIMEOUT=15s
Expand Down
1 change: 1 addition & 0 deletions config/configmaps/files/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ImagesV2:
MlmdEnvoy: $(IMAGESV2_ARGO_MLMDENVOY)
MlmdGRPC: $(IMAGESV2_ARGO_MLMDGRPC)
WorkflowController: $(IMAGESV2_ARGO_WORKFLOWCONTROLLER)
ArgoExecImage: $(IMAGESV2_ARGO_ARGOEXEC)
ArgoLauncherImage: $(V2_LAUNCHER_IMAGE)
ArgoDriverImage: $(V2_DRIVER_IMAGE)
DSPO:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -767,12 +767,12 @@ spec:
type: object
type: object
workflowController:
default:
deploy: false
description: WorkflowController is an argo-specific component that
manages a DSPA's Workflow objects and handles the orchestration
of them with the central Argo server
properties:
argoExecImage:
type: string
deploy:
default: true
type: boolean
Expand Down
5 changes: 2 additions & 3 deletions config/internal/workflow-controller/deployment.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
- --configmap
- ds-pipeline-workflow-controller-{{.Name}}
- --executor-image
- gcr.io/ml-pipeline/argoexec:v3.3.10-license-compliance
- {{ .WorkflowController.ArgoExecImage }}
- --namespaced
command:
- workflow-controller
Expand All @@ -38,7 +38,7 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
image: gcr.io/ml-pipeline/workflow-controller:v3.3.10-license-compliance # TODO
image: {{ .WorkflowController.Image }}
livenessProbe:
failureThreshold: 3
httpGet:
Expand All @@ -65,7 +65,6 @@ spec:
runAsNonRoot: true
nodeSelector:
kubernetes.io/os: linux
priorityClassName: ds-pipelines-workflow-controller-priorityclass
securityContext:
runAsNonRoot: true
serviceAccountName: ds-pipeline-workflow-controller-{{.Name}}
2 changes: 2 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ spec:
value: $(IMAGESV2_ARGO_MLMDGRPC)
- name: IMAGESV2_ARGO_WORKFLOWCONTROLLER
value: $(IMAGESV2_ARGO_WORKFLOWCONTROLLER)
- name: IMAGESV2_ARGO_ARGOEXEC
value: $(IMAGESV2_ARGO_ARGOEXEC)
- name: V2_LAUNCHER_IMAGE
value: $(V2_LAUNCHER_IMAGE)
- name: V2_DRIVER_IMAGE
Expand Down
5 changes: 5 additions & 0 deletions config/overlays/make-argodeploy/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ kind: Kustomization
namespace: argo
resources:
- ../../argo

images:
- name: quay.io/argoproj/argocli
newName: quay.io/opendatahub/ds-pipelines-argo-server
newTag: 3.3.10-upstream
7 changes: 0 additions & 7 deletions config/overlays/make-v2deploy/kustomization.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions config/overlays/odh/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../make-argodeploy
- ../make-deploy
namespace: opendatahub
26 changes: 1 addition & 25 deletions config/samples/dspa_simple_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,9 @@ metadata:
name: sample
spec:
dspVersion: v2
apiServer:
deploy: true
image: gcr.io/ml-pipeline/api-server:2.0.5
argoLauncherImage: gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4
argoDriverImage: gcr.io/ml-pipeline/kfp-driver@sha256:8e60086b04d92b657898a310ca9757631d58547e76bbbb8bfc376d654bef1707
persistenceAgent:
deploy: true
image: gcr.io/ml-pipeline/persistenceagent:2.0.2
scheduledWorkflow:
deploy: true
image: gcr.io/ml-pipeline/scheduledworkflow:2.0.2
mlmd:
deploy: true
grpc:
image: gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0
envoy:
image: gcr.io/ml-pipeline/metadata-envoy:2.0.2
database:
disableHealthCheck: true
mariaDB:
deploy: true
objectStorage:
minio:
deploy: true
image: 'quay.io/opendatahub/minio:RELEASE.2019-08-14T20-37-41Z-license-compliance'
mlpipelineUI:
image: gcr.io/ml-pipeline/frontend:2.0.2
workflowController:
deploy: true
image: gcr.io/ml-pipeline/workflow-controller:v3.3.10-license-compliance
image: quay.io/opendatahub/ds-pipelines-frontend:latest
2 changes: 2 additions & 0 deletions controllers/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ const (
ScheduledWorkflowImagePathV2Argo = "ImagesV2.Argo.ScheduledWorkflow"
MlmdEnvoyImagePathV2Argo = "ImagesV2.Argo.MlmdEnvoy"
MlmdGRPCImagePathV2Argo = "ImagesV2.Argo.MlmdGRPC"
ArgoWorkflowControllerImagePath = "ImagesV2.Argo.WorkflowController"
ArgoExecImagePath = "ImagesV2.Argo.ArgoExecImage"
)

// DSPV2-Tekton Image Paths
Expand Down
18 changes: 17 additions & 1 deletion controllers/dspipeline_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,23 @@ func (p *DSPAParams) ExtractParams(ctx context.Context, dsp *dspa.DataSciencePip
setResourcesDefault(config.MlPipelineUIResourceRequirements, &p.MlPipelineUI.Resources)
}

// TODO (gfrasca): believe we need to set default WorkflowController Images here
// If user did not specify WorkflowController
if dsp.Spec.WorkflowController == nil {
dsp.Spec.WorkflowController = &dspa.WorkflowController{
Deploy: false,
}
if p.UsingV2Pipelines(dsp) {
dsp.Spec.WorkflowController.Deploy = true
}
}
p.WorkflowController = dsp.Spec.WorkflowController.DeepCopy()

if p.WorkflowController != nil {
argoWorkflowImageFromConfig := config.GetStringConfigWithDefault(config.ArgoWorkflowControllerImagePath, config.DefaultImageValue)
argoExecImageFromConfig := config.GetStringConfigWithDefault(config.ArgoExecImagePath, config.DefaultImageValue)
setStringDefault(argoWorkflowImageFromConfig, &p.WorkflowController.Image)
setStringDefault(argoExecImageFromConfig, &p.WorkflowController.ArgoExecImage)
}

err := p.SetupMLMD(ctx, dsp, client, log)
if err != nil {
Expand Down
6 changes: 5 additions & 1 deletion datasciencecluster/datasciencecluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ spec:
dashboard:
managementState: Managed
datasciencepipelines:
managementState: Managed
devFlags:
manifests:
- uri: https://github.com/opendatahub-io/data-science-pipelines-operator/tarball/main
contextDir: config
sourcePath: overlays/odh

0 comments on commit b2a21fe

Please sign in to comment.