harbor-operator icon indicating copy to clipboard operation
harbor-operator copied to clipboard

How to configure affinity for inClusterCache and inClusterDatabase?

Open Martin-Weiss opened this issue 4 years ago • 8 comments

It seems that in the current version we can not specify the affinity for the inClusterCache (redis) to ensure that the PODs are scheduled on different hosts. A similar configuration also seems to be missing for the inClusterDatabase.

Did we oversee this or is it true that this can not be configured at the moment?

Thanks!

Martin-Weiss avatar Jul 21 '21 09:07 Martin-Weiss

@Martin-Weiss

They can not be configured at the moment. We'll check and see if the affinity of inClusterCache and inClusterDatabase can be supported in the next release (possible v1.2).

steven-zou avatar Jul 22 '21 06:07 steven-zou

Reference for psql: https://github.com/zalando/postgres-operator/blob/b1fab703ee1676cb6b6f00b43bf785cb7a95e30a/manifests/complete-postgres-manifest.yaml#L182

Reference for Redis: https://github.com/spotahome/redis-operator/blob/b3dad57f5c4c94fe48824deacf391ab82232b3d5/example/redisfailover/node-affinity.yaml#L8

steven-zou avatar Jul 22 '21 06:07 steven-zou

They can not be configured at the moment. We'll check and see if the affinity of inClusterCache and inClusterDatabase can be supported in the next release (possible v1.2).

Thanks! For PGSQL there is an option in the operators helm chart : enable_pod_antiaffinity: true that does part of what we need. We might also have to check for supporting zones/regions..

For Redis - I can adjust the CRD object but after changing something in the harbor CRD the Redis CRD is "reset".. so here I assume the harbor operator needs to add the parameters to the redis CRD..

Martin-Weiss avatar Jul 22 '21 06:07 Martin-Weiss

Beside the pqsql and redis deployments affinity settings - is there also a plan to add affinity settings for all other components?

Martin-Weiss avatar Aug 10 '21 09:08 Martin-Weiss

@Ghostbaby please check if underlining postgres-operator and redis-operator support this param

bitsf avatar Sep 07 '21 12:09 bitsf

@bitsf copy

Ghostbaby avatar Sep 07 '21 12:09 Ghostbaby

support for postgres-operator need more work, need update configmap

bitsf avatar Sep 22 '21 12:09 bitsf

would be great to support placement also for minio operator.

GeneralFox avatar Sep 24 '21 14:09 GeneralFox