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

Deploy default and support custom affinities in our operators #323

Closed
18 tasks done
soenkeliebau opened this issue Jan 10, 2023 · 6 comments
Closed
18 tasks done

Deploy default and support custom affinities in our operators #323

soenkeliebau opened this issue Jan 10, 2023 · 6 comments

Comments

@soenkeliebau
Copy link
Member

soenkeliebau commented Jan 10, 2023

Geneal Tasks

  1. sbernauer

Products

  1. sbernauer
  2. release/2023-04
    razvan sbernauer
  3. release/2023-04
    sbernauer
  4. release/2023-04
    sbernauer
  5. release/2023-04
    sbernauer
  6. release/2023-04
    sbernauer
  7. 7 of 7
    release/2023-04
    sbernauer
  8. release/2023-04
    razvan
  9. release/2023-04
    sbernauer
  10. release/2023-04
    sbernauer
  11. release/2023-04
    razvan sbernauer
@soenkeliebau
Copy link
Member Author

soenkeliebau commented Feb 3, 2023

@nightkr @lfrancke and @soenkeliebau briefly discussed this yesterday and decided on a way forward.

The main discussion was whether it would be sufficient to allow overriding this as part of a generic safety-valve type of functionality where the user is allowed to specify pod_templates and the operator merges these into the pods it would create.

We decided that affinities are sufficiently common that we want to expose this as a fully supported functionality, instead of relying on overrides. Overrides will also be implemented, but under a separate ticket.

To this effect we will look into adding Option<PodAffinitiy> and Option<PodAntiAffinity> to our structs.
These will need to be defineable at the role and rolegroup level.

If these are not defined the operators should add sensible default affinities, like the ones mentioned in the ticket. If these are defined they should override the default affinities. To suppress affinites completely these should be set to null.

@fhennig
Copy link
Member

fhennig commented Feb 9, 2023

I didn't look into it much, but will be also be able to co-locate roles? I.e. for druid, the broker and router should ideally run on the same node (see here).

Can we also define that I want my Superset to always run preferably run next to the Druid Broker? Maybe that's already a bit advanced, just some ideas :)

@sbernauer sbernauer self-assigned this Feb 13, 2023
@sbernauer sbernauer changed the title Support pod affinities in our operators Deploy sane default pod affinities in our operators Feb 13, 2023
@sbernauer sbernauer changed the title Deploy sane default pod affinities in our operators Deploy default pod affinities in our operators Feb 13, 2023
@razvan
Copy link
Member

razvan commented Feb 14, 2023

This looks like a good chance to introduce first class support for pod templates. These would be merged with templates generated by the operators.. Then, not only affinities can be customized.

@sbernauer
Copy link
Member

sbernauer commented Feb 14, 2023

That was my initial thought as well. After some discussion I was convinced that a "generic" podOverwrite will still need some time as well as development until ready and we need this feature rather quick.
Also affinity is "important enough" to not rely on podOverwrites - at least for our POs.
Happy to have a short call and convince you as well :)

@razvan
Copy link
Member

razvan commented Feb 14, 2023

I understand the complexity argument and I agree. Still, we could design the manifest structure now in such a way that doesn't require breaking changes in the future.
For example, instead of adding a config.podAffinity now and painfully change it later, add a config.podTemplateOverwrite.affinity and be forward compatible with the future. Also be more in line with what people already know.

@sbernauer sbernauer changed the title Deploy default pod affinities in our operators Deploy default and support custom affinities in our operators Feb 16, 2023
bors bot pushed a commit to stackabletech/operator-rs that referenced this issue Feb 17, 2023
bors bot pushed a commit to stackabletech/kafka-operator that referenced this issue Feb 20, 2023
# Description

For stackabletech/issues#323



Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com>
bors bot pushed a commit to stackabletech/hdfs-operator that referenced this issue Feb 20, 2023
# Description

For stackabletech/issues#323

```
k get pod -l app.kubernetes.io/name=hdfs -o wide
NAME                                READY   STATUS    RESTARTS   AGE     IP               NODE                 NOMINATED NODE   READINESS GATES
simple-hdfs-datanode-default-0      1/1     Running   0          6m55s   10.210.95.85     default-fj5utf2erz   <none>           <none>
simple-hdfs-datanode-default-1      1/1     Running   0          3m31s   10.212.53.91     default-47v42ahsci   <none>           <none>
simple-hdfs-datanode-default-2      1/1     Running   0          2m46s   10.210.48.212    default-se3dl3u4yy   <none>           <none>
simple-hdfs-datanode-default-3      1/1     Running   0          2m7s    10.217.17.211    default-7z4lhciepb   <none>           <none>
simple-hdfs-datanode-default-4      1/1     Running   0          57s     10.209.135.145   default-dsd3qljwbd   <none>           <none>
simple-hdfs-journalnode-default-0   1/1     Running   0          6m56s   10.210.95.84     default-fj5utf2erz   <none>           <none>
simple-hdfs-namenode-default-0      2/2     Running   0          4m34s   10.210.95.86     default-fj5utf2erz   <none>           <none>
simple-hdfs-namenode-default-1      2/2     Running   0          4m56s   10.212.53.90     default-47v42ahsci   <none>           <none>
```


Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com>
@lfrancke lfrancke added the epic label Feb 21, 2023
bors bot pushed a commit to stackabletech/hbase-operator that referenced this issue Feb 22, 2023
# Description

For stackabletech/issues#323



Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com>
bors bot pushed a commit to stackabletech/zookeeper-operator that referenced this issue Feb 23, 2023
bors bot pushed a commit to stackabletech/trino-operator that referenced this issue Feb 23, 2023
bors bot pushed a commit to stackabletech/airflow-operator that referenced this issue Feb 24, 2023
bors bot pushed a commit to stackabletech/spark-k8s-operator that referenced this issue Feb 24, 2023
@lfrancke
Copy link
Member

All done! Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Release 23.4
Development

No branches or pull requests

5 participants