redhat-developer / odo

odo - Developer-focused CLI for fast & iterative container-based application development on Podman and Kubernetes. Implementation of the open Devfile standard.
https://odo.dev
Apache License 2.0
790 stars 244 forks source link

Variable substitution does not work in pod-overrides and container-overrides #6764

Open valaparthvi opened 1 year ago

valaparthvi commented 1 year ago
components:
  - container:
      image: quay.io/tkral/devbox-demo-devbox
    attributes:
      pod-overrides:
        spec:
          serviceAccountName: "{{RESOURCE_NAME}}"
variables:
  RESOURCE_NAME: my-go-app
$ odo dev
 /  \__     Developing using the "restapi" Devfile
 \__/  \    Namespace: restapi-mongodb
 /  \__/    odo version: v3.9.0
 \__/

↪ Running on the cluster in Dev mode
 •  Waiting for Kubernetes resources  ...
Cleaning resources, please wait
 ✗  unable to create or update component: unable to update Deployment restapi-app: Deployment.apps "restapi-app" is invalid: spec.template.spec.serviceAccountName: Invalid value: "{{RESOURCE_NAME}}": 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])?)*')

"{{RESOURCE NAME}}" should be replaced by "my-go-app", instead an error is returned.

This probably needs to be fixed on the devfile/library side.

/kind bug /area devfile-spec

github-actions[bot] commented 1 year ago

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 30 days since being marked as stale.

rm3l commented 1 year ago

Still relevant as an issue.

/reopen /remove-lifecycle rotten /remove-lifecycle stale

openshift-ci[bot] commented 1 year ago

@rm3l: Reopened this issue.

In response to [this](https://github.com/redhat-developer/odo/issues/6764#issuecomment-1695526457): >Still relevant as an issue. > >/reopen >/remove-lifecycle rotten >/remove-lifecycle stale Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
github-actions[bot] commented 10 months ago

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

rm3l commented 10 months ago

/remove-lifecycle stale /lifecycle frozen /remove-status needs-triage