diff --git a/Makefile b/Makefile index b34d9755..ab283eac 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/api/v1alpha1/dspipeline_types.go b/api/v1alpha1/dspipeline_types.go index f031b7f8..39a4e1da 100644 --- a/api/v1alpha1/dspipeline_types.go +++ b/api/v1alpha1/dspipeline_types.go @@ -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"` } @@ -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. diff --git a/config/argo/crd.scheduledworkflows.yaml b/config/argo/crd.scheduledworkflows.yaml deleted file mode 100644 index 9bac8cef..00000000 --- a/config/argo/crd.scheduledworkflows.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - kubeflow/crd-install: "true" - name: scheduledworkflows.kubeflow.org -spec: - group: kubeflow.org - names: - kind: ScheduledWorkflow - listKind: ScheduledWorkflowList - plural: scheduledworkflows - shortNames: - - swf - singular: scheduledworkflow - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - type: object - x-kubernetes-map-type: atomic - x-kubernetes-preserve-unknown-fields: true - status: - type: object - x-kubernetes-map-type: atomic - x-kubernetes-preserve-unknown-fields: true - required: - - spec - - status - type: object - served: true - storage: true diff --git a/config/argo/kustomization.yaml b/config/argo/kustomization.yaml index d7d64e58..a43ab162 100644 --- a/config/argo/kustomization.yaml +++ b/config/argo/kustomization.yaml @@ -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 @@ -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 diff --git a/config/base/kustomization.yaml b/config/base/kustomization.yaml index b5321e09..9e464aba 100644 --- a/config/base/kustomization.yaml +++ b/config/base/kustomization.yaml @@ -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 diff --git a/config/base/params.env b/config/base/params.env index 83524c47..603d23a9 100644 --- a/config/base/params.env +++ b/config/base/params.env @@ -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 diff --git a/config/configmaps/files/config.yaml b/config/configmaps/files/config.yaml index b68c6181..81c0d799 100644 --- a/config/configmaps/files/config.yaml +++ b/config/configmaps/files/config.yaml @@ -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: diff --git a/config/crd/bases/datasciencepipelinesapplications.opendatahub.io_datasciencepipelinesapplications.yaml b/config/crd/bases/datasciencepipelinesapplications.opendatahub.io_datasciencepipelinesapplications.yaml index 3e8ceeb6..fa0cd92b 100644 --- a/config/crd/bases/datasciencepipelinesapplications.opendatahub.io_datasciencepipelinesapplications.yaml +++ b/config/crd/bases/datasciencepipelinesapplications.opendatahub.io_datasciencepipelinesapplications.yaml @@ -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 diff --git a/config/internal/workflow-controller/deployment.yaml.tmpl b/config/internal/workflow-controller/deployment.yaml.tmpl index 1ae3a1c7..bc26b7e5 100644 --- a/config/internal/workflow-controller/deployment.yaml.tmpl +++ b/config/internal/workflow-controller/deployment.yaml.tmpl @@ -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 @@ -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: @@ -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}} diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 5685d8a8..db9280fb 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -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 diff --git a/config/overlays/make-argodeploy/kustomization.yaml b/config/overlays/make-argodeploy/kustomization.yaml index 526685e3..28933e3c 100644 --- a/config/overlays/make-argodeploy/kustomization.yaml +++ b/config/overlays/make-argodeploy/kustomization.yaml @@ -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 diff --git a/config/overlays/make-v2deploy/kustomization.yaml b/config/overlays/make-v2deploy/kustomization.yaml deleted file mode 100644 index b34e8a37..00000000 --- a/config/overlays/make-v2deploy/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: openshift-pipelines -resources: -- ../../v2 -- ../../v2/configmaps -- ../../v2/secrets diff --git a/config/overlays/odh/kustomization.yaml b/config/overlays/odh/kustomization.yaml new file mode 100644 index 00000000..6f0a69d2 --- /dev/null +++ b/config/overlays/odh/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ../make-argodeploy +- ../make-deploy +namespace: opendatahub diff --git a/config/samples/dspa_simple_v2.yaml b/config/samples/dspa_simple_v2.yaml index ba326693..cff240a9 100644 --- a/config/samples/dspa_simple_v2.yaml +++ b/config/samples/dspa_simple_v2.yaml @@ -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 diff --git a/controllers/config/defaults.go b/controllers/config/defaults.go index e7b6bd59..37355da1 100644 --- a/controllers/config/defaults.go +++ b/controllers/config/defaults.go @@ -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 diff --git a/controllers/dspipeline_params.go b/controllers/dspipeline_params.go index e723b6e8..dd4dfc73 100644 --- a/controllers/dspipeline_params.go +++ b/controllers/dspipeline_params.go @@ -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 { diff --git a/datasciencecluster/datasciencecluster.yaml b/datasciencecluster/datasciencecluster.yaml index 2f7c1a3b..88d89346 100644 --- a/datasciencecluster/datasciencecluster.yaml +++ b/datasciencecluster/datasciencecluster.yaml @@ -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