|
40 | 40 |
|
41 | 41 | it {
|
42 | 42 | expect(subject).to contain_exec('Install cni network provider').with({
|
43 |
| - command: ['kubectl', 'apply', '-f', 'https://foo.test'], |
| 43 | + command: ['kubectl', 'create', '-f', 'https://foo.test'], |
44 | 44 | onlyif: ['kubectl get nodes']
|
45 | 45 | })
|
46 | 46 | }
|
|
73 | 73 | when 'calico-tigera'
|
74 | 74 | it {
|
75 | 75 | expect(subject).to contain_exec('Install cni network (preinstall)').with({
|
76 |
| - command: ['kubectl', 'apply', '-f', 'https://foo.test/tigera-operator'], |
| 76 | + command: ['kubectl', 'create', '-f', 'https://foo.test/tigera-operator'], |
77 | 77 | onlyif: 'kubectl get nodes'
|
78 | 78 | })
|
79 | 79 | }
|
|
86 | 86 | expect(subject).to contain_exec('Install cni network provider').with(
|
87 | 87 | {
|
88 | 88 | onlyif: ['kubectl get nodes'],
|
89 |
| - command: ['kubectl', 'apply', '-f', "https://#{provider}.test"], |
| 89 | + command: ['kubectl', 'create', '-f', "https://#{provider}.test"], |
90 | 90 | unless: ['kubectl -n kube-flannel get daemonset | egrep "^kube-flannel"']
|
91 | 91 | },
|
92 | 92 | )
|
|
95 | 95 | it {
|
96 | 96 | expect(subject).to contain_exec('Install cni network provider').with({
|
97 | 97 | onlyif: ['kubectl get nodes'],
|
98 |
| - command: ['kubectl', 'apply', '-f', "https://#{provider}.test"], |
| 98 | + command: ['kubectl', 'create', '-f', "https://#{provider}.test"], |
99 | 99 | unless: ['kubectl -n kube-system get daemonset | egrep "(flannel|weave|calico-node|cilium)"']
|
100 | 100 | })
|
101 | 101 | }
|
|
0 commit comments