Describe the bug
Endless affinity list when using new schudlingPolicy field and a DATA_PLANE_AFFINITY in config
To Reproduce
Steps to reproduce the behavior:
Have a DATA_PLANE_AFFINITY: '{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"preference":{"matchExpressions":[{"key":"kb-data","operator":"In","values":["true"]}]},"weight":100}]}}' field in the config
Create a cluster CR, with schedulingPolicy field not null. e.g.
Additional context
The root cause is that the generated scheduling policy is patched to cluster CR itself. Though it only should be in the component CR.
On a deeper view, this bug happened because cluster controller would modify cluster CR's spec. In which use case do we need this behavior? After all, the general idea is that a controller will not modify the CR's spec it reconciles.
Describe the bug Endless affinity list when using new schudlingPolicy field and a DATA_PLANE_AFFINITY in config
To Reproduce Steps to reproduce the behavior:
DATA_PLANE_AFFINITY: '{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"preference":{"matchExpressions":[{"key":"kb-data","operator":"In","values":["true"]}]},"weight":100}]}}'
field in the configThe cluster CR will become like:
Additional context The root cause is that the generated scheduling policy is patched to cluster CR itself. Though it only should be in the component CR.
On a deeper view, this bug happened because cluster controller would modify cluster CR's spec. In which use case do we need this behavior? After all, the general idea is that a controller will not modify the CR's spec it reconciles.