ManageIQ / manageiq-pods

ManageIQ on Kubernetes and OpenShift
Apache License 2.0
51 stars 100 forks source link

Add Node affinity #1003

Closed bdunne closed 10 months ago

bdunne commented 11 months ago

For OpenShift 4.14 support

Part of #988

bdunne commented 11 months ago

@nasark Please also review. The refactoring was inspired by your work in #993. Do you think the miqutils code should continue to live in api/v1alpha1 or should create a api/v1 for it?

nasark commented 11 months ago

@nasark Please also review. The refactoring was inspired by your work in https://github.com/ManageIQ/manageiq-pods/pull/993. Do you think the miqutils code should continue to live in api/v1alpha1 or should create a api/v1 for it?

In my opinion since its technically just a refactor I would say to keep it in v1alpha1. Is there any benefit at the moment to creating a v1 API? We would also need to support multiple versions in the CRD if thats the case

bdunne commented 11 months ago

@nasark Please also review. The refactoring was inspired by your work in #993. Do you think the miqutils code should continue to live in api/v1alpha1 or should create a api/v1 for it?

In my opinion since its technically just a refactor I would say to keep it in v1alpha1. Is there any benefit at the moment to creating a v1 API? We would also need to support multiple versions in the CRD if thats the case

Fryguy commented 11 months ago

@bdunne How do we set the node affinities for the workloads? (workers and now also the automaton worker's jobs?)

I also updated the OP to say this is part of #988, but wasn't sure if it "completed" #988 or if we need other PRs (such as the node affinities for the workloads)

bdunne commented 10 months ago

@bdunne How do we set the node affinities for the workloads? (workers and now also the automaton worker's jobs?)

I also updated the OP to say this is part of #988, but wasn't sure if it "completed" #988 or if we need other PRs (such as the node affinities for the workloads)

This will discover the node affinities applied to the operator and apply the same affinities to httpd, postgres, memcached and the orchestrator. I'll be opening a PR shortly that does the same tihng inside the orchestrator for the deployments that it creates.

Fryguy commented 10 months ago

@bdunne Can we merge this now or do we have to wait for the core orchestrator change?

Second question. If we run on an older OpenShift, will these nodeAffinities cause issues, or are they just ignored on older OpenShifts

bdunne commented 10 months ago

This can be merged before the orchestrator changes.

My test cluster is 4.13.4 and it's working fine there. I can't find when kubernetes.io/arch label was introduced, but I see references to it over 3 years ago.

Fryguy commented 10 months ago

Skipping backport to quinteros, because it is already in the branch.

Fryguy commented 10 months ago

Skipping backport to quinteros, because it is already in the branch.