A place for cluster deployment automation
Switch branches/tags
Nothing to show
Clone or download
jsleeio and k8s-ci-robot [imagebuilder] new flag for injecting extra tags (#708)
* [imagebuilder] new flag for injecting extra tags

Currently only implemented for AWS, as I don't have a GCE environment to
test in and didn't want to submit a change that would risk breaking
other people's images.

Add a flag `-addtags` to allow specifying one or more additional tags to
be injected into the `imagebuilder` configuration. This has two
purposes:

1. users operating in the same AWS account can use tags to select images

2. it also allows injecting extra runtime config into the `bootstrap-vz`
   templates. Possibly best explained with an example from our internal
   CI job:

```
---
{{- define "gitref" -}}
{{- $ref := or .Tags.GitRef "" -}}
{{- if ne $ref "master" -}}
{{- printf "%s" $ref -}}
{{- end -}}
{{- end -}}
{{ if eq .Cloud "aws" }}
name: sm-k8s-1.8-debian-{system.release}-{system.architecture}-{provider.virtualization}-ebs-{%Y}-{%m}-{%d}{{ template "gitref" . }}
{{ else }}
name: k8s-1.8-debian-{system.release}-{system.architecture}-{%Y}-{%m}-{%d}{{- template "gitref" . }}
{{ end }}
```

* [imagebuilder] propagate tags between Config/provider

Don't want to pass the whole Config object through to the imagebuilder
process as it contains a private key. Instead, just propagate tags, so
that they can be used in both the template and in taggin the resulting
AMI.

This could probably use some refactoring.
Latest commit d550583 Aug 16, 2018

README.md

kube-deploy

This is a repository of community maintained Kubernetes cluster deployment automations.

Think of this as https://github.com/kubernetes/contrib for deployment automations! Each subdirectory is its own project. It should be a place where people can come see how the community is deploying kubernetes and should allow for faster development iteration compared to developing in the main repository.