Commit Graph

83 Commits

Author SHA1 Message Date
Alexey Odinokov 4f735b471f Fixing rolebindings generation for init container
This part has to use the same configuration
as init container: see line 96

Change-Id: I06c1f3ad586863d4dcfab559d13a592fc576f857
2024-03-15 14:56:09 +00:00
astebenkova 2216cbfec4 Add compute-kit job with DPDK enabled
+ add role for enabling hugepages

Change-Id: I89d3c09ea3bedcba6cb51178c8d1ac482a57af01
Depends-On: I2f9d954258451f64eb87d03affc079b71b00f7bd
2024-02-14 13:23:34 -06:00
astebenkova 7df8ebde19 [openvswitch] Add overrides values for dpdk
Change-Id: I756f35f1251244bc76f87a18a1a2e51f13a8c010
2024-01-31 09:21:55 +02:00
Vladimir Kozhukalov 1a112e9fba Add Ubuntu Focal and Jammy overrides for openvswitch
Change-Id: Ifc4fa0cbc9c7b4f2a9785edcecd562beb00abab3
2024-01-02 08:59:09 -06:00
SPEARS, DUSTIN (ds443n) b769895a60 Update openvswitch to support cgroups v2
Adds check and if cgroups v2 is active use
cgroups v2 file structure for setting cpus

Change-Id: I603271a1b043d192988694c50ea7411a567b16ca
2023-10-30 17:33:38 -04:00
Ritchie, Frank (fr801x) 21171ec581 Add optional value for extra poststart command
Add option to define an extra command (or commands via multiline yaml
value) that will run at the end of the poststart script. Specific
deployments can benefit from extra cleanup/checks.

Change-Id: I7c26292dc65dc0bfd4374b1f5577696fca89140f
2023-09-08 12:01:55 -04:00
SPEARS, DUSTIN (ds443n) b76240f1df Wait for new ovs ctl file
Sometimes the poststart function on a pod restart
completes too quickly, resulting in chown command
running on the incorrect file.

Change-Id: I2eca5b148f13c48314501c955723bf759ffaa4fc
2023-08-15 15:34:45 -04:00
Thales Elero Cervi b65ac7e129 Restore ServiceAccount to openvswitch pod
This change includes back the the helm-toolkit snippet:
kubernetes_pod_rbac_serviceaccount to the openvswitch Daemonset
definition, since it is responsible for creating the POD's
ServiceAccount which contains imagePullSecrets that enable the POD to
retrieve images from private registries.

Originally openvswitch chart had two daemonset definitions: for the
db and for the server, but recently both were merged into a single
daemonset [1] and the template inclusion was dropped during this merge

[1] 73e2b3322d

Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: I8e8e165956db2714563733a78baf156ab20b696a
2023-08-08 09:15:33 -03:00
ricolin ee4d3ac71c Make sure ovs ctl file exist before chown
This propose to make sure the exist of
`/run/openvswitch/ovs-vswitchd.${PID}.ctl`
before we do chown command with it.

Change-Id: Icdcfa5684c2a5e610805f6dec9391a4947b213d4
2023-07-09 00:55:54 +08:00
ricolin e9a8166725 Add buffer to wait for ovs pid file
This fixes for cases file not yet generated from start(), but already
required on poststart() in openvswitch-vswitchd.sh.

Add wait condition until file exists.

Change-Id: Iae041046fd6e7e7f991b4cd1aa101c97bcaa150c
2023-06-29 16:37:47 +08:00
lvdongbing 34b3b4f1f4 Upgrade openvswitch image to latest-ubuntu_focal to fix qos issue
Closes-Bug: #2017383
Change-Id: I21c0260fa90ecdc1cc52469fea508f1f0bac5692
2023-04-23 02:26:56 +00:00
Samuel Liu 6034a00bf7 Replace node-role.kubernetes.io/master with control-plane
The master label is no longer present on kubeadm control plane nodes(v1.24). For new clusters, the label 'node-role.kubernetes.io/master' will no longer be added to control plane nodes, only the label 'node-role.kubernetes.io/control-plane' will be added. For more information, refer to KEP-2067[https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/kubeadm/2067-rename-master-label-taint]: Rename the kubeadm "master" label and taint.

the kubernetes pr: https://github.com/kubernetes/kubernetes/pull/107533

Change-Id: I3056b642db0a1799089998e3c020b4203c9a93ab
2023-03-20 13:38:07 +08:00
Sadegh Hayeri 6c5206a01c Add ovn
Change-Id: I2b1457042afcbe1375b771161acfa929a91e6813
2023-03-17 22:11:55 +03:00
root 73e2b3322d Merge ovs-db and ovs-vswitchd in one Daemonset
There is no usecase in which ovs-db and ovs-vswitchd run on
different nodes.
In terms of version upgrade, ovs-db and ovs-vswitchd should be
upgraded together in every node.
This commit deploys ovs-db and ovs-vswitchd in one daemonset.

Change-Id: I791b9f7abfd3ca838dc2adfaa6c606bb1c88d19d
2023-01-04 06:00:54 +00:00
v-vamshiko 6e832eef4b OVS - Enable hardware offload
Change-Id: I0dfc5689fdc2f5f66f059132b8a5475857a03c92
2022-11-03 22:01:49 +00:00
Brian Haley f31cfb2ef9 support image registries with authentication
Based on spec in openstack-helm repo,
support-OCI-image-registry-with-authentication-turned-on.rst

Each Helm chart can configure an OCI image registry and
credentials to use. A Kubernetes secret is then created with these
info. Service Accounts then specify an imagePullSecret specifying
the Secret with creds for the registry. Then any pod using one
of these ServiceAccounts may pull images from an authenticated
container registry.

Change-Id: Iebda4c7a861aa13db921328776b20c14ba346269
2022-07-20 14:28:47 -05:00
Thiago Brito a65af0db27 Enable taint toleration for openvswitch
This adds taint toleration support for openstack jobs

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: I0f6d98297e973f420cb363a8e6eb5e00bdfd4bb4
2022-03-23 16:24:02 +00:00
Gage Hugo 22e50a5569 Update htk requirements
This change updates the helm-toolkit path in each chart as part
of the move to helm v3. This is due to a lack of helm serve.

Change-Id: I011e282616bf0b5a5c72c1db185c70d8c721695e
2021-10-06 01:02:28 +00:00
Thiago Brito 5a0ba49d50 Prepending library/ to docker official images
This will ease mirroring capabilities for the docker official images.

Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: I0f9177b0b83e4fad599ae0c3f3820202bf1d450d
2021-06-02 15:04:38 -03:00
Roy Tang a671d40a52 Support override of ovs probes
Currently ovs liveness and readiness probes commands are statically
defined in the templates, this change allow them to be change
as needed.  This helps with debuging and making quick adjustment.

Change-Id: I75b4b5a335b75a52f4efbd4ba4ed007106aba4fa
2021-04-14 16:03:19 -04:00
Phil Sphicas f08d30df6b Use HostToContainer mountPropagation
For any host mounts that include /var/lib/kubelet, use HostToContainer
mountPropagation, which avoids creating extra references to mounts in
other containers.

Affects the following resources:
* ingress deployment
* openvswitch-vswitchd daemonset

Change-Id: I5964c595210af60d54158e6f7c962d5abe77fc2f
2021-01-07 20:29:24 +00:00
Andrii Ostapenko 9d5b9a9e42 Unpin images built with osh-images
Enabling ability to automate testing and auto promotion.
Unpinning ovs, mariadb and node-problem-detector images.

Change-Id: I6256452d575d23f84f4fd5c728437b0e4e9423f3
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-10-01 18:43:13 +00:00
Andrii Ostapenko 1532958c80
Change helm-toolkit dependency version to ">= 0.1.0"
Since we introduced chart version check in gates, requirements are not
satisfied with strict check of 0.1.0

Change-Id: I15950b735b4f8566bc0018fe4f4ea9ba729235fc
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-09-24 12:19:28 -05:00
Mohammed Naser c7a45f166f Run chart-testing on all charts
Added chart lint in zuul CI to enhance the stability for charts.
Fixed some lint errors in the current charts.

Change-Id: I9df4024c7ccf8b3510e665fc07ba0f38871fcbdb
2020-09-11 18:02:38 +03:00
Andrii Ostapenko 824f168efc Undo octal-values restriction together with corresponding code
Unrestrict octal values rule since benefits of file modes readability
exceed possible issues with yaml 1.2 adoption in future k8s versions.
These issues will be addressed when/if they occur.

Also ensure osh-infra is a required project for lint job, that matters
when running job against another project.

Change-Id: Ic5e327cf40c4b09c90738baff56419a6cef132da
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-07-07 15:42:53 +00:00
Tin Lam 587182c779 fix(ovs): add capability to openvswitch
While OpenVSwitch works in the gate using kubernetes 1.16, running this
in kubernetes 1.18 causes a permission denied error while executing
chroot in an init container script [0]. This adds the SYS_CHROOT
capability to address the error.

[0] https://opendev.org/openstack/openstack-helm-infra/src/branch/master/openvswitch/templates/bin/_openvswitch-vswitchd-init-modules.sh.tpl#L18-L20

Change-Id: I62c01678cce6cd4e98418ed5518613ccd5eecbf9
Signed-off-by: Tin Lam <tin@irrational.io>
2020-06-18 17:07:40 +00:00
Andrii Ostapenko 83e27e600c Enable key-duplicates and octal-values yamllint checks
With corresponding code changes.

Change-Id: I11cde8971b3effbb6eb2b69a7d31ecf12140434e
2020-06-17 13:14:30 -05:00
Andrii Ostapenko 8f24a74bc7 Introduces templates linting
This commit rewrites lint job to make template linting available.
Currently yamllint is run in warning mode against all templates
rendered with default values. Duplicates detected and issues will be
addressed in subsequent commits.

Also all y*ml files are added for linting and corresponding code changes
are made. For non-templates warning rules are disabled to improve
readability. Chart and requirements yamls are also modified in the name
of consistency.

Change-Id: Ife6727c5721a00c65902340d95b7edb0a9c77365
2020-06-11 23:29:42 -05:00
Andrii Ostapenko 731a6b4cfa Enable yamllint checks
- document-end
- document-start
- empty-lines
- hyphens
- indentation
- key-duplicates
- new-line-at-end-of-file
- new-lines
- octal-values

with corresponding code adjustment.

Change-Id: I92d6aa20df82aa0fe198f8ccd535cfcaf613f43a
2020-05-29 19:49:05 +00:00
Zuul e53d28718d Merge "Remove OSH Authors copyright" 2020-05-12 20:00:38 +00:00
diwakar thyagaraj d2e48fc131 Enable Apparmor to openvswitch init pods
Change-Id: Ib71f7e4a2ea21efaa648ddf13a8ee3378609deb2
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
2020-05-11 14:27:57 +00:00
Gage Hugo d14d826b26 Remove OSH Authors copyright
The current copyright refers to a non-existent group
"openstack helm authors" with often out-of-date references that
are confusing when adding a new file to the repo.

This change removes all references to this copyright by the
non-existent group and any blank lines underneath.

Change-Id: I1882738cf9757c5350a8533876fd37b5920b5235
2020-05-07 02:11:15 +00:00
rajesh.kudaka f2b8bacb26 Set ctl socket ownership
This is moved from neutron-ovs-agent init script[0] to
openvswitch poststart to ensure that ovs ctl socket
has the required permissions even if the openvswitch
pods are restarted.

[0] https://github.com/openstack/openstack-helm/blob/master/neutron/templates/bin/_neutron-openvswitch-agent-init.sh.tpl#L22-L25

Change-Id: I09e604576e2408a8dec9905d1ad070422351ed99
2020-04-27 15:06:01 +00:00
Hemachandra Reddy b5c12377da Fixes the pod prestop hook
Change-Id: I94988da32bdcf2d1a947abecf4faa8cd84a54741
2020-03-23 23:45:04 +00:00
diwakar thyagaraj c4b2be6bcc Enable AppArmor profile to Openvswitch.
This adds Apparmor profile to Openvswitch. This change also refactors
the apparmor job to utilize the feature gates system instead of relying
on separate scripts

Change-Id: Ie53162cfdea5553191d3b5dbdfec195e4001b255
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
2020-03-17 16:39:54 +00:00
Reddy, Hemachandra (hr858f) 70d93625e8 Do not set CPU resources to ovs-vswitch DPDK pod
When DPDK is enbaled, configuring CPU resource limits
through Kubernetes affects packet throughput adversely.
DPDK PMD cores could not get 100% busy.

They need to be configured by isolating them in host grub
and later through PMD core mask.

Change-Id: Ia80880302b9c5c02fdb1c00cb62f6640860e898e
2020-01-21 23:10:39 +00:00
Pete Birley 601e6ca47a OVS: enable setting threads for handler and revalidator
This PS enables the ability to configure the handler and
revalidator threads.

See: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1827264/comments/6
Change-Id: I789da34104ac3cfb6a38bf4435a652da45c55e63
Signed-off-by: Pete Birley <pete@port.direct>
2020-01-15 17:07:24 -06:00
Roy Tang 9a8516867a Add support to set vhost-iommu-support as global option
Also update other optional parm

Change-Id: I9a36acd6a331255d01722ed5961b08e1fbca80d1
2019-12-09 22:19:21 +00:00
Zuul 385803eef2 Merge "Fix OVS-DPDK readiness probe for OVS < v2.10.0" 2019-12-08 20:54:19 +00:00
Hemachandra Reddy 066a7e0ab4 Initialize PCI module if used before DPDK for hotplug to work
Change-Id: I9f552035eb70fd2a828ff7fa4852ba66055b885f
2019-12-06 15:56:14 +00:00
Georg Kunz cd27f2714c Fix OVS-DPDK readiness probe for OVS < v2.10.0
A recently introduced readiness probe for OVS with DPDK makes use of an
OVSDB table entry 'dpdk_initialized' which does not exist in OVS
versions preceeding v2.10.0. This patch changes the readiness probe to
exit successfully if this table entry does not exit.

Change-Id: I1776ac4bf736220267a49042f1b7092f3cf5ed16
2019-12-03 16:48:13 +00:00
Steve Wilkerson cbeb7f149b Move charts off using the :latest built tags
This updates charts that consume images built from osh-images to
use tags other than the :latest tags. This will be followed up
with the definition of jobs to allow for vetting out of updated
images, as reliance on :latest tags assumes any change merged into
osh-images will result in functionally correct behavior (which has
shown to not be the case traditionally)

Change-Id: I181aa56ed187604dc7583d8081e53cc69eb27310
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-11-21 19:57:07 +00:00
Sphicas, Phil (ps3910) e4538f714a openvswitch: add vswitchd dependency on db
The openvswitch-vswitchd pod should not start until there is a Ready
openvswitch-vswitchd-db pod on the same node. This change adds the
appropriate dependency to cause it to wait.

Change-Id: I5c827971c99639d2f1c3a24a1761524b3a165421
2019-10-24 10:41:46 -07:00
Steve Wilkerson b50fae62a4 Update kubernetes-entrypoint image reference
This updates the kubernetes-entrypoint image reference to consume
the publicly available kubernetes-entrypoint image that is built
and maintained under the airshipit namespace, as the stackanetes
image is no longer actively maintained

Change-Id: I5bfdc156ae228ab16da57569ac6b05a9a125cb6a
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-10-18 18:20:11 +00:00
Hemachandra Reddy 926348fe24 Add DPDK check for readiness probe
This change makes sure that "ovs-vsctl get Open_vSwitch .
dpdk_initialized" is true before making the pod ready

Change-Id: Ie88f74a1e7a84afb3fbca55b500009255b4f6991
2019-10-07 16:08:13 +00:00
Zuul 496a512acc Merge "ovs-dpdk: create separate cgroup for openvswitch-vswitchd pods" 2019-09-27 15:24:41 +00:00
Zuul 1478962d18 Merge "Aligning OVS and Neutron configuration for DPDK" 2019-09-27 15:18:46 +00:00
Gage Hugo f0779e2825 Add network policy value overrides
This change adds network policy overrides for multiple infra
services for the openstack-helm network policy gate.

Change-Id: If051ec1749cb9ed1e289f0cf82a8876371e36531
2019-09-24 13:48:10 +00:00
Deepak Tiwari e354bef7bb ovs-dpdk: create separate cgroup for openvswitch-vswitchd pods
Setup Cgroup to use to break out of Kubernetes defined groups for ovs-dpdk pods.
All the cores on the server are added to the cpuset, pmd_cpu_mask and lcore_mask
will choose the right ones for ovs-dpdk from all the cores.

Co-Authored-By: Phil Sphicas <ps3910@att.com>

Change-Id: Ia840647e3fc09480b826b3075b2585daefa638b3
2019-09-13 12:22:31 -05:00
sg774j 20ee36ab7d Openvswitch: Enable Rolling Update
Enable rolloing update for both ovs_db and ovs_vswitchd daemonsets

Change-Id: I4e20c2e01634ca0a0ded4e02406a6f690e26402d
2019-09-05 11:40:59 -05:00