mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
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.
This commit is contained in:
parent
46e6df655f
commit
ce220836c3
@ -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 -%}
|
||||
|
Loading…
Reference in New Issue
Block a user