Can't pass @option.opt1@ in Kubernetes node step

10 views
Skip to first unread message

javed...@gmail.com

unread,
Aug 21, 2025, 5:53:13 PMAug 21
to rundeck-discuss
Hello,

I am testing a node step using Kuberenetes / Generic / Create (job from yaml string)

I can't seem to pass my option value to the yaml file content. 

I can't use the Kubernetes / Job / Create node step because it only has room for one container, and I have an initContainer and a regular container in my job.

The plugin version is  2.0.14 
Rundeck version 5.6.0

Is this a bug? I know @option.opt1@ does get passed to inline scripts but not to inline yaml files. Or perhaps this is expected behavior, but I Would like to be able to pass option values to the yaml.

kubernetes.client.exceptions.ApiException: (422)
Reason: Unprocessable Entity
HTTP response headers: HTTPHeaderDict({'Audit-Id': '979bd4c4-02fd-4498-91eb-d671f816815e', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': 'a4653942-26ba-4e9b-a7ee-3d2885ccbe20', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'c39dbf8f-0aaa-45b0-be9d-19a6fdf28138', 'Date': 'Thu, 21 Aug 2025 21:41:36 GMT', 'Transfer-Encoding': 'chunked'})
HTTP response body: {
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "Job.batch \"nc...@option.marketplace_id@-update-prices\" is invalid: [metadata.name: Invalid value: \"nc...@option.marketplace_id@-update-prices\": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'), spec.template.labels: Invalid value: \"nc...@option.marketplace_id@-update-prices\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), spec.template.spec.containers[0].name: Invalid value: \"nc...@option.marketplace_id@-price-updater\": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')]",
kubernetes.client.exceptions.ApiException: (422)
Reason: Unprocessable Entity
HTTP response headers: HTTPHeaderDict({'Audit-Id': '979bd4c4-02fd-4498-91eb-d671f816815e', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': 'a4653942-26ba-4e9b-a7ee-3d2885ccbe20', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'c39dbf8f-0aaa-45b0-be9d-19a6fdf28138', 'Date': 'Thu, 21 Aug 2025 21:41:36 GMT', 'Transfer-Encoding': 'chunked'})
HTTP response body: {
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "Job.batch \"nc...@option.marketplace_id@-update-prices\" is invalid: [metadata.name: Invalid value: \"nc...@option.marketplace_id@-update-prices\": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'), spec.template.labels: Invalid value: \"nc...@option.marketplace_id@-update-prices\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), spec.template.spec.containers[0].name: Invalid value: \"nc...@option.marketplace_id@-price-updater\": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')]",

javed...@gmail.com

unread,
Aug 22, 2025, 6:14:34 AMAug 22
to rundeck-discuss
Hello,

I resolved this, it should be passed with ${option.opt1} not with @option.opt1@ 

We can close this.
Reply all
Reply to author
Forward
0 new messages