Skip to content
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

Support configuring defaults for pipeline component settings #305

Open
dseapy opened this issue Nov 2, 2022 · 2 comments
Open

Support configuring defaults for pipeline component settings #305

dseapy opened this issue Nov 2, 2022 · 2 comments
Assignees
Labels
area/controller enhancement New feature or request

Comments

@dseapy
Copy link
Contributor

dseapy commented Nov 2, 2022

Summary

Currently AbstractPodTemplate and ContainerTemplate need to be specified within each pipeline component (daemon, job, vertex). It would be useful to be able to set defaults for the controller to use.

Use Cases

It would be nice to simplify the responsibility of the data-scientist creating the pipeline in a Dev environment, while also simplifying the responsibility of the devops team with the (eventual) promotion of the pipeline to a Prod environment. Allowing defaults to be set for the controller would have the following benefits:

  • Streamline data-scientists writing/running successful pipelines in clusters that require specific environment-specific configuration to run well.
  • Streamline devops team implementing automation to promote Pipeline resources to different environments with different constraints (i.e. fewer per-pipeline daemon replicas in Dev to save $).
  • Yaml with less duplication, making it easier to work with when working with Pipelines in general.

An example of this, is that in a Prod environment one might want settings that a data-scientist making the Pipeline might not care much about in Dev. i.e. maybe not exactly this, but something like this for daemon component:

  templates:
    daemon:
      replicas: 2
      metadata:
        annotations:
          sidecar.istio.io/inject: "false"
      containerTemplate:
        resources:
          requests:
            cpu: 100m
          limits:
            memory: 200Mi
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: app.kubernetes.io/component
                    operator: In
                    values:
                      - daemon
                  - key: numaflow.numaproj.io/pipeline-name
                    operator: In
                    values:
                      - example-pipeline
              topologyKey: kubernetes.io/hostname
@dseapy dseapy added the enhancement New feature or request label Nov 2, 2022
@dseapy
Copy link
Contributor Author

dseapy commented Nov 2, 2022

I'm happy to work on this. There are alternative ways to accomplish this outside of numaflow (i.e. write a DefaultedPipeline CRD with controller that creates Pipeline resources), so it's not a blocker but would be nice for numaflow to support.

If this use-case does make sense for numaflow to support, let me know if you all have ideas of best approach to take for this. I can also just get started on implementing what seems best and then get feedback on a PR & go from there.

@whynowy
Copy link
Member

whynowy commented Nov 2, 2022

I don't prefer to introduce extra CRDs for that, what about adding to the controller configmap?

apiVersion: v1
kind: ConfigMap
metadata:
  name: numaflow-controller-config
data:
  controller-config.yaml: |+
    isbsvc:
      redis:
        xxx
  pipeline-templates.yaml: |+
    daemon:
      xxx
    job:
      xxx
    vertex:
      podTemplate:
        xxxx
      containerTemplate:
        xxxx
      initContainerTemplate:
        xxx

Users still can give customizations in the pipeline spec, that will override (merge to) the global config.

@whynowy whynowy added this to the v0.7 milestone Nov 2, 2022
dseapy added a commit to dseapy/numaflow that referenced this issue Nov 4, 2022
@whynowy whynowy modified the milestones: v0.7, v0.8 Dec 5, 2022
@vigith vigith modified the milestones: v0.8, v0.9 Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants