knative / build-templates

A library of build templates.
Apache License 2.0
183 stars 67 forks source link

Add GCR helper script to set up credentials for local namespace #20

Closed evankanderson closed 6 years ago

evankanderson commented 6 years ago

Fixes #21

This automates the creation of GCP credentials, permissions application on GCR buckets, and creation of kubernetes secrets in the current namespace using the _json_key style of secret.

Sorry about the shell script -- it seemed like the most readable/useful option, though the jq usage is a bit tricky.

enisoc commented 6 years ago

Could we have a way to specify which k8s namespace to put things in? I'd rather not have to change the default namespace for my kubectl context just for this step.

adrcunha commented 6 years ago

Why not putting this script in //hack, together with the other scripts?

google-prow-robot commented 6 years ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: evankanderson To fully approve this pull request, please assign additional approvers. We suggest the following additional approver: imjasonh

Assign the PR to them by writing /assign @imjasonh in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/knative/build-templates/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
evankanderson commented 6 years ago

Re @enisoc -- added positional arguments for namespace ($1) and kubernetes SA ($2) Re @adrcunha -- this script is intended for use by operators and/or developers who are looking to use the builds, not for contributors, which is what I'd expect //hack to be for. Additionally, build-templates doesn't have a //hack directory at all.

Updated, PTAL.

evankanderson commented 6 years ago

Updated docs, do you want to take a look again, @ImJasonH

adrcunha commented 6 years ago

/lgtm /woof space