Skip to content

Commit

Permalink
Merge pull request #4 from gmfrasca/v2-engineagnostic-rebased
Browse files Browse the repository at this point in the history
V2-argo into DSPv2 Feature Branch
  • Loading branch information
gmfrasca authored Dec 11, 2023
2 parents eca5c8b + ade82da commit 98f23f8
Show file tree
Hide file tree
Showing 144 changed files with 3,007 additions and 2,421 deletions.
25 changes: 14 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ ENVTEST_K8S_VERSION = 1.25.0
OPERATOR_NS ?= odh-applications
# Namespace to deploy v2 infrastructure
V2INFRA_NS ?= openshift-pipelines
# Namespace to deploy argo infrastructure
ARGO_NS ?= argo

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -161,17 +163,18 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
cd config/overlays/make-deploy && $(KUSTOMIZE) edit set namespace ${OPERATOR_NS}
$(KUSTOMIZE) build config/overlays/make-deploy | kubectl delete --ignore-not-found=$(ignore-not-found) -f -

.PHONY: v2deploy
v2deploy: manifests kustomize
cd config/overlays/make-v2deploy \
&& $(KUSTOMIZE) edit set namespace ${V2INFRA_NS}
$(KUSTOMIZE) build config/overlays/make-v2deploy | kubectl apply -f -

.PHONY: v2undeploy
v2undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
cd config/overlays/make-v2deploy \
&& $(KUSTOMIZE) edit set namespace ${V2INFRA_NS}
$(KUSTOMIZE) build config/overlays/make-v2deploy | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
.PHONY: argodeploy
argodeploy: manifests kustomize
cd config/overlays/make-argodeploy \
&& $(KUSTOMIZE) edit set namespace ${ARGO_NS}
$(KUSTOMIZE) build config/overlays/make-argodeploy | kubectl apply -f -

.PHONY: argoundeploy
argoundeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
cd config/overlays/make-argodeploy \
&& $(KUSTOMIZE) edit set namespace ${ARGO_NS}
$(KUSTOMIZE) build config/overlays/make-argodeploy | kubectl delete --ignore-not-found=$(ignore-not-found) -f -


##@ Build Dependencies

Expand Down
11 changes: 11 additions & 0 deletions api/v1alpha1/dspipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ type DSPASpec struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default:="v1"
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"`
}

type APIServer struct {
Expand Down Expand Up @@ -293,6 +297,13 @@ type VisualizationServer struct {
Image string `json:"image,omitempty"`
}

type WorkflowController struct {
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
Deploy bool `json:"deploy"`
Image string `json:"image,omitempty"`
}

// ResourceRequirements structures compute resource requirements.
// Replaces ResourceRequirements from corev1 which also includes optional storage field.
// We handle storage field separately, and should not include it as a subfield for Resources.
Expand Down
20 changes: 20 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions config/argo/clusterrole.argo-aggregate-to-admin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
name: argo-aggregate-to-admin
rules:
- apiGroups:
- argoproj.io
resources:
- workflows
- workflows/finalizers
- workfloweventbindings
- workfloweventbindings/finalizers
- workflowtemplates
- workflowtemplates/finalizers
- cronworkflows
- cronworkflows/finalizers
- clusterworkflowtemplates
- clusterworkflowtemplates/finalizers
- workflowtasksets
- workflowtasksets/finalizers
- workflowtaskresults
- workflowtaskresults/finalizers
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
32 changes: 32 additions & 0 deletions config/argo/clusterrole.argo-aggregate-to-edit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
rbac.authorization.k8s.io/aggregate-to-edit: "true"
name: argo-aggregate-to-edit
rules:
- apiGroups:
- argoproj.io
resources:
- workflows
- workflows/finalizers
- workfloweventbindings
- workfloweventbindings/finalizers
- workflowtemplates
- workflowtemplates/finalizers
- cronworkflows
- cronworkflows/finalizers
- clusterworkflowtemplates
- clusterworkflowtemplates/finalizers
- workflowtaskresults
- workflowtaskresults/finalizers
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
27 changes: 27 additions & 0 deletions config/argo/clusterrole.argo-aggregate-to-view.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
name: argo-aggregate-to-view
rules:
- apiGroups:
- argoproj.io
resources:
- workflows
- workflows/finalizers
- workfloweventbindings
- workfloweventbindings/finalizers
- workflowtemplates
- workflowtemplates/finalizers
- cronworkflows
- cronworkflows/finalizers
- clusterworkflowtemplates
- clusterworkflowtemplates/finalizers
- workflowtaskresults
- workflowtaskresults/finalizers
verbs:
- get
- list
- watch
106 changes: 106 additions & 0 deletions config/argo/clusterrole.argo-cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: argo-cluster-role
rules:
- apiGroups:
- ""
resources:
- pods
- pods/exec
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- persistentvolumeclaims
- persistentvolumeclaims/finalizers
verbs:
- create
- update
- delete
- get
- apiGroups:
- argoproj.io
resources:
- workflows
- workflows/finalizers
- workflowtasksets
- workflowtasksets/finalizers
- workflowartifactgctasks
verbs:
- get
- list
- watch
- update
- patch
- delete
- create
- apiGroups:
- argoproj.io
resources:
- workflowtemplates
- workflowtemplates/finalizers
- clusterworkflowtemplates
- clusterworkflowtemplates/finalizers
verbs:
- get
- list
- watch
- apiGroups:
- argoproj.io
resources:
- workflowtaskresults
verbs:
- list
- watch
- deletecollection
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- apiGroups:
- argoproj.io
resources:
- cronworkflows
- cronworkflows/finalizers
verbs:
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- create
- get
- delete
66 changes: 66 additions & 0 deletions config/argo/clusterrole.argo-server-cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: argo-server-cluster-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- create
- apiGroups:
- ""
resources:
- pods
- pods/exec
- pods/log
verbs:
- get
- list
- watch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- watch
- create
- patch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- watch
- apiGroups:
- argoproj.io
resources:
- eventsources
- sensors
- workflows
- workfloweventbindings
- workflowtemplates
- cronworkflows
- clusterworkflowtemplates
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
13 changes: 13 additions & 0 deletions config/argo/clusterrolebinding.argo-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: argo-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argo-cluster-role
subjects:
- kind: ServiceAccount
name: argo
namespace: argo
13 changes: 13 additions & 0 deletions config/argo/clusterrolebinding.argo-server-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: argo-server-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argo-server-cluster-role
subjects:
- kind: ServiceAccount
name: argo-server
namespace: argo
Loading

0 comments on commit 98f23f8

Please sign in to comment.