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

`node_selector` does not apply to `controller-manager` pod

Open pat-s opened this issue 2 years ago • 6 comments

Please confirm the following

  • [X] I agree to follow this project's code of conduct.
  • [X] I have checked the current issues for duplicates.
  • [X] I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.

Bug Summary

With

spec:
    node_selector: |
      kubernetes.io/arch: amd64

only the awx pod is altered but not the controller-manager pod.

AWX Operator version

1.1.4

AWX version

21.11.0

Kubernetes platform

kubernetes

Kubernetes/Platform version

1.24

Modifications

no

Steps to reproduce

Deploy AWX with the setting from above and inspect the controller-manager deployment.

Expected results

Setting node_selector applies to both awx and controller-manager pods.

Actual results

node_selector was not applied to the controller-manager deployment.

Additional information

No response

Operator Logs

No response

pat-s avatar Feb 13 '23 07:02 pat-s

I just spent a while struggling with this trying to use helm to install to an existing cluster. This should definitely be the intended behavior. To get around this, you have to install with kustomize, and include a patch in the kustomize.yaml file:

patches:
  - path: patch.yaml

patch.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: awx-operator-controller-manager
  namespace: awx
spec:
  template:
    spec:
      nodeSelector:
        kubernetes.io/os: linux

zachross1414 avatar Feb 13 '23 20:02 zachross1414

Marked as resolved, closing for now.

akus062381 avatar Feb 15 '23 16:02 akus062381

Thanks for providing a kustomize example for this @zachross1414 !

rooftopcellist avatar Feb 15 '23 16:02 rooftopcellist

@akus062381 I don't think this is solved. The above is only a workaround and does not help when not using kustomize but e.g. Helm only (or Helm in combination with terraform).

The fix should happen at the template level in the operator AFAICS. If you agree, can this be reopened?

pat-s avatar Feb 15 '23 17:02 pat-s

@akus062381 I don't think this is solved. The above is only a workaround and does not help when not using kustomize but e.g. Helm only (or Helm in combination with terraform).

The fix should happen at the template level in the operator AFAICS. If you agree, can this be reopened?

I agree with you @pat-s , the issue shouldn't be closed because the workaround isn't always applicable, you need the ability to configure it directly during creation. It would help to add the right variables here.

@akus062381 can you reopen the issue to make it a feature to implement?

mamu-reply avatar Apr 19 '23 08:04 mamu-reply

Hello. Any chances to get this resolved in appropriate way?

D13410N3 avatar Mar 14 '25 11:03 D13410N3