ponmani Sastha:
Hi, I’m facing the error (*selector
will be auto-generated)* in cronjob. I intended to restrict the cronjob deployment in other environments.
Kindly share your thoughts and if possible share a sample cronjob template with selectors and NotIn operator values.
unnivkn:
Hi @ponmani Sastha could you please try create a cronjob using imperative command & use that yaml as a template for your requirement.
ponmani Sastha:
@unnivkn I’ve enabled the manual selector as true in job but in cronjob template its throwing the error (*selector
will be auto-generated).* I’ve resolved it by a workaround - I’ve enabled a condition & restricted it based on the environments that too before creating the yaml template via the jenkins groovy script.
unnivkn:
Hi @ponmani Sastha thanks for the update & happy to know that your issue is resolved.