mirror of https://github.com/k3s-io/k3s
Merge pull request #47458 from caseydavenport/standardize-cni-bin-dir
Automatic merge from submit-queue (batch tested with PRs 47669, 40284, 47356, 47458, 47701) Standardize on home/kubernetes/bin for CNI **What this PR does / why we need it**: Standardizes where CNI plugins get installed on GCE. **Which issue this PR fixes** Fixes: https://github.com/kubernetes/kubernetes/issues/47453 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/6/head
commit
440a85e77f
|
@ -1,4 +1,4 @@
|
||||||
/opt/cni:
|
/home/kubernetes:
|
||||||
file.directory:
|
file.directory:
|
||||||
- user: root
|
- user: root
|
||||||
- group: root
|
- group: root
|
||||||
|
@ -17,21 +17,21 @@ cni-tar:
|
||||||
archive:
|
archive:
|
||||||
- extracted
|
- extracted
|
||||||
- user: root
|
- user: root
|
||||||
- name: /opt/cni
|
- name: /home/kubernetes
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
- source: https://storage.googleapis.com/kubernetes-release/network-plugins/cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz
|
- source: https://storage.googleapis.com/kubernetes-release/network-plugins/cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz
|
||||||
- tar_options: v
|
- tar_options: v
|
||||||
- source_hash: md5=afbb526e7d976f98353ac96f73043031
|
- source_hash: md5=afbb526e7d976f98353ac96f73043031
|
||||||
- archive_format: tar
|
- archive_format: tar
|
||||||
- if_missing: /opt/cni/bin
|
- if_missing: /home/kubernetes/bin
|
||||||
|
|
||||||
{% if grains['cloud'] is defined and grains.cloud in [ 'vagrant' ] %}
|
{% if grains['cloud'] is defined and grains.cloud in [ 'vagrant' ] %}
|
||||||
# Install local CNI network plugins in a Vagrant environment
|
# Install local CNI network plugins in a Vagrant environment
|
||||||
cmd-local-cni-plugins:
|
cmd-local-cni-plugins:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: |
|
- name: |
|
||||||
cp -v /vagrant/cluster/network-plugins/cni/bin/* /opt/cni/bin/.
|
cp -v /vagrant/cluster/network-plugins/cni/bin/* /home/kubernetes/bin/.
|
||||||
chmod +x /opt/cni/bin/*
|
chmod +x /home/kubernetes/bin/*
|
||||||
cmd-local-cni-config:
|
cmd-local-cni-config:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: |
|
- name: |
|
||||||
|
|
|
@ -135,11 +135,11 @@
|
||||||
{% if pillar.get('network_provider', '').lower() == 'opencontrail' %}
|
{% if pillar.get('network_provider', '').lower() == 'opencontrail' %}
|
||||||
{% set network_plugin = "--network-plugin=opencontrail" %}
|
{% set network_plugin = "--network-plugin=opencontrail" %}
|
||||||
{% elif pillar.get('network_provider', '').lower() == 'cni' %}
|
{% elif pillar.get('network_provider', '').lower() == 'cni' %}
|
||||||
{% set network_plugin = "--network-plugin=cni --cni-bin-dir=/etc/cni/net.d/" %}
|
{% set network_plugin = "--network-plugin=cni --cni-conf-dir=/etc/cni/net.d/ --cni-bin-dir=/home/kubernetes/bin/" %}
|
||||||
{%elif pillar.get('network_policy_provider', '').lower() == 'calico' and grains['roles'][0] != 'kubernetes-master' -%}
|
{% elif pillar.get('network_policy_provider', '').lower() == 'calico' and grains['roles'][0] != 'kubernetes-master' %}
|
||||||
{% set network_plugin = "--network-plugin=cni --cni-conf-dir=/etc/cni/net.d/ --cni-bin-dir=/home/kubernetes/bin/" %}
|
{% set network_plugin = "--network-plugin=cni --cni-conf-dir=/etc/cni/net.d/ --cni-bin-dir=/home/kubernetes/bin/" %}
|
||||||
{% elif pillar.get('network_provider', '').lower() == 'kubenet' %}
|
{% elif pillar.get('network_provider', '').lower() == 'kubenet' %}
|
||||||
{% set network_plugin = "--network-plugin=kubenet" -%}
|
{% set network_plugin = "--network-plugin=kubenet --network-plugin-dir=/home/kubernetes/bin/" -%}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
# Don't pipe the --hairpin-mode flag by default. This allows the kubelet to pick
|
# Don't pipe the --hairpin-mode flag by default. This allows the kubelet to pick
|
||||||
|
|
Loading…
Reference in New Issue