63 Commits

Author SHA1 Message Date
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
Georg Kunz
c0dda7785f Aligning OVS and Neutron configuration for DPDK
This change aligns DPDK configuration parameters across the OVS and Neutron
charts.

Change-Id: I381286a49dfe65762cfb4a344e7bd178e42f10f6
2019-08-28 14:29:04 +00:00
Zuul
7c2c148fb0 Merge "Enable probes override from values.yaml for ovs" 2019-08-21 12:08:55 +00:00
rajesh.kudaka
2b66685594 Enable probes override from values.yaml for ovs
This commit enables overriding liveness/readiness probes
configurations for openvswitch pods from values.yaml

Change-Id: I4ec2b9e88bf8ed57e8ac9293f333969b63cef335
2019-08-19 16:34:03 +00:00
Manuel Buil
a71f1b4d33 Provide option to switch between dpdk and non-dpdk
We can select if we want an image with dpdk support by adding:

FEATURE_GATES=dpdk

That way we can reuse the same script for different distros by using
openstack-helm/tools/deployment/common/get-values-overrides.sh

Change-Id: Ia2c53556be650899fdd67c1ec06f5c68ae63c9d4
Signed-off-by: Manuel Buil <mbuil@suse.com>
2019-07-31 15:54:51 +00:00
Manuel Buil
dc1b4dd1c5 Openvswitch: Fix typo in image overrides
The tag is pointing to a libvirt image. It should point to the
openvswitch image

Change-Id: If95a7b9cce2cadcb644389c28799fff48572c549
Signed-off-by: Manuel Buil <mbuil@suse.com>
2019-07-18 18:43:25 +00:00
Alexander Noskov
3b5a1c7909 Take dnsPolicy from .Values.pod.dns_policy variable
Change-Id: Iae7caa5bdefe7749231c031c6003591a6251fa97
2019-07-15 17:31:16 +00:00
Georg Kunz
e6530bc2bb Extended OVS chart with support for DPDK
Extending the Openvswitch chart with support for DPDK. In order to
enable DPDK support, set the dpdk:enabled option to true in value.yaml.
Prerequisites for successfully running OVS with DPDK: the host OS must
to have hugepages enabled.

Co-Authored-By: Rihab Banday <rihab.banday@ericsson.com>

Change-Id: I9649832511ba7c7ba7c391555d60171ef9264110
2019-07-09 17:10:15 +02:00
Jian Li
0146cf98ba Open openvswitch_db_server port 6640 to interact with SDN controller
This change allows the openvswitch to interact with SDN controller
(e.g., ONOS, ODL) through 6640 port.

Story: 2005763
Task: 33473

Change-Id: Ifcbb6a157c230fa729d295ef0d3fb9a16fff60a2
2019-06-24 09:33:11 +09:00
caoyuan
040edeb79a Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I0e3af4a3385f5b2a7705bc19b775863b16c2e08e
2019-05-31 01:52:10 +00:00
Zuul
85c03c422e Merge "Add docker-default (enforce) AppArmor profile to openvswitch" 2019-05-23 15:05:53 +00:00
Jean-Philippe Evrard
5f5e988fb3 Point to OSH-images images
We now have a process for OSH-images image building,
using Zuul, so we should point the images by default to those
images, instead of pointing to stale images.

Without this, the osh-images build process is completely not
in use (and completely opaque to deployers), and updating the
osh-images process or patching its code has no impact on OSH.

This should fix it.

Change-Id: Ic00bd98c151669dc2485cd88e0e8c2ab05445959
2019-05-17 08:17:32 +00:00
Zuul
f721383f27 Merge "Add OpenSUSE Leap15 specific values overrides" 2019-05-14 17:13:00 +00:00
RAHUL KHIYANI
fafc14f043 Openvswitch: Add read-only-fs
This PS adds the default read-only-rootfs to true for openvswitch chart

Change-Id: I59c687ff13335073c69456bc72f6b6e51081378c
2019-05-09 19:38:21 +00:00
Jagan Kavva
34d691c9b1 Add docker-default (enforce) AppArmor profile to openvswitch
Change-Id: I7b091f668d9293d7eafd9c1b54c4eab715bbd93c
2019-04-29 09:24:41 -05:00
Pete Birley
358af71da7 OpenvSwitch: use security context macros
This PS updates to use security context macros from HTK, in line
with other charts.

Change-Id: I5ca0af17eccc4856baef871cf199554aad075ebe
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-21 04:16:50 +00:00
Pete Birley
d83ab26d04 OvS: Improve security options for ovs-db pod
This PS improves the securityu options for the ovs-db pod
by specifying running as a non-root user, using read only
filesystems for the containers and also preventing
privilege escalation. A subsequent ps will move to use the
helm toolkit functions that allow the control of these params.

Change-Id: I94fbf5b851be68f6fb4a1f9809ad12776e8a80b3
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-21 03:16:46 +00:00
Pete Birley
2abf62ff4d OSH-Infra: Add emptydirs for tmp
This PS adds emptydirs backing the /tmp directory in pods, which
is required in most cases for full operation when using a read only
filesystem backing the container.

Additionally some yaml indent issues are resolved.

Change-Id: I8b7f1614da059783254aa6efc09facf23fca3cad
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-20 20:50:59 +00:00
Jiří Suchomel
319e0d345a Add OpenSUSE Leap15 specific values overrides
Only provide the paths for the right images, no other helm charts updates.

Change-Id: I9449bc30a4a36062219f44612fadcc81ce777410
2019-04-18 10:25:10 +02:00
Rahul Khiyani
3995e7d3de Revert "readOnlyRootFilesystem: true for openvswitch chart"
I believe when we have set the readOnly flag at pod without HTK functionality the changes were not reflected. That is why it passed the gate.

Later with HTK functionality the gates never passed and I have tested that in various ways and finally I had to unset the readOnly flag

This reverts commit 598040bea05737ea1ee2460ba8675ed7c061e63a.

Change-Id: Icf8d3cc60045926ab60b9735ee1e8202c15df9d5
2019-04-16 02:28:32 +00:00
Steve Wilkerson
84f30ec103 Add release-annotation to pod spec, add missing annotations
This adds the release-annotation to the pod spec for the charts in
openstack-helm-infra. This also adds missing configmap annotations
to charts in openstack-helm-infra

Change-Id: Ie23f0c16a7a21d3929e98928db2bbcef69ae6490
2019-03-21 09:10:48 -05:00