Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release name template #602

Merged
merged 1 commit into from May 30, 2018

Conversation

Projects
None yet
3 participants
@afrittoli
Copy link
Contributor

afrittoli commented May 25, 2018

Add the ability to express the release name as a template.
This is based on #601

@afrittoli afrittoli requested review from dgageot , dlorenc , r2d4 and viglesiasce as code owners May 25, 2018

@dgageot

This comment has been minimized.

Copy link
Member

dgageot commented May 26, 2018

@afrittoli Thanks for the PR. The linter is complaining

@afrittoli afrittoli force-pushed the afrittoli:release_name_template branch 3 times, most recently from d62dbdd to fd88bc8 May 27, 2018

@afrittoli

This comment has been minimized.

Copy link
Contributor Author

afrittoli commented May 27, 2018

@dgageot The linter is failing on the boilerplate check because I'm trying to attribute copyright to my employer for the code I added. Is this against the CLA? See #600

@afrittoli afrittoli force-pushed the afrittoli:release_name_template branch 2 times, most recently from 7ae8bb9 to 3ebbe0b May 27, 2018

@afrittoli

This comment has been minimized.

Copy link
Contributor Author

afrittoli commented May 27, 2018

I checked the corporate CLA and it in facts it includes "Grant of Copyright License" in point (2) of https://cla.developers.google.com/about/google-corporate. I reverted the copyright statements to Google, and replaced a couple of spaces for a tab, and now the linter is happy.

@afrittoli afrittoli force-pushed the afrittoli:release_name_template branch from 3ebbe0b to d791681 May 27, 2018

Allow for env variables in the helm release name
When using skaffold in CI, it would be handy to be able to deploy
to a shared cluster. To do that the current options are either to
change skaffold.yaml during the CI job (e.g. using sed) or to limit
CI jobs to one at the time for a specific repo/skaffold.yaml.

Templating the release name allows to bind the release name to
change metadata like a PR number.

Adding tests for util/env_template.go which I prepared for refactor
PR and missed to add into the PR.

Signed-off-by: Andrea Frittoli (andreaf) <andrea.frittoli@uk.ibm.com>

@afrittoli afrittoli force-pushed the afrittoli:release_name_template branch from d791681 to 9fe0967 May 28, 2018

@dgageot

This comment has been minimized.

Copy link
Member

dgageot commented May 30, 2018

LGTM

@dgageot dgageot merged commit 4c6664b into GoogleContainerTools:master May 30, 2018

2 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rahulwa

This comment has been minimized.

Copy link

rahulwa commented Jun 9, 2018

Can I have some example containing how to use it?
I see that api is still same.

@rahulwa

This comment has been minimized.

Copy link

rahulwa commented Jun 9, 2018

Nevermind, got it.
Something like

  helm:
    releases:
      - name: "{{.APP_NAME}}-{{.APP_ENV}}"

mtreinish pushed a commit to mtreinish/health-helm that referenced this pull request Nov 8, 2018

Add ingress and template the skaffold release name
For CI, each PR should deploy to a different release name at least.
This depends on GoogleContainerTools/skaffold#602
which is not merged yet in skaffold.

Add ingress as well, so that the cluster deployed via CI can be accessed
via a public URL. For simplicity for now I assume everything is in the
default namespace and so to avoid conflict between releases I defined
a release specific path.

The ingress configuration are a simplified version of what "helm create"
would create. Eventually it would be good to move annotations and paths
back into values to make it possible to run this chart on a ingress
implementation other then the IKS custom one.

In future we could use per-ci-build (i.e. per-release) sub-domains and
a fixed path to access api and dashboard, but that requires some extra
work especially if we want to enable TLS as well (which we should).

See https://console.bluemix.net/docs/containers/cs_ingress.html#ingress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.