How to use advanced templating for `spec.subscription.config` in Operator Policy?

Solution Verified - Updated -

Issue

  • How do you use advanced templating for spec.subscription.config in Operator Policy?
  • How do we implement advanced templating so we can have one policy and set the specific values for spec.subscription.config depending on the cluster? We are utilizing operator policies to install and upgrade our operators. We have a cluster with infra nodes, so want the operator subscriptions to have nodeSelector of node-role.kubernetes.io/infra: "" and tolerations of:

    - effect: NoSchedule
       key: node-role.kubernetes.io/infra
       operator: Exists
    

Environment

  • Red Hat Advanced Cluster Management for Kubernetes 2.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content