Description: The customer is requesting the ability to use more complex node selection behavior within a step group in custom stages, similar to the functionality available in the Kubernetes Build stage. Specifically, they are looking for support for affinity rules and topology spread constraints to enable more advanced scheduling decisions. Use Case: Currently, the customer can only use a basic nodeSelector in the step group of a custom stage. They would like to extend this capability to support more complex behaviors, such as affinity rules and topology spread constraints, to improve pod scheduling in their Kubernetes environments. An example of the behavior they are looking for is the following: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: "app" operator: "In" values: - RELEASE_NAME namespaces: - DEPLOYMENT_NAMESPACE topologyKey: " kubernetes.io/hostname " This configuration allows more fine-grained control over pod placement, ensuring that pods are scheduled based on their affinity to other pods, their namespaces, and their topology. The customer would like the option to apply this more complex behavior in step groups within custom stages. Desired Outcome: Extend support for advanced node selection, such as affinity and topology spread constraints, within step groups in custom stages. Allow users to define podAffinity, topologyKey, and labelSelector parameters directly within custom stages. Provide a user-friendly way to configure these advanced features, similar to the way it's done in the Kubernetes Build stage. Reason for the Request: The customer is looking to use more complex scheduling rules to ensure pods are deployed on the most suitable nodes, ensuring better resource utilization and avoiding overloading specific nodes.