Skip to content

Commit 90eb360

Browse files
committed
Fix calico-tigera installation problems
Update network preinstall and provider target URLs Use kubectl create to avoid metadata length limitations
1 parent 8e90573 commit 90eb360

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The above parameters are:
6363
* `VERSION`: The version of Kubernetes to deploy. Must follow X.Y.Z format. ([Check kubeadm regex rule](https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/util/version.go#L43) for more information)
6464
* `CONTAINER_RUNTIME`: The container runtime Kubernetes uses. Set this value to `docker` (officially supported) or `cri_containerd`. Advanced Kubernetes users can use `cri_containerd`, however this requires an increased understanding of Kubernetes, specifically when running applications in a HA cluster. To run a HA cluster and access your applications, an external load balancer is required in front of your cluster. Setting this up is beyond the scope of this module. For more information, see the Kubernetes [documentation](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/).
6565
* `CNI_PROVIDER`: The CNI network to install. Set this value to `weave`, `flannel`, `calico` or `cilium`.
66-
* `CNI_PROVIDER_VERSION` The CNI version to use. `calico` and `cilium` uses this variable to reference the correct deployment file. Current version `cilium` is `1.4.3`, calico is `3.18`
66+
* `CNI_PROVIDER_VERSION` The CNI version to use. `calico`, `calico-tigera`, and `cilium` providers use this variable to reference the correct deployment file. Current version `cilium` is `1.4.3`, calico is `3.18`, calico-tigera is `3.26.0`
6767
* `ETCD_INITIAL_CLUSTER`: The server hostnames and IPs in the form of `hostname:ip`. When in production, include three, five, or seven nodes for etcd.
6868
* `ETCD_IP`: The IP each etcd member listens on. We recommend passing the fact for the interface to be used by the cluster.
6969
* `KUBE_API_ADVERTISE_ADDRESS`: The IP each etcd/apiserver instance uses on each controller. We recommend passing the fact for the interface to be used by the cluster.

manifests/kube_addons.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
'calico-tigera': {
8080
if $cni_network_preinstall {
8181
exec { 'Install cni network (preinstall)':
82-
command => ['kubectl', 'apply', '-f', $cni_network_preinstall],
82+
command => ['kubectl', 'create', '-f', $cni_network_preinstall],
8383
onlyif => $exec_onlyif,
8484
unless => 'kubectl -n tigera-operator get deployments | egrep "^tigera-operator"',
8585
environment => $env,
@@ -110,7 +110,7 @@
110110
}
111111
'flannel': {
112112
exec { 'Install cni network provider':
113-
command => ['kubectl', 'apply', '-f', $cni_network_provider],
113+
command => ['kubectl', 'create', '-f', $cni_network_provider],
114114
onlyif => $exec_onlyif,
115115
unless => 'kubectl -n kube-flannel get daemonset | egrep "^kube-flannel"',
116116
environment => $env,

tooling/kube_tool.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def self.parse_args
1515
o.string '-v', '--version', 'The Kubernetes version to install', default: ENV.fetch('VERSION', nil)
1616
o.string '-r', '--container_runtime', 'The container runtime to use. This can only be "docker" or "cri_containerd"', default: ENV.fetch('CONTAINER_RUNTIME', nil)
1717
o.string '-c', '--cni_provider', 'The networking provider to use, flannel, weave, calico, calico-tigera or cilium are supported', default: ENV.fetch('CNI_PROVIDER', nil)
18-
o.string '-p', '--cni_provider_version', 'The networking provider version to use, calico and cilium will use this to reference the correct deployment download link',
18+
o.string '-p', '--cni_provider_version', 'The networking provider version to use, calico, calico-tigera, and cilium will use this to reference the correct deployment download link',
1919
default: ENV.fetch('CNI_PROVIDER_VERSION', nil)
2020
o.string '-t', '--etcd_ip', 'The IP address etcd will listen on', default: ENV.fetch('ETCD_IP', nil)
2121
o.string '-i', '--etcd_initial_cluster', 'The list of servers in the etcd cluster', default: ENV.fetch('ETCD_INITIAL_CLUSTER', nil)

tooling/kube_tool/other_params.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def self.create(opts)
3030
cni_network_provider = "https://docs.projectcalico.org/archive/v#{opts[:cni_provider_version]}/manifests/calico.yaml"
3131
cni_pod_cidr = '192.168.0.0/16'
3232
when 'calico-tigera'
33-
cni_network_preinstall = 'https://docs.projectcalico.org/manifests/tigera-operator.yaml'
34-
cni_network_provider = 'https://docs.projectcalico.org/manifests/custom-resources.yaml'
33+
cni_network_preinstall = "https://raw.githubusercontent.com/projectcalico/calico/v#{opts[:cni_provider_version]}/manifests/tigera-operator.yaml"
34+
cni_network_provider = "https://raw.githubusercontent.com/projectcalico/calico/v#{opts[:cni_provider_version]}/manifests/custom-resources.yaml"
3535
cni_pod_cidr = '192.168.0.0/16'
3636
when 'cilium'
3737
cni_pod_cidr = '10.244.0.0/16'

0 commit comments

Comments
 (0)