{"action":"created","issue":{"url":"https://api.github.com/repos/kopeio/kexpand/issues/7","repository_url":"https://api.github.com/repos/kopeio/kexpand","labels_url":"https://api.github.com/repos/kopeio/kexpand/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/kopeio/kexpand/issues/7/comments","events_url":"https://api.github.com/repos/kopeio/kexpand/issues/7/events","html_url":"https://github.com/kopeio/kexpand/pull/7","id":184959909,"number":7,"title":"Base64 func","user":{"login":"dennis-bsi","id":16431200,"avatar_url":"https://avatars.githubusercontent.com/u/16431200?v=3","gravatar_id":"","url":"https://api.github.com/users/dennis-bsi","html_url":"https://github.com/dennis-bsi","followers_url":"https://api.github.com/users/dennis-bsi/followers","following_url":"https://api.github.com/users/dennis-bsi/following{/other_user}","gists_url":"https://api.github.com/users/dennis-bsi/gists{/gist_id}","starred_url":"https://api.github.com/users/dennis-bsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennis-bsi/subscriptions","organizations_url":"https://api.github.com/users/dennis-bsi/orgs","repos_url":"https://api.github.com/users/dennis-bsi/repos","events_url":"https://api.github.com/users/dennis-bsi/events{/privacy}","received_events_url":"https://api.github.com/users/dennis-bsi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-24T21:29:36Z","updated_at":"2016-11-14T05:26:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kopeio/kexpand/pulls/7","html_url":"https://github.com/kopeio/kexpand/pull/7","diff_url":"https://github.com/kopeio/kexpand/pull/7.diff","patch_url":"https://github.com/kopeio/kexpand/pull/7.patch"},"body":"Feature: Adds the feature of prefixing `base64` before either the parenths`((` or braces`{{` to encode the returned value base base64. `$base(key)`, `$base64((key))`, and `base64{{key}}` are now supported.  See README.md for updated information.\n\nUse case: when using template files for secrets, the value is expected to be sent to the api in base64 encoding.  This allows the variables file or `-k=key=value` flag to be plain text.\n\nOther changes: This also reduces the repetition of the code from 3 functions for each format, to a single function.\n\nTest run:\n\n```\n/tmp/base64 $ cat mysecret.yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: mysecret\ndata:\n  quotedName: $(name)\n  quotedBase64Name: $base64(name)\n  s3Bucket: $((s3_bucket))\n  base64S3Bucket: $base64((s3_bucket))\n  legacyWebsite: {{Website}}\n  base64LegacyWebsite: base64{{Website}}\n\n/tmp/base64 $ cat values.yaml\nname: Dennis\ns3_bucket: my-bucket\nWebsite: github.com\n\n/tmp/base64 $ kexpand expand -f values.yaml mysecret.yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: mysecret\ndata:\n  quotedName: \"Dennis\"\n  quotedBase64Name: \"RGVubmlz\"\n  s3Bucket: my-bucket\n  base64S3Bucket: bXktYnVja2V0\n  legacyWebsite: github.com\n  base64LegacyWebsite: Z2l0aHViLmNvbQ==\n```\n"},"comment":{"url":"https://api.github.com/repos/kopeio/kexpand/issues/comments/260251252","html_url":"https://github.com/kopeio/kexpand/pull/7#issuecomment-260251252","issue_url":"https://api.github.com/repos/kopeio/kexpand/issues/7","id":260251252,"user":{"login":"justinsb","id":100893,"avatar_url":"https://avatars.githubusercontent.com/u/100893?v=3","gravatar_id":"","url":"https://api.github.com/users/justinsb","html_url":"https://github.com/justinsb","followers_url":"https://api.github.com/users/justinsb/followers","following_url":"https://api.github.com/users/justinsb/following{/other_user}","gists_url":"https://api.github.com/users/justinsb/gists{/gist_id}","starred_url":"https://api.github.com/users/justinsb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinsb/subscriptions","organizations_url":"https://api.github.com/users/justinsb/orgs","repos_url":"https://api.github.com/users/justinsb/repos","events_url":"https://api.github.com/users/justinsb/events{/privacy}","received_events_url":"https://api.github.com/users/justinsb/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T05:26:02Z","updated_at":"2016-11-14T05:26:02Z","body":"Thanks - going to merge and then fix up CI!"}}
{"actor":{"display_login":"justinsb"}}