Commit Graph

18 Commits

Author SHA1 Message Date
Dale Smith 0fdec72128 Support Calico 3.26.x
* Renames calico script to match the version it was intended for: 3.21.
* Match calico_tag 3.26.* with the new manifest. All other versions will
  continue to use manifest intended for 3.21.*
* Calico manifest for 3.26[1] is tested for K8s versions v1.24 through v1.28[2].

[1] https://raw.githubusercontent.com/projectcalico/calico/v3.26.4/manifests/calico.yaml
[2] https://docs.tigera.io/calico/3.26/getting-started/kubernetes/requirements

Change-Id: I548e831c13be9b732303c945b2a7ba97a245b0df
2024-03-07 00:14:47 +11:00
Dale Smith 5abcab4efd Support k8s 1.25 in Calico Manifest
PodDisruptionBudget is `policy/v1` since 1.21.

https://github.com/projectcalico/calico/issues/4570

Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
2023-03-20 20:13:19 +00:00
Grzegorz Bialas 9643abc9ae Upgrade to calico_tag=v3.21.2
Additionally, use fixed subnet CIDR for IP_AUTODETECTION_METHOD
supported from v3.16.x onwards.

Story: 2007256
Task: 42017

Change-Id: Iaa25cd5054cec5482f01d90e2cd150bcd9700dbe
2022-01-21 08:50:15 +00:00
Spyros Trigazis 1b72456e12 k8s: Do not use insecure api port
* in 1.20 8080 is not supported anymore
** use only 6443
** change all probes for health to use kubectl and 6443
* configure the signing key in API

story: 2008524
task: 41731

Change-Id: Ibaf1840214016d2dd6ac15e2137eb3cd3d767889
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2021-02-02 09:10:25 +00:00
Diogo Guerra 9adfc44309 Fix misquoted comment
Seen while validating release, in the heat container agent journal:

```
/var/lib/heat-config/heat-config-script/0c399610-30a6-4728-80f2-702b0630400f:
    line 776: --cluster-cidr: command not found
error: expected 'logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER]'.
```

Task: 41231
Story: 2008330
Change-Id: I3fdd186b73950b4b3e5790752eaafc47ff7da8f3
2020-11-09 10:57:53 +01:00
Bharat Kunwar 799563eb61 Remove shebang from scripts
Without this, heat container agents using  kubectl version
1.18.x (e.g. ussuri-dev) fail because they do not have the correct
KUBECONFIG in the environment.

Task: 39938
Story: 2007591

Change-Id: Ifc212478ae09c658adeb6ba4c8e8afc8943e3977
2020-06-16 20:53:07 +00:00
Feilong Wang 4439295aba [k8s] Upgrade calico to the latest stable version
Calico version is upgraded from v3.3.6 to v3.13.1.

Task: 38616
Story: 2007256

Change-Id: If48fdf492e2f63dc8d30fa0d3bebfb4f16674652
2020-04-01 11:39:26 +13:00
Spyros Trigazis 3667164367 calico: Add node/status in ClusterRole
The upstream docs [0] were missing a parameters
for the calico-node ClusterRole.

Without it we get:
2020-02-21 11:41:35.762 [ERROR][8]
...
User "system:serviceaccount:kube-system:calico-node"
cannot patch resource "nodes/status" in API group ""
at the cluster scope

[0] https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml

Needs to be backported to train.

story: 2005318
task: 39041

Change-Id: Ib7d3068ee53c08fea32a69c997b6de6477a17f0a
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
2020-03-12 10:05:39 +00:00
Bharat Kunwar 4eeb70473b bug: Double quote CALICO_IPV4POOL_IPIP value
Without this, calico pods fail to start.

Change-Id: Id512ade4df0e5c2095d70bd4025266e01743b3c2
Task: 38604
Story: 2007250
2020-02-13 16:54:45 +00:00
Diogo Guerra 355c71924b Add calico_ipv4pool_ipip label
IPIP Mode to use for the IPv4 POOL created at start up
allowed_values: ["Always", "CrossSubnet", "Never", "Off"]
default: "Off"

Change-Id: Ib834a1f86a6db408047cc8f86fc7744d16d83904
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
2020-01-09 14:22:23 +01:00
Ricardo Rocha 23c85bf040 Drop deprecated APIs for kube v1.16 support
Kubernetes v1.16 is dropping support for beta extensions/apps APIs for
Deployment, DaemonSet and ReplicaSet - as described in:
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.15.md#deprecations-and-removals

Replace all occurrences with apps/v1.

Change-Id: Ib1d8b7672318538be7f0066832add29f7d066b92
Story: 2006459
Task: 36385
2019-10-01 17:49:23 +02:00
Spyros Trigazis 7267c1ea43 k8s_fedora_atomic: Add PodSecurityPolicy
For moving to 1.15.x and beyond we need to have PSP for privileged pods.
flannel, calico and node-problem-detector need it.

PSP
story: 2006515
task: 36513

Allow-priv
story: 2006252
task: 35867

Change-Id: I306a249afb275fdbd71354ed75043ffc4d466304
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2019-09-11 08:38:42 +00:00
Spyros Trigazis 9774e990e4 Update calico to v3.3
Upstream manifests:
https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml
https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml

story: 2005318
task: 30495

Change-Id: I902009c792125c55313b1d512f531f613b424af5
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2019-06-07 10:56:20 +02:00
Lingxian Kong cae7fa21b6 [k8s] Cluster creation speedup
- Start workers as soon as the master VM is created, rather than
  waiting all the services ready.
- Move all the SoftwareDeployment outside of kubemaster stack.
- Tweak the scripts in SoftwareDeployment so that they can be combined
  into a single script.

Story: 2004573
Task: 28347
Change-Id: Ie48861253615c8f60b34a2c1e9ad6b91d3ae685e
Co-Authored-By: Lingxian Kong <anlin.kong@gmail.com>
2018-12-15 11:59:57 +00:00
Feilong Wang f6d1c0de46 Fix etcd race condition issue
Currently, Magnum is using k8s API /version to check the API
availibility which is not a good way because /version only
reflects if the basic k8s api is working on not. And it will
return response even the etcd service is down. This patch fixes
it by using /healthz to replace /version.

Task: 22566
Story: 1775759

Change-Id: I45a1bd48a22842a251dafa6c349f0022fd319e3f
2018-07-11 15:57:56 +12:00
Feilong Wang 3c72d7b88b Fix race condition issue for k8s multi masters
When creating a multi-master cluster, all master nodes will attempt to
create kubernetes resources in the cluster at this same time, like
coredns, the dashboard, calico etc. This race conditon shouldn't be
a problem when doing declarative calls instead of imperative (kubectl
apply instead of create). However, due to [1], kubectl fails to apply
the changes and the deployemnt scripts fail causing cluster to creation
to fail in the case of Heat SoftwareDeployments. This patch passes the
ResourceGroup index of every master so that resource creation will be
attempted only from the first master node.

[1] https://github.com/kubernetes/kubernetes/issues/44165

Task: 21673
Story: 1775759

Change-Id: I83f78022481aeef945334c37ac6c812bba9791fd
2018-06-14 09:16:32 +12:00
Feilong Wang 79c002ce7a Add calico-node on k8s master node
By current design, pods under kube-system will run on minion nodes. And
given now we're not running kubelet on master node, so calico-node is
not running on k8s master node. As a result, kubectl proxy is not
working to access dashboard. And it's confirmed with calico team that
the calico-node container must be running on master node if user want
to use kubectl proxy, see [1]. So, the solution is enabling kubelet
on master but disallow the other pods scheduled on master with
taint/tolerations.

Besides, this patch includes another fix about running calico on
Fedora Atomic. Because Fedora Atomic is using NetworkManager, it
manipulates the routing table for interfaces in the default network
namespace where Calico veth pairs are anchored for connections to
containers. This can interfere with the Calico agent’s ability to
route correctly. Please see more information about this at [2].

[1] https://docs.projectcalico.org/v3.0/getting-started/kubernetes/
    installation/integration#about-the-calico-components
[2] https://docs.projectcalico.org/master/usage/troubleshooting/
    #configure-networkmanager

Closes-Bug: #1751978

Change-Id: Iacd964806a28b3ca6ba3e037c60060f0957d44aa
2018-04-20 16:11:48 +12:00
Feilong Wang 838b8daf6e Support calico as network driver
Adding calico as Kubernetes network driver to support network
policy of Kubernetes. Network policy is a very important feature
for k8s production use. See more information about k8s network
policy at [1] and [2], as for calico please refer [3] and [4].

[1] https://kubernetes.io/docs/concepts/services-networking/network-policies/
[2] http://blog.kubernetes.io/2017/10/enforcing-network-policies-in-kubernetes.html
[3] https://www.projectcalico.org/calico-network-policy-comes-to-kubernetes/
[4] https://cloudplatform.googleblog.com/2017/09/network-policy-support-for-kubernetes-with-calico.html

Closes-Bug: #1746379

Change-Id: I135a46cd32a67d73d8e64ac5bbc4debfae6c4568
2018-02-21 14:47:54 +13:00