Create system secrets in kubeconfig format

Was previously kubernetes_auth format.

Added defaults file which uses salt to fill in an env var
with the master's IP.

More thought needs to be given soon to how to make this
connection use a cert for the master, and how to support
multiple masters, and whether to use the DNS record
instead of an IP address.  But this PR unblocks some other
more urgent things, so doing it this way.
This commit is contained in:
Eric Tune
2015-04-20 07:35:20 -07:00
parent e079e23e47
commit c3203cba6d
5 changed files with 63 additions and 7 deletions

View File

@@ -48,6 +48,20 @@
- makedirs: True
{% endif %}
{% if grains['os_family'] == 'RedHat' %}
{% set environment_file = '/etc/sysconfig/kube-addons' %}
{% else %}
{% set environment_file = '/etc/default/kube-addons' %}
{% endif %}
{{ environment_file }}:
file.managed:
- source: salt://kube-addons/default
- template: jinja
- user: root
- group: root
- mode: 644
/etc/kubernetes/kube-addons.sh:
file.managed:
- source: salt://kube-addons/kube-addons.sh