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 19, 2024
1 parent a024919 commit f1f5bd7
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 76 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
5 changes: 3 additions & 2 deletions api/v1alpha1/dspipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,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 @@ -773,6 +773,8 @@ spec:
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
7 changes: 6 additions & 1 deletion config/overlays/make-argodeploy/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: argo
namespace: opendatahub
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.

5 changes: 5 additions & 0 deletions config/overlays/odh/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../make-argodeploy
- ../make-deploy
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
8 changes: 8 additions & 0 deletions controllers/dspipeline_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ func (p *DSPAParams) ExtractParams(ctx context.Context, dsp *dspa.DataSciencePip
p.MLMD = dsp.Spec.MLMD.DeepCopy()
p.APIServerPiplinesCABundleMountPath = config.APIServerPiplinesCABundleMountPath
p.PiplinesCABundleMountPath = config.PiplinesCABundleMountPath
p.WorkflowController = dsp.Spec.WorkflowController.DeepCopy()

if p.APIServer != nil {
APIServerImagePath := p.GetImageForComponent(dsp, config.APIServerImagePath, config.APIServerImagePathV2Argo, config.APIServerImagePathV2Tekton)
Expand Down Expand Up @@ -551,6 +552,13 @@ func (p *DSPAParams) ExtractParams(ctx context.Context, dsp *dspa.DataSciencePip
setResourcesDefault(config.MlPipelineUIResourceRequirements, &p.MlPipelineUI.Resources)
}

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)
}

// TODO (gfrasca): believe we need to set default WorkflowController Images here

err := p.SetupMLMD(ctx, dsp, client, log)
Expand Down

0 comments on commit f1f5bd7

Please sign in to comment.