{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/helm/issues/1754","repository_url":"https://api.github.com/repos/kubernetes/helm","labels_url":"https://api.github.com/repos/kubernetes/helm/issues/1754/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/helm/issues/1754/comments","events_url":"https://api.github.com/repos/kubernetes/helm/issues/1754/events","html_url":"https://github.com/kubernetes/helm/issues/1754","id":197340552,"number":1754,"title":"proposal: Better way use files in config maps and secrets","user":{"login":"syhol","id":642428,"avatar_url":"https://avatars.githubusercontent.com/u/642428?v=3","gravatar_id":"","url":"https://api.github.com/users/syhol","html_url":"https://github.com/syhol","followers_url":"https://api.github.com/users/syhol/followers","following_url":"https://api.github.com/users/syhol/following{/other_user}","gists_url":"https://api.github.com/users/syhol/gists{/gist_id}","starred_url":"https://api.github.com/users/syhol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syhol/subscriptions","organizations_url":"https://api.github.com/users/syhol/orgs","repos_url":"https://api.github.com/users/syhol/repos","events_url":"https://api.github.com/users/syhol/events{/privacy}","received_events_url":"https://api.github.com/users/syhol/received_events","type":"User","site_admin":false},"labels":[{"id":335802899,"url":"https://api.github.com/repos/kubernetes/helm/labels/proposal","name":"proposal","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-23T09:51:58Z","updated_at":"2016-12-23T23:19:06Z","closed_at":null,"body":"More of a feature request as I haven't fleshed out all the details yet.\r\n\r\nRight now the only way I can configure config maps and secrets from files is to copy entire file contents (and base 64 for secrets) into the values files or --set, its a bit awkward.\r\n\r\nLets say I have an RSA key, at the moment I base64 this, strip whitespace and put it into my values file:\r\n\r\n```yaml\r\nrsaPrivateKey: \"LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS0NBUUVBdUcydDRBZ2dydXl3WjFKa2o4azBWZ1c3ak1vTlhoRVVMSG1mbEpWRFFJbmZTRVBtCnZaWGlYUHR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have access to `(.Files.Glob \"foo/*\").AsConfig`  and `(.Files.Glob \"bar/*\").AsSecrets`, but this is restricted to files inside the chart. \r\n\r\nPerhaps we could use go template engine on the value file itself, like:\r\n\r\n```yaml\r\nrsaPrivateKey: {{ (.Files.Glob \"*.key.pem\").AsSecrets }}\r\n```\r\n\r\nThis would give helm more flexibility, but also more complexity. The functionality could more restricted than whats in chart template files, perhaps even with a different syntax/engine. I'm not sure how it would work with relative paths, that is something we would have to figure out.\r\n\r\nI have a feeling this was what #1662 was trying to get across, but I'm not sure. Has anyone else felt like this is needed?\r\n\r\nP.S I am so happy with helm, its a great tool and I think you guys are doing a great job.\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/helm/issues/comments/269055871","html_url":"https://github.com/kubernetes/helm/issues/1754#issuecomment-269055871","issue_url":"https://api.github.com/repos/kubernetes/helm/issues/1754","id":269055871,"user":{"login":"syhol","id":642428,"avatar_url":"https://avatars.githubusercontent.com/u/642428?v=3","gravatar_id":"","url":"https://api.github.com/users/syhol","html_url":"https://github.com/syhol","followers_url":"https://api.github.com/users/syhol/followers","following_url":"https://api.github.com/users/syhol/following{/other_user}","gists_url":"https://api.github.com/users/syhol/gists{/gist_id}","starred_url":"https://api.github.com/users/syhol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syhol/subscriptions","organizations_url":"https://api.github.com/users/syhol/orgs","repos_url":"https://api.github.com/users/syhol/repos","events_url":"https://api.github.com/users/syhol/events{/privacy}","received_events_url":"https://api.github.com/users/syhol/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T23:19:06Z","updated_at":"2016-12-23T23:19:06Z","body":"Yes! This is just what I need. Thanks for making sense of my issue. I can get by without this but I think it could be useful it many places, like mysql /docker-entrypoint-initdb.d files and nginx vhosts."}}
{"actor":{"display_login":"syhol"}}