Skip to content

Commit

Permalink
Merge pull request #636 from hbelmiro/RHOAIENG-5287
Browse files Browse the repository at this point in the history
Added CustomConfig to WorkflowController
  • Loading branch information
HumairAK authored May 6, 2024
2 parents 017e6a5 + 5a092d9 commit 575c774
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/dspipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ type WorkflowController struct {
Deploy bool `json:"deploy"`
Image string `json:"image,omitempty"`
ArgoExecImage string `json:"argoExecImage,omitempty"`
CustomConfig string `json:"customConfig,omitempty"`
}

// ResourceRequirements structures compute resource requirements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,8 @@ spec:
properties:
argoExecImage:
type: string
customConfig:
type: string
deploy:
default: true
type: boolean
Expand Down
4 changes: 4 additions & 0 deletions config/internal/workflow-controller/deployment.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ spec:
containers:
- args:
- --configmap
{{ if .WorkflowController.CustomConfig }}
- {{ .WorkflowController.CustomConfig }}
{{ else }}
- ds-pipeline-workflow-controller-{{.Name}}
{{ end }}
- --executor-image
- {{ .WorkflowController.ArgoExecImage }}
- --namespaced
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: v1
data:
artifactRepository: |
archiveLogs: false
s3:
endpoint: "http://minio-sample.kubeflow.svc.cluster.local:9000"
bucket: "mlpipeline"
# keyFormat is a format pattern to define how artifacts will be organized in a bucket.
# It can reference workflow metadata variables such as workflow.namespace, workflow.name,
# pod.name. Can also use strftime formating of workflow.creationTimestamp so that workflow
# artifacts can be organized by date. If omitted, will use `\{\{workflow.name\}\}/\{\{pod.name\}\}`,
# which has potential for have collisions, because names do not guarantee they are unique
# over the lifetime of the cluster.
# Refer to https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
#
# The following format looks like:
# artifacts/my-workflow-abc123/2018/08/23/my-workflow-abc123-1234567890
# Adding date into the path greatly reduces the chance of \{\{pod.name\}\} collision.
# keyFormat: "artifacts/\{\{workflow.name\}\}/\{\{workflow.creationTimestamp.Y\}\}/\{\{workflow.creationTimestamp.m\}\}/\{\{workflow.creationTimestamp.d\}\}/\{\{pod.name\}\}" # TODO
# insecure will disable TLS. Primarily used for minio installs not configured with TLS
insecure: false
accessKeySecret:
name: "ds-pipeline-s3-sample"
key: "accesskey"
secretKeySecret:
name: "ds-pipeline-s3-sample"
key: "secretkey"
containerRuntimeExecutor: emissary
executor: |
imagePullPolicy: IfNotPresent # TODO
kind: ConfigMap
metadata:
name: custom-workflow-controller-configmap
15 changes: 15 additions & 0 deletions config/samples/v2/custom-workflow-controller-config/dspa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: datasciencepipelinesapplications.opendatahub.io/v1alpha1
kind: DataSciencePipelinesApplication
metadata:
name: sample
spec:
dspVersion: v2
objectStorage:
minio:
deploy: true
image: 'quay.io/opendatahub/minio:RELEASE.2019-08-14T20-37-41Z-license-compliance'
mlpipelineUI:
image: quay.io/opendatahub/ds-pipelines-frontend:latest
workflowController:
deploy: true
customConfig: 'custom-workflow-controller-configmap'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- dspa.yaml
- custom-workflow-controller-configmap.yaml

0 comments on commit 575c774

Please sign in to comment.