-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run workflows in provider namespaces #406
Comments
Solution should still allow for simple deployments with all resources etc in the single namespace. |
We need to work out how resource controllers will know which namespace to load the requested Provider resource from. At the moment it's assumed that the Provider is deployed under the same namespace as the workflows:
After this card, the workflows are to be created under the We might need to update the resources to specify the namespace of the Provider as well as the provider name Update: We will update spec.Provider in the appropriate resource to be of type |
Running common workflow templates from a different namespace requires the workflows to be In order for worklfows to be run within a providers given namespace it requires a few pre-requisites:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: workflow-executor
namespace: provider-namespace
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- patch
apiVersion: v1
kind: ServiceAccount
metadata:
name: my-provider-service-account
namespace: provider-namespace
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kfp-operator-providers-workflow-executor-rolebinding
namespace: provider-namespace
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: workflow-executor
subjects:
- kind: ServiceAccount
name: my-provider-service-account
namespace: provider-namespace
Example Provider Helm: provider:
name: my-provider
namespace: provider-namespace
type: vai
executionMode: v2
serviceAccount:
name: my-provider-service-account Example Workflow Input: apiVersion: argoproj.io/v1alpha1
kind: ClusterWorkflowTemplate
metadata:
name: parameterized-service-account-cluster-workflow-template
spec:
entrypoint: main
arguments:
parameters:
- name: serviceAccountName
value: default-service-account # Default value for the service account will be overridden on creation
templates:
- name: main
steps:
- - name: step1
template: run-some-task
serviceAccountName: "{{workflow.parameters.serviceAccountName}}" Further:
|
Is your feature request related to a problem? Please describe.
Currently, any calls to
Reconcile
which trigger workflows to run, i.e. new pipeline resource created the generated workflow runs within the kfp-operator-system namespace. To allow for segregation between providers it should be possible to run the workflows within a provider specific namespace, therefore allowing for separate management of the provider namespaces along with the service account setup therefore making it possible to apply correct security to data access etc between providers.Describe the solution you'd like
On a KFP Operator user resource being created/updated/deleted and triggering a reconcile it should be possible to set the generated workflow to run within the provider namespace rather than al providers workflows running within the same namespace (kfp-operator-system by default)
Currently all workflows are generated in the configured namespace:
in the
KfpControllerConfigSpec
This configuration value could be made optional and if not set then the namespace of the provider resource can be used. Keeping this configuration value allows users to configure Argo Workflows to only run in a specific namespace, e.g. for security reasons.
KFP Operator service account will need the necessary access permissions to create the resource in the namespace.
The text was updated successfully, but these errors were encountered: