Operator Tolerations

Hi, I’m trying to deploy the AWX-Operator on an EKS cluster where the nodes are all configured with Taints.

I can see how to influence the final deployed resources that the operator creates, but I can’t see if there’s any way with helm to change the behaviour of the operator deployment.

I suspect that I need to add the toleration between these two lines here: awx-operator/config/default/manager_config_patch.yaml at devel · ansible/awx-operator · GitHub

However, as I’m currently consuming the helm chart - I don’t exactly know how that will trickle down into the values.yaml. It looks like to make any meaningful changes, I’d need to move config/manager/manager.yaml into .helm/starter/templates but that feels like a big move! Any thoughts before I raise an issue to address this?

Or, alternatively, am I better off just taking the basic install instructions (Basic install - Ansible AWX Operator Documentation) and tweaking the files before they deploy?

I’d like to make this a mostly-automated install, if I can! I don’t really want to be telling people to manually edit files to do the deployment.

Hi, the kustomization.yaml way in the basic install is handy way to customize operator deployment.

You can add patches in the kustomization.yaml (See the last three lines)

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
  # Find the latest tag here: https://github.com/ansible/awx-operator/releases
resources:
- github.com/ansible/awx-operator/config/default?ref=2.11.0

# Set the image tags to match the git version from above
images:
- name: quay.io/ansible/awx-operator
  newTag: 2.11.0

# Specify a custom namespace in which to install AWX
namespace: awx

# Apply patch to specific deployment   ✅
patches:   ✅
  - path: manager_patch.yaml   ✅

And here is the manager_patch.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
  namespace: system
spec:
  template:
    spec:
      tolerations:
        - key: "key1"
          operator: "Equal"
          value: "value1"
          effect: "NoSchedule"

This allows for customization of operator deployment in a declarative manner.

Refer to the official kustomize docs for further information: patches | SIG CLI

Hope this helps :smiley:

1 Like