payload: {"action":"created","issue":{"url":"https://api.github.com/repos/roboll/helmfile/issues/653","repository_url":"https://api.github.com/repos/roboll/helmfile","labels_url":"https://api.github.com/repos/roboll/helmfile/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/roboll/helmfile/issues/653/comments","events_url":"https://api.github.com/repos/roboll/helmfile/issues/653/events","html_url":"https://github.com/roboll/helmfile/issues/653","id":452443177,"node_id":"MDU6SXNzdWU0NTI0NDMxNzc=","number":653,"title":"environment value not found using bases and templates","user":{"login":"orbiran88","id":22191698,"node_id":"MDQ6VXNlcjIyMTkxNjk4","avatar_url":"https://avatars2.githubusercontent.com/u/22191698?v=4","gravatar_id":"","url":"https://api.github.com/users/orbiran88","html_url":"https://github.com/orbiran88","followers_url":"https://api.github.com/users/orbiran88/followers","following_url":"https://api.github.com/users/orbiran88/following{/other_user}","gists_url":"https://api.github.com/users/orbiran88/gists{/gist_id}","starred_url":"https://api.github.com/users/orbiran88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbiran88/subscriptions","organizations_url":"https://api.github.com/users/orbiran88/orgs","repos_url":"https://api.github.com/users/orbiran88/repos","events_url":"https://api.github.com/users/orbiran88/events{/privacy}","received_events_url":"https://api.github.com/users/orbiran88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-06-05T11:09:30Z","updated_at":"2019-10-07T13:20:53Z","closed_at":null,"author_association":"NONE","body":"Trying to use `bases:` with yaml containing `templates` will not evaluating environment values, followed by this comment: https://github.com/roboll/helmfile/issues/388#issuecomment-491712915\r\n\r\n**Example:**\r\n\r\nhelmfile.yaml\r\n```\r\nbases:\r\n- ../../../commons/environments.yaml\r\n---\r\n\r\nbases:\r\n- ../../../commons/helmDefaults.yaml\r\n---\r\n\r\nbases:\r\n- ../../../commons/repositories.yaml\r\n---\r\n\r\n{{ readFile \"../../../commons/templates.yaml\" }}\r\n---\r\n\r\nreleases:\r\n  # Zookeeper Clusters\r\n  - name: zk-data\r\n    <<: *zk\r\n```\r\n\r\ntemplates.yaml\r\n```\r\ntemplates:\r\n  zookeeper: &zk\r\n    chart: {{ .Environment.Values | getOrNil \"confluent.zookeeper.chart\" }}\r\n    version: {{ .Environment.Values | getOrNil \"confluent.zookeeper.version\" }}\r\n    namespace: {{ .Environment.Values | getOrNil \"namespace\" }}\r\n    missingFileHandler: Warn\r\n    values:\r\n      - ../environments/{{`{{ .Environment.Name }}`}}/{{`{{ .Release.Name }}`}}.yaml\r\n      - imageTag: {{ .Environment.Values | getOrNil \"confluent.imageTag\" }}\r\n```\r\n\r\nERROR;\r\n```\r\nfailed to read 00-init.yaml: reading document at index 1: yaml: invalid map key: map[interface {}]interface {}{\".Environment.Values | getOrNil \\\"confluent.imageTag\\\"\":interface {}(nil)}\r\n```\r\nIf I remove the line `- imageTag: {{ .Environment.Values | getOrNil \"confluent.imageTag\" }}` I will get:\r\n```\r\ncannot unmarshal !!map into string\r\n```\r\nAbout the other values.. \r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/roboll/helmfile/issues/comments/539007416","html_url":"https://github.com/roboll/helmfile/issues/653#issuecomment-539007416","issue_url":"https://api.github.com/repos/roboll/helmfile/issues/653","id":539007416,"node_id":"MDEyOklzc3VlQ29tbWVudDUzOTAwNzQxNg==","user":{"login":"chrisduong","id":1848882,"node_id":"MDQ6VXNlcjE4NDg4ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/1848882?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisduong","html_url":"https://github.com/chrisduong","followers_url":"https://api.github.com/users/chrisduong/followers","following_url":"https://api.github.com/users/chrisduong/following{/other_user}","gists_url":"https://api.github.com/users/chrisduong/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisduong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisduong/subscriptions","organizations_url":"https://api.github.com/users/chrisduong/orgs","repos_url":"https://api.github.com/users/chrisduong/repos","events_url":"https://api.github.com/users/chrisduong/events{/privacy}","received_events_url":"https://api.github.com/users/chrisduong/received_events","type":"User","site_admin":false},"created_at":"2019-10-07T13:20:53Z","updated_at":"2019-10-07T13:20:53Z","author_association":"NONE","body":"@mumoshu, so how can we include the separate Template file. I had tried with `readFile` and `helmfiles` statement. They all failed. It seems like we have to put `templates` statement and `releases` statement in the same Helmfile, then the rendering would work correctly. \r\n\r\nIs it possible that we can include the Template and Releases like this, so we don't have to write a very long Helmfile.\r\n\r\n```yaml\r\nbases:\r\n  - environments.yaml\r\n  # - defaults.yaml\r\n\r\n---\r\nhelmfiles:\r\n  - releases/nginx-ingress.yaml # Template \r\n```\r\n\r\n```yaml\r\ntemplates:\r\n  nginx: &nginx\r\n    chart: stable/nginx-ingress\r\n    version: \"{{ .Values.version }}\"\r\n\r\nreleases:\r\n  - name: nginx-controller\r\n    <<: *nginx\r\n```"}}
other: {"actor":{"display_login":"chrisduong"}}