Commit ce220836 authored by Matt Johnson's avatar Matt Johnson

Allow for local CNI binaries and configuration files with KUBERNETES_PROVIDER=vagrant.

Files are taken from cluster/network-plugins/{bin,conf} to be consumed within a vagrant kube-up.sh environment. Paths used for configuration files and the 'cni' name of the network provider are all from the kubernetes documentation, but the actual implementation in the salt automation doesn't seem to exist.
parent 46e6df65
......@@ -5,6 +5,13 @@
- mode: 755
- makedirs: True
/etc/cni/net.d:
file.directory:
- user: root
- group: root
- mode: 755
- makedirs: True
# These are all available CNI network plugins.
cni-tar:
archive:
......@@ -18,3 +25,17 @@ cni-tar:
- archive_format: tar
- if_missing: /opt/cni/bin
{% if grains['cloud'] is defined and grains.cloud in [ 'vagrant' ] %}
# Install local CNI network plugins in a Vagrant environment
cmd-local-cni-plugins:
cmd.run:
- name: |
cp -v /vagrant/cluster/network-plugins/cni/bin/* /opt/cni/bin/.
chmod +x /opt/cni/bin/*
cmd-local-cni-config:
cmd.run:
- name: |
cp -v /vagrant/cluster/network-plugins/cni/config/* /etc/cni/net.d/.
chown root:root /etc/cni/net.d/*
chmod 744 /etc/cni/net.d/*
{% endif -%}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment