{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/helm/issues/630","repository_url":"https://api.github.com/repos/kubernetes/helm","labels_url":"https://api.github.com/repos/kubernetes/helm/issues/630/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/helm/issues/630/comments","events_url":"https://api.github.com/repos/kubernetes/helm/issues/630/events","html_url":"https://github.com/kubernetes/helm/issues/630","id":152490978,"number":630,"title":"Inheritance of values of dependency charts","user":{"login":"sameersbn","id":410147,"avatar_url":"https://avatars.githubusercontent.com/u/410147?v=3","gravatar_id":"","url":"https://api.github.com/users/sameersbn","html_url":"https://github.com/sameersbn","followers_url":"https://api.github.com/users/sameersbn/followers","following_url":"https://api.github.com/users/sameersbn/following{/other_user}","gists_url":"https://api.github.com/users/sameersbn/gists{/gist_id}","starred_url":"https://api.github.com/users/sameersbn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sameersbn/subscriptions","organizations_url":"https://api.github.com/users/sameersbn/orgs","repos_url":"https://api.github.com/users/sameersbn/repos","events_url":"https://api.github.com/users/sameersbn/events{/privacy}","received_events_url":"https://api.github.com/users/sameersbn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"technosophos","id":89193,"avatar_url":"https://avatars.githubusercontent.com/u/89193?v=3","gravatar_id":"","url":"https://api.github.com/users/technosophos","html_url":"https://github.com/technosophos","followers_url":"https://api.github.com/users/technosophos/followers","following_url":"https://api.github.com/users/technosophos/following{/other_user}","gists_url":"https://api.github.com/users/technosophos/gists{/gist_id}","starred_url":"https://api.github.com/users/technosophos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technosophos/subscriptions","organizations_url":"https://api.github.com/users/technosophos/orgs","repos_url":"https://api.github.com/users/technosophos/repos","events_url":"https://api.github.com/users/technosophos/events{/privacy}","received_events_url":"https://api.github.com/users/technosophos/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2016-05-02T06:46:31Z","updated_at":"2016-05-09T20:39:03Z","closed_at":null,"body":"According to the [charts docs](https://github.com/kubernetes/helm/blob/master/docs/charts.md#values-files), values for dependent charts can be specified in the `values.toml` file using TOML tables.\r\n\r\nIt would be great if there was a way to inherit chart values in manifest files. For example, for a wordpress deployment the database setup would need to be specified in the wordpress and the mysql charts like so:\r\n\r\n```toml\r\nwordpressUser = \"admin\"\r\n...\r\nmysqlUser = \"root\"\r\nmysqlPassword = \"secret-password\"\r\nmysqlDatabase = \"wordpressdb\"\r\n...\r\n\r\n[mysql]\r\nmysqlUser = \"root\"\r\nmysqlPassword = \"secret-password\"\r\nmysqlDatabase = \"wordpressdb\"\r\n...\r\n```\r\n\r\nThe database parameters specified here are redundant and could lead to deployment errors if the values are not updated for all instances or if there are typo(s). \r\n\r\nThis could be resolved if the values of charts specified as dependencies could be referenced in the top-level chart. I suggest referencing values using `.<chartname>.<field>` in the sprig functions. e.g. `.mysql.mysqlUser` would reference value of the `.mysqlUser` of the `mysql` chart.\r\n\r\nExample,\r\n\r\n```toml\r\nwordpressUser = \"admin\"\r\n...\r\n\r\n[mysql]\r\nmysqlUser = \"root\"\r\nmysqlPassword = \"secret-password\"\r\nmysqlDatabase = \"wordpressdb\"\r\n...\r\n```\r\n\r\nand in the wordpress template\r\n \r\n```yaml\r\napiVersion: v1\r\nkind: ReplicationController\r\n...\r\n    spec:\r\n      containers:\r\n        - name: wordpress\r\n          ...\r\n          env:\r\n            - name: WORDPRESS_USER\r\n              value: {{default \"admin\" .wordpressUser}}\r\n              ...\r\n            - name: MYSQL_USER\r\n              value: {{default \"root\" .mysql.mysqlUser}}\r\n            - name: MYSQL_PASSWORD\r\n              value: {{default \"password\" .mysql.mysqlPassword}}\r\n            - name: MYSQL_DATABASE\r\n              value: {{default \"wordpressdb\" .mysql.mysqlDatabase}}\r\n```\r\n\r\nthoughts?\r\n\r\n/cc @prydonius"},"comment":{"url":"https://api.github.com/repos/kubernetes/helm/issues/comments/217982388","html_url":"https://github.com/kubernetes/helm/issues/630#issuecomment-217982388","issue_url":"https://api.github.com/repos/kubernetes/helm/issues/630","id":217982388,"user":{"login":"technosophos","id":89193,"avatar_url":"https://avatars.githubusercontent.com/u/89193?v=3","gravatar_id":"","url":"https://api.github.com/users/technosophos","html_url":"https://github.com/technosophos","followers_url":"https://api.github.com/users/technosophos/followers","following_url":"https://api.github.com/users/technosophos/following{/other_user}","gists_url":"https://api.github.com/users/technosophos/gists{/gist_id}","starred_url":"https://api.github.com/users/technosophos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technosophos/subscriptions","organizations_url":"https://api.github.com/users/technosophos/orgs","repos_url":"https://api.github.com/users/technosophos/repos","events_url":"https://api.github.com/users/technosophos/events{/privacy}","received_events_url":"https://api.github.com/users/technosophos/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T20:39:03Z","updated_at":"2016-05-09T20:39:03Z","body":"I think I like that config, @sameersbn, though I think that would make `[mysql]` into `[mychart.mysql]`, since mysql there is a dependency of `mychart`.\r\n\r\nWhat do we do if Chart A imports Chart B, and Chart B sets a `[global]` namespace?"}}