Commit Graph

435 Commits

Author SHA1 Message Date
Ayumu Ueha 0c1fe5fd3c Change k8s package repository
Closes-Bug: #2055979
Change-Id: Ib43164901cbc23038eff7c2b110078555d5e4ba3
2024-03-05 13:03:19 +00:00
Ashutosh Mishra 88b47f30d4 Kubeadm installation for CentOs.
Kubernetes repo added for CentOs and installed kubeadm using yum.

Closes-Bug: #2041844
Change-Id: I08e591d616ebea772bd8d87b3c8ab194bce7fb5b
2023-11-01 12:56:19 +00:00
Roman Dobosz eae38b9559 Bump kubernetes version to 1.28
Change-Id: I921b165092c9bf81d7223933c508eda6c9eae935
Depends-On: https://review.opendev.org/c/openstack/kuryr-kubernetes/+/896008
2023-10-11 12:19:30 +02:00
Zuul 4993c7a4b2 Merge "Bump kubernetes to version 1.27." 2023-08-03 13:58:11 +00:00
Roman Dobosz cf560896e3 Cleanup hyperkube leftovers.
We've switched to the kubernetes binaries from kubernetes project itself
a while ago. There are still some of the mentions in the sample
local.conf about it and a wrapper shell script for the kubectl. In this
commit it will be removed.

Change-Id: Id2ea00db502a9a77c7686c1f2c60637f37bd72df
2023-07-24 13:45:58 +02:00
Roman Dobosz fa62887fe1 Bump kubernetes to version 1.27.
Change-Id: I7876322b48ca28edf54629dc27551c2dd00f921b
2023-07-24 11:14:17 +02:00
Ayumu Ueha 430ae62e4f Bump Kubernetes and cri-o version to 1.26
Change-Id: I477f1bb1fefd211b4f5e43ec4182967c89d0f106
2023-07-14 11:48:26 +00:00
Roman Dobosz 8aaa92c6df Added devstack option to turn on pod security on tempest.
Change-Id: I037eb8122b768ac986b3d9b66212bb03a680f529
2023-03-21 06:58:48 +01:00
Roman Dobosz 3f80fc43a3 Use new registry for all the kubernetes images.
Turns out, that all the images has been moved from k8s.gcr.io to
registry.k8s.io, so that there is no need to distinguish between those
two locations for older version of k8s (especially the one which we are
relaying on for docker gate). In this patch we switch over to the
registry.k8s.io for all of the supported kubernetes versions.

To make it work it is also requires to bump kubernetes 1.23 to latest
minor version, otherwise there will be issues with pulling coredns
image.

Change-Id: I7ed0ae76108a409bc72bc61ab7c12164e8277257
Depends-On: https://review.opendev.org/c/openstack/devstack-plugin-container/+/874573
2023-02-21 14:24:09 +01:00
Roman Dobosz 5fb8104abf Bump cri-o version.
We recently bumped Kubernetes version to 1.25.x, but we forgot to do
this on cri-o as well.

Change-Id: If57888d6f48fad904bf4c7cdd5bc6c70233b95be
Depends-On: https://review.opendev.org/c/openstack/devstack-plugin-container/+/866130
2022-12-02 08:56:14 +01:00
Roman Dobosz a874180b94 Bumb Kubernetes version to 1.25
Change-Id: I49d9502db2a83eb52d42289054bb021eb7eaa027
2022-10-24 08:34:24 +02:00
Roman Dobosz 45d8b5fbad Support for kubernetes version >1.24.
Starting from 1.24 kubernetes started to use different registry for it's
images. That results with inability for kuryr to use the newer versions.
In this commit support for both registry is added.

Closes-Bug: #1991757
Change-Id: I3576159e5afbeb788369519fee12788260b0555f
2022-10-19 13:29:06 +02:00
Roman Dobosz d300cb65e6 Pin kubectl to the installed kubernetes version.
During devstack deployment it can happen, that changing desired version
of the kubernetes, kubectl will be intalled with different version. This
patch make sure, that all of the installed kubernetes components are
coherent.

Closes-Bug: #1991773
Change-Id: Ied04e93bbe16e7a40213c35f0c6775bbcbf514ac
2022-10-12 12:12:38 +00:00
Sunday Mgbogu 729449146e Enable listener reconciliation on Master
Change-Id: I133719e46c12a4a91dbc268a075586a3e3ff7f01
2022-08-24 12:29:18 +01:00
Zuul 21f78897b6 Merge "Add tempest test job for annotation project driver" 2022-08-18 12:55:31 +00:00
Michał Dulko 04d4439606 Remove SR-IOV support
This got decided at the PTG. The code is old, not maintained, not tested
and most likely doesn't work anymore. Moreover it gave us a hard
dependency on grpcio and protobuf, which is fairly problematic in Python
and gave us all sorts of headaches.

Change-Id: I0c8c91cdd3e1284e7a3c1e9fe04b4c0fbbde7e45
2022-06-29 12:49:37 +02:00
yangjianfeng 2a35ce7d24 Add tempest test job for annotation project driver
Depends-on: https://review.opendev.org/837812
Implements: blueprint specify-project-by-annotation
Change-Id: I42099ad58785c47c7f9814a227b59608d0e98b8f
2022-06-14 10:19:09 +08:00
Roman Dobosz a38d764ffc Get rid of obsolete KuryrNetPolicy CRD.
There are some of the mentions of KuryrNetPolicy around our code. In
this patch we are removing it (with one exception - the spec for
originally designed CRD for network policy handling), just to avoid
confusion with currently used KuryrNetworkPolicy.

Change-Id: Ie9bb46467a249e1c0ada3a9810c4fff59fd57757
2022-06-10 15:46:31 +02:00
Roman Dobosz 846f158724 Removed all occurrences of removed KuryrNet CRD.
CRD KuryrNet was already replaced by KuryrNetwork, although there are
some spots, where it is mentioned - mostly docs and log messages. In
this commit we get rid of it once and for all.

Change-Id: I20345a1f4d4288534d620f0bd2196fc77ee795e9
2022-06-01 13:10:48 +02:00
Zuul 3f66afa57f Merge "[devstack] Replace healthz with readyz to check kubernetes" 2022-03-07 11:49:52 +00:00
yangjianfeng 8655bb49c8 [devstack] Support config image repository for kubeadm
In some places of which network environment was limited, kubeadm
can't pull images from k8s.gcr.io. This patch add a variable
`KURYR_KUBEADMIN_IMAGE_REPOSITORY` in order to the developer who
located in these places can set the kubeadm to pull container images
from repository that they can access.

Change-Id: Id966747d8c09ea14bb37880f8fb37447591564b5
2022-03-06 17:02:44 +08:00
yangjianfeng 63864d1509 [devstack] Replace healthz with readyz to check kubernetes
The healthz endpoint is deprecated since Kubernetes v1.16. The k8s
docs [1] suggest that use the livez and readyz endpoints to instead.

[1] https://kubernetes.io/docs/reference/using-api/health-checks/

Change-Id: I1211fa3bb4450b9178e13ca5a46255242ee480a2
2022-03-06 13:41:57 +08:00
Michał Dulko fe6f2c8b74 DevStack: Allow kuryr-cni SA to create Events
Permissions to create Events was added to the kuryr-controller
ServiceAccount, but not to the kuryr-cni one. This commit fixes this,
allowing kuryr-daemon to create Events in DevStack.

Change-Id: I59a9de2f6cd3314b1326c43c4c1eefa8e445b9ee
2021-12-23 10:54:52 +01:00
Zuul cf58562dbf Merge "Enable reconciliation only if OVN Octavia is enabled" 2021-12-10 21:52:48 +00:00
Sunday Mgbogu 6836825e99 Enable reconciliation only if OVN Octavia is enabled
This commit is to allow reconciliation to run only if
OVN Octavia is enabled. Using OVN is faster when
creating LoadBalancers

Change-Id: I08f7fe4d9970559f10eaadce35bde082e831968d
2021-12-10 15:46:00 +00:00
Roman Dobosz 96473406d9 Make gates to use CRI-O on devstack by default.
Also, added gate job for docker backed version.

Change-Id: I6e22d5617038e5c20dcbbca2b110d2a312cedbd3
2021-11-17 11:10:41 +01:00
Roman Dobosz b97b120814 Bump kubernetes version.
Change-Id: I869eb4110fa844552db8ff43951240d899099495
2021-11-17 11:10:41 +01:00
Roman Dobosz fb994ecddb Use CRI-O with kubeadm.
Before switch to kubeadm we used to use manual approach for installing
all the bits with option for switching container runtimes between docker
and cri-o. With this patch we re-gain that ability with simply setting
appropriate container engine variable for devstack-plugin-contaier to
use either CRI-O or default Docker.

Depends-On: https://review.opendev.org/c/openstack/devstack-plugin-container/+/817231
Change-Id: I273888a7428611b40802dc5dd53fcee864ce43da
2021-11-17 11:10:22 +01:00
Zuul 84e220d037 Merge "Restrict handling of Namespace events" 2021-11-05 11:32:16 +00:00
Maysa Macedo 32cdda4914 Restrict handling of Namespace events
Ensures Namespaces are only handled when there
is any Pod on Pod Network present on it to avoid
creating Networks and Subnets without really being
used.

Depends-On: https://review.opendev.org/c/openstack/kuryr-tempest-plugin/+/813404

Change-Id: Idbc1e2868c54eb1151d2498a0324731fe099592e
2021-10-29 09:32:33 +00:00
Maysa Macedo 455bafb6a3 Add permission to create events
Updates Controller RBAC to allow creation of events.

Change-Id: Id0378d214e483428f7e3a616f4f6304093ed8b16
2021-10-18 17:45:09 +00:00
Zuul a3a5fa1d00 Merge "Clean up extra spaces" 2021-10-13 05:57:20 +00:00
jayonlau 2e8c3167a5 Clean up extra spaces
Although these errors are not important, they affect the code specification.

Change-Id: I6656db7afbb1dab4b966c62d3765905965ba9142
2021-10-09 02:16:48 +00:00
yue.lg b4bd7312e4 For containerized cni_ds set mountPropagation=HostToContainer to
let containers aware of the host's netns changes

Signed-off-by: yue.lg <yuelg@chinaunicom.cn>
Change-Id: I312817db503002f918276d0ff41baeb816f39404
Closes-Bug: 1945293
2021-10-08 17:57:34 +08:00
Roman Dobosz 2085524f33 Switch gates to OVN by default.
Also, rearrange tests files.

Job hierarchy looks as follows:

- kuryr-kubernetes-base (base tempest job)
  - kuryr-kubernetes-base-ovn (derived from base for neutron OVN)
    - kuryr-kubernetes-tempest-amphora
    - kuryr-kubernetes-octavia-base (ovn-octavia-provider)
      - kuryr-kubernetes-tempest (alias for the parent,
        used in projects kuryr-tempest-plugin and os-vif)
      - kuryr-kubernetes-tempest-ovn-provider-ovn (alias for the parent,
        used in project ovn-octavia-provider)
      - kuryr-kubernetes-tempest-systemd
        - kuryr-kubernetes-tempest-centos-7 (this one is probably
          broken)
      - kuryr-kubernetes-tempest-defaults (default settings for
        kuryr-kubernetes, so OVN + amphora + default set of handlers,
        default subnet and sg drivers)
      - kuryr-kubernetes-tempest-ipv6
      - kuryr-kubernetes-tempest-dual-stack
      - kuryr-kubernetes-tempest-lower-constraints
      - kuryr-kubernetes-tempest-l2
      - kuryr-kubernetes-tempest-pools-namespace
      - kuryr-kubernetes-tempest-crio (currently broken)
      - kuryr-kubernetes-tempest-multinode
        - kuryr-kubernetes-tempest-multinode-ha
  - kuryr-kubernetes-base-ovs (derived from base for neutron OVS)
    - kuryr-kubernetes-octavia-base-ovs (amphora)
      - kuryr-kubernetes-tempest-ipv6-ovs
      - kuryr-kubernetes-tempest-amphora-ovs
      - kuryr-kubernetes-tempest-multinode-ovs
- kuryr-kubernetes-e2e-np (base devstack job)

For convenience, tempest jobs are in two files: one for multinode jobs,
and one for one node jobs. Network policy job is in its own file, since
it have different parent (devstack).

Change-Id: I198f138feb9bd7b6cc659ac8cd788cddd5be9439
2021-09-16 12:23:09 +02:00
Zuul 1a120c23f6 Merge "Enable reconciliation by default" 2021-09-09 14:21:37 +00:00
Sunday Mgbogu df925c3ad4 Enable reconciliation by default
Octavia tempest plugin is required to test for loadbalancer
reconciliation. As a result, there is need to configure the
gate to enable reconciliation by default.

Implements: blueprint reconcile-openstack-resources-with-k8s
Change-Id: Ifab3a4f45da29141d7889bc0f110ace6c5b96eab
2021-09-02 08:54:24 +00:00
Roman Dobosz c56e465c7e Fix multinode gate.
Make separate variations for OVN and OVS networking.

Change-Id: I425e7fe1d220b5f760bd5514c853d3e377190d82
2021-07-30 07:57:26 +02:00
Roman Dobosz a707cc1f71 Fixes for latest changes on Neutron devstack.
There were a changes regarding OVN on Neutron side, let's reflect them
on our local.conf's samples. Now, we will install assume neutron will
have enabled OVN by default.

Change-Id: I2943e55b7d69908261ec71d8014730034bd481a2
2021-06-24 13:07:25 +02:00
Roman Dobosz d0e7a68b85 Add golang dependency for devstack.
Currently, we were relying on our dependencies which pulls golang
package, so that we don't need to do that ourselves. Although, as it was
pointed out in mentioned bug, explicit is better than implicit.

Even though, it's worth to mention, that kuryr-kubernetes relies on
both: Neutron and Octavia (which brings golang as it binary dep), and
without either of it, it will not work.

Change-Id: I3efb100e8ea47b7eb74e5addf5c2171c4606cad0
Closes-Bug: #1930368
2021-06-02 10:02:29 +02:00
Roman Dobosz 25f5acce36 Dropping draining node while removing k8s cluster.
When executing kubectl drain node it sometimes removing
kuryr-controller first, which may happen, that deployments will hang
during removing, since the dependency on the controller.

Also, turns out, that we can simply skip it, and `kubeadm reset` will
remove everything for us, so that's enough.

Change-Id: I396fb8fa5658617d03f5fdeed93cc86aa61e4a2d
2021-05-24 13:25:13 +02:00
Roman Dobosz 11a34d0e5d Enable multinode gate.
This patch provides an implementation for joining node to the Kubernetes
cluster by using `kubeadm join` command.

Change-Id: I71d2b99e0c92a12c4e64395f6c4dafa4b69f168f
Depends-On: Ife21874c0a71ba07723094c0f880aabcf5825b77
2021-05-24 13:25:11 +02:00
Roman Dobosz e005247b89 Make containerized deployment as a default.
Currently, by default, kuryr-kubernetes services (controller and CNI
daemon) are suppose to be run as a systemd services. The reality is,
that in most real world deployments we are using containerized services.
In this patch variable KURYR_K8S_CONTAINERIZED_DEPLOYMENT will now have
default value set to True, which means, that without even setting it,
deploying kuryr-kubernetes will be containerized.

Secondly, we agreed[1], that all the gate names should also reflect that
change in their names.

And finally, non working and outdated local.conf samples for
OpenDaylight has to be removed.

Behaviour for sample local.confs wasn't change: using them to spin up
devstack will still use systemd services.

[1] https://etherpad.opendev.org/p/apr2021-ptg-kuryr

Change-Id: I2c13893c80e9e5b3b2ac0cb64dd9bd9a40d99e63
2021-05-24 13:22:54 +02:00
Roman Dobosz c034b0060e Use kubeadm for installing Kubernetes on devstack.
Till now, for installing kuryr-kubernetes and one of the crucial service
- kubernetes, there has been used manual method for installing it in
specified version. Over time it became a burden to follow requirements
and constraints, therefore decision has been made to use recommended way
of installing Kubernetes - kubeadm. In this patch devstack installation
of the kuryr-kubernetes and its dependences has been heavily reworked.

Other than that, OpenShift related functions has been removed, since
they were all outdated and non-working for the long time.

Change-Id: Ife21874c0a71ba07723094c0f880aabcf5825b77
2021-05-21 13:07:21 +02:00
Tabitha Fasoyin fae12d9be2 Enable Listener data timeouts test in tempest.conf
This patch enables the tempest test that checks that listener timeout
value is configurable.

Depends-On: https://review.opendev.org/c/openstack/kuryr-tempest-plugin/+/783966
Implements: blueprint configure-lb-listeners-timeout
Change-Id: Ie2f6ec8b193e5a90216f3ff925188ad367826e4c
2021-04-08 08:16:36 +00:00
Zuul e21d2f3d8b Merge "Add option to set listener timeouts for lb created by Kuryr" 2021-03-25 16:58:26 +00:00
Tabitha Fasoyin 87f6c66d31 Add option to set listener timeouts for lb created by Kuryr
The timeout-client-data and timeout-member-data configurations
for Octavia listeners default to 50 seconds for load balancers
created by Kuryr. This patch allows the creation and modification
of load balancers handled by Kuryr with different timeouts values.

Implements: blueprint configure-lb-listeners-timeout
Change-Id: I99016001c2263023d1fa2637d7b5aeb23b3b2d9d
2021-03-17 14:58:37 +00:00
Zuul 2ef51048c2 Merge "Enable SCTP service test in tempest.conf" 2021-03-12 23:19:04 +00:00
Michał Dulko 1c1d1d463a DevStack: Support dual stack
This commit makes sure DevStack plugin is able to run with dual stack
and create 2 subnetpools, 2 service subnets and 2 pod subnets. The K8s
is also configured with that.

Implements: blueprint dual-stack

Change-Id: I9c53bc4dd3529a48f5ba1ab77268d6a984a84808
2021-03-03 17:16:49 +01:00
Tabitha 225b2a3dd1 Enable SCTP service test in tempest.conf
Depends-On: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/754429
Partially-Implements: blueprint sctp-support
Change-Id: If6a6c81dabcf0818c4e99b0501b42d941551cdbc
2021-02-18 11:54:21 +01:00