Commit Graph

427 Commits

Author SHA1 Message Date
Jake Yip 37e5864def Remove calico_kube_controllers_tag label
This has not been in-use since Change
I902009c792125c55313b1d512f531f613b424af5

Change-Id: Ie5ca9892baad3c5a00ab16ef00d358f637a257df
2024-03-07 20:13:02 +11:00
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
Jakub Darmach b6e2aa8af7 Move Helm client install to separate script
To deploy Calico with Tigera Operator helm charts it was necessary
to move Helm client install to separate script for earlier execution.

Change-Id: Iab738b4120c0ac823b247b04f0cd750de0147779
2024-02-29 14:41:37 +00:00
Jakub Darmach e3aaa89376 Removing Tiller support
Removed Tiller support from Helm modules install kubernetes fragment.

Change-Id: I81db0055ae82c64218498ae3e2a4fcc802f8d0e4
2024-02-29 14:41:29 +00:00
Jake Yip a41c884463 Update cloud-provider-openstack registry
cloud-provider-openstack has changed their image repo. To use the
plugins matching later versions of k8s, this needs to be updated.

Also update tags for CI test to match version being tested.

[1] https://github.com/kubernetes/cloud-provider-openstack/pull/2169

Change-Id: I9390db5e1aa357c17a39a7c208d837befafd3820
2024-02-28 18:57:55 +11:00
Jakub Darmach fde7f8e73a Removing legacy calico v3.3
Removed legacy Calico v3.3 manifest and conditional.
 -

Change-Id: Ica52a670452e65c5ae012012895080c9c8d9abf7
2024-02-27 07:15:21 +00:00
Zuul fd76e86a57 Merge "Update chart.metadata.version to reflect breaking change in helm v3.5.2" 2024-01-26 02:36:48 +00:00
Dale Smith dc2b3724f5 Support k8s 1.27: Remove unsupported kubelet arg
This argument has been defined for containerd clusters in Magnum, and is set to
the default (and only valid) value of 'remote'.

Kubelet warning in 1.26:
  * Flag --container-runtime has been deprecated, will be removed in 1.27 as the only valid value is 'remote'
Kubelet error in 1.27:
  * E0801 03:10:26.723998    8889 run.go:74] "command failed" err="failed to parse kubelet flag: unknown flag: --container-runtime"

Change-Id: I072fab1342593941414b86e28b8a76edf2b19a6f
2024-01-02 06:44:13 +00:00
okozachenko1203 9ece9da95a Update chart.metadata.version to reflect breaking change in helm v3.5.2
https: //github.com/helm/helm/issues/9342
Change-Id: I1dbe7b0b85380e713ebb5dcdd7ecbfc6a438b852
2023-09-20 11:27:53 +00:00
ricolin eca79453c0 Fix Trust token scope for drivers
This fix driver token scope to make sure we use correct token
scope from Trust.

Change-Id: If5b31951959c7a141dc1cae5fefcabe4ebf438b3
2023-07-25 17:00:40 +08:00
Michal Nasiadka b578bd8a78 cinder-csi: Run controllerplugin in CNI network
Currently one cinder-csi-nodeplugin pod is always in Pending state,
because the nodeplugin and controllerplugin deployments share the
same TCP port.

Adapt the manifest to upstream cinder-csi manifest, and run
controllerplugin in CNI network and nodeplugin in host networking.

Change-Id: Idbec5e8e64096a1e1a932da79e656f97f8db1144
2023-05-30 07:36:40 +00:00
Zuul 392120ab13 Merge "Remove PodSecurityPolicy" 2023-05-10 13:56:04 +00:00
Zuul 2c193622de Merge "Fix pods unable to send traffic to ClusterIP" 2023-05-10 10:52:51 +00:00
Zuul 034c1e5491 Merge "Support k8s 1.25 in Calico Manifest" 2023-05-10 10:52:49 +00:00
Jake Yip 1b1c2122f0 Remove PodSecurityPolicy
PodSecurityPolicy has been removed in Kubernetes v1.25 [1]. To allow Magnum
to support Kubernetes v1.25 and above, PodSecurityPolicy Admission
Controller has has been removed.

[1] https://kubernetes.io/docs/concepts/security/pod-security-policy/

Change-Id: I0fb0c372b484275b0677114193289469ee788b84
2023-04-26 20:33:44 +10:00
Jake Yip ae7a50e2af Fix pods unable to send traffic to ClusterIP
Flannel with VXLAN suffers from a bug[1] where pods on the same node are
unable to send traffic to a service's ClusterIP when the endpoint is on
the same node.

This is due to improper NATTing of the return traffic.

The fix is to load the br_netfilter module as specified in the
kubernetes doc.[2]

[1] https://github.com/flannel-io/flannel/issues/1702
[2] https://kubernetes.io/docs/setup/production-environment/container-runtimes/#forwarding-ipv4-and-letting-iptables-see-bridged-traffic

Change-Id: Ic182bba9d480421c2cb581558ebde8dfb20421c8
2023-03-29 19:27:17 +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
Dale Smith 16baf85716 Support k8s 1.26: remove logtostderr
klog args have been removed from kubernetes in 1.26, and
deprecated since 1.23. https://github.com/kubernetes/kubernetes/pull/112120

The argument --logtostderr has defaulted to true for a long time, so
this removal on older versions should have no impact.

Change-Id: I64f934a9bbc39c5e054d8a83b3f6edee061469e6
2023-02-13 23:12:26 +00:00
Dale Smith 5061dc5bb5 Fix kubelet for Fedora CoreOS 36 to provide real resolvconf to containers.
In Fedora CoreOS 36 CoreDNS cannot start correctly due to a loopback issue
where /etc/resolv.conf is mounted and points to localhost.

Tested on Fedora CoreOS 35,36,37, with Docker and containerd.

https://coredns.io/plugins/loop/#troubleshooting-loops-in-kubernetes-clusters
https://fedoraproject.org/wiki/Changes/systemd-resolved#Detailed_Description

Story: 2010519
Depends-On: I3242b718e32c92942ac471bc7e182a42e803005b

Change-Id: I8106324ce71d6c22fa99e1a84b5a09743315811a
2023-02-05 09:01:56 +00:00
Jakub Darmach fbfd3ce9a3 Containerd cni plugin path in CoreOS 35
Task: 45387
Story: 2010041

In Fedora CoreOS 35 default containerd cni bin_dir is set to
/usr/libexec/cni. Since we're installing our own in /opt/cni/bin need to
override in containerd config.toml otherwise pods get stuck in
ContainerCreating state looking for for ex. calico in wrong path.

Change-Id: I3242b718e32c92942ac471bc7e182a42e803005b
2023-02-04 13:05:01 +00:00
Zuul b5918de996 Merge "Fix pods stuck terminating." 2022-11-09 11:32:39 +00:00
Travis Holton e4e0843ed1 Remove stdout argument from coredns log
According to the documentation the first argument to log is either a
domain or a '.' (dot). The current setting of 'log stdout' appears to
blackhole query logs. The default output of log is stdout so the
argument would not be necessary.

Removing `stdout` allows coredns to send query logs to stdout.

Reference: https://coredns.io/plugins/log/

Change-Id: I7837015c37eb58ba43ff42cc8b647c717fa1c650
2022-10-26 16:31:03 +13:00
Dale Smith b318560b59 Fix pods stuck terminating.
If the kubelet container is restarted on a host (during upgrades, or manually)
the bind mounts duplicate into /rootfs and kubelet cannot unmount these.

This leads to stuck terminating pods that must be resolved with either --force
or restart of kubelet container.

Adding 'rslave' means that when the kubelet unmounts volumes at /var/lib/kubelet/pods
this propogates to the host (using 'rshared'), and back into the container in /rootfs.

This bug was likely introduced when mounting of /rootfs was added[0].

[0] 1994e9448a

Change-Id: I44f80ccc97c0eeab98f1edbe4a22763732b7f4da
2022-10-26 00:09:48 +00:00
Zuul 0748588e79 Merge "Support K8s 1.24+" 2022-09-26 17:11:03 +00:00
Michal Nasiadka ac5702c406 Adapt Cinder CSI to upstream manifest
- Bump also components to upstream manifest versions.
- Add small tool to sync Cinder CSI manifests automatically

Change-Id: Icd19b41d03b7aa200965a3357a8ddf8b4b40794a
2022-09-26 13:28:37 +00:00
Daniel Meyerholt f7cd2928d6 Support K8s 1.24+
Only specify dockershim options when container runtime is not containerd.
Those options were ignored in the past when using containerd but since 1.24
kubelet refuses to start.

Task: 45282
Story: 2010028

Signed-off-by: Daniel Meyerholt <dxm523@gmail.com>
Change-Id: Ib44cc30285c8bd4219d4a45dc956696505ddd570
2022-05-28 13:32:51 +02:00
Michal Nasiadka 5af49aa2fa Add support for choosing Octavia provider
Story: 2008805

Add support for:
* choosing Octavia provider
* setting octavia_lb_algorithm
* disabling Octavia healthcheck

Change-Id: I2d424fc2e2f8967e4b3007faedbc089f37126968
2022-05-03 09:32:24 +00:00
Daniel Meyerholt 1da5a52b47 CoreDNS support EndpointSlices
In order to properly support EndpointSlices, enhance ClusterRole.

story: 2009874
task: 44582
Signed-off-by: Daniel Meyerholt <dxm523@gmail.com>
Change-Id: Ib9d81e8d215bb50cb0d80b954949012cbbf45a5c
2022-02-23 13:59:45 +01:00
Spyros c1c9942f8b fcos-k8s: Update to v1.22
* change rbac.authorization.k8s.io/v1beta1 to v1
  * update metrics-server
* change storage.k8s.io/v1beta1 to v1
* drop kubelet-https
* update to FCOS 35

story: 2009828
task: 44416

Signed-off-by: Spyros <strigazi@gmail.com>
Change-Id: I24b89366a4a8e8bc4c90f6a85ef6de2ac77dae1d
2022-02-03 13:59:32 +00:00
Zuul 91024195a5 Merge "Upgrade to calico_tag=v3.21.2" 2022-02-03 13:55:51 +00:00
Zuul 891abc9bff Merge "Fix kubelet on FCOS 34" 2022-02-03 09:36:32 +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
Zuul fa298eeab1 Merge "Add resource requests for system components" 2021-11-26 13:17:20 +00:00
Zuul 7b1dfaa189 Merge "Disable and stop docker when the CRI is containerd" 2021-11-26 10:48:02 +00:00
Thomas George Hartland 04477b13f8 Add resource requests for system components
Set resource requests for system pods to
guarantee at least some amount of resources.
This prevents them from being starved of
CPU/memory when running alongside resource
intensive workloads in the cluster and
gives them a higher quality of service class.

metrics-server:
  100m/200Mi recommended for up to 100 node clusters.
  https://github.com/kubernetes-sigs/metrics-server#scaling

openstack-cloud-controller-manager:
  200m CPU taken from example manifests.

kubernetes-dashboard:
  100m/100Mi taken from helm chart defaults.
  heapster:
    100m/128Mi taken from helm chart defaults.
  influxdb:
    100m/256Mi taken from influx helm chart defaults.
  grafana (for influxdb):
    100m/200Mi same as monitoring grafana.

ingress-traefik:
  100m/50Mi taken from helm chart defaults.

cluster-autoscaler:
  100m/300Mi taken from helm chart defaults.

csi-cinder-nodeplugin:
  25m CPU on both containers to ensure
  Burstable QoS class.

csi-cinder-controllerplugin:
  20m CPU on all containers to ensure
  Burstable QoS class.

tiller-deploy:
  25m CPU to ensure it can always handle
  the readiness probe.

octavia-ingress-controller:
  50m CPU, just a guess really.

Story: 2008825
Task: 42290
Change-Id: Ifcd764c00d7046744ba63609078cc6c5d02fdc1c
2021-11-26 09:52:45 +00:00
Jake Yip 679a174a0a Refix --registry-enabled
This fixes an issue with --registry-enabled that was previously fixed [1] but
somehow dropped after a refactoring [2]

[1] Change Ib93a7c0f761d047da3408703a5cf4208821acb33
[2] Change Ibbed59bc135969174a20e5243ff8464908801a23

Task: 41306
Story: 2008383
Change-Id: I76fedd34edec55f5a906a96672529ed15775f5da
2021-11-25 12:41:18 +00:00
Thomas George Hartland 476c90d700 Disable and stop docker when the CRI is containerd
Previously the docker service was disabled but kept running.
And if stopped, would be restarted by the docker socket.

Docker can be fully disabled and stopped when using containerd.

Change-Id: Ic3529106806f90dcafc24006c6c0dbc30e33766b
2021-09-10 14:08:26 +02:00
Zuul 6951ac4fc6 Merge "Add toleration to CSI nodeplugin" 2021-09-06 20:51:57 +00:00
Zuul c224bb1064 Merge "[k8s] Fix CA rotate" 2021-09-06 20:32:53 +00:00
Bharat Kunwar 68e6c0e48d [fix] Detect virtio-scsi volumes correctly
When the Cinder volume is presented as a virtio-scsi volume, the
device_name detection fails. This change allows the device name to be
retrieved correctly for both virtio-pci and virtio-scsi cases.

Story: 2008618
Task: 41808
Change-Id: Ia6a848eae11bc38ff71ef4575247010a8ffaa47b
2021-08-10 06:57:30 +00:00
Feilong Wang cdbe26c452 [k8s] Fix CA rotate
Using admin.conf as the kubeconfig to get correct permissions
to run kubectl command to update pods to use the new CA certs.
Besides, now we need to create client certs on master nodes
as well.

Story:2008858
Task: 42379

Change-Id: I4996060dd18ef3c448d4b225caec53bf0ae0ba75
2021-08-03 18:26:43 +00:00
Bartosz Bezak 12766eaff8 Add cloud-provider flag to openstack cloud control manager
Recent OpenStack Cloud Control Manager (occm) fails without
cloud-provider flag, starting v1.21.0 onwards --cloud-provider cannot be
empty Error: --cloud-provider cannot be empty

Additionally, add create role for serviceaccounts/token resource [1].

[1] 7d844dac9d/manifests/controller-manager/cloud-controller-manager-roles.yaml (L52-L57)

Story: 2009023
Task: 42745
Change-Id: I55042665c25704cd65eb4e4883f8a796bdcdaa7f
2021-08-03 13:51:55 +00:00
Feilong Wang fe75ca3459 Fix kubelet on FCOS 34
Fedora CoreOS 34 has switched from cgroups v1 to
cgroups v2 by default, which changes the sysfs hierarchy.

Task: 42809
Story: 2009045

Change-Id: I2f9651421370ba44e2f0ddc7bb6526745b62ad40
2021-07-12 11:09:28 +00:00
Daniel Meyerholt d8cc88284b Fix CoreDNS 1.7.0 and above
Starting from CoreDNS 1.7.0 the upstream option is not valid anymore
and CoreDNS does not start when it is set. It has been effectively a
noop since 1.5.2.

Task: 42765
Story: 2009030
Change-Id: I4e8029a4cd5e89d7173758fa1dc2e718895fdbe7
2021-07-04 15:05:35 +02:00
Zuul 042d2ad144 Merge "Update traefik options" 2021-04-27 11:01:11 +00:00
Zuul bfffeca927 Merge "Revert "[K8S] Enable --use-service-account-credentials"" 2021-04-19 09:28:15 +00:00
Bharat Kunwar ec0927242e Revert "[K8S] Enable --use-service-account-credentials"
This reverts commit e9b4889670.

Reason for revert: breaks cluster deployment

Change-Id: Ifefc3715acf8a87bf75c1d1aa0297db6b8333431
2021-04-16 13:05:38 +00:00
Zuul c07628bca6 Merge "Support hyperkube_prefix label" 2021-04-07 19:09:49 +00:00
Zuul 4ce323f760 Merge "Add separated CA cert for etcd and front-proxy" 2021-04-07 12:35:10 +00:00
Feilong Wang 16344a5a95 Add separated CA cert for etcd and front-proxy
Support creating different for k8s, etcd and front-proxy for
security hardening. We're following some best practices[1][2] but
adjusted based on the current Magnum deployment approach.

[1] https://kubernetes.io/docs/setup/best-practices/certificates/
[2] https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/

Task: 40687
Story: 2008031

Change-Id: I523a4a85867f82d234ba1f3e6fad8b8cd2291182
2021-04-01 17:31:34 +00:00