75 Commits

Author SHA1 Message Date
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
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
Zuul
c8a5edb218 Merge "Ingress: add apparmor profile to ingress init containers" 2020-06-15 23:22:27 +00:00
KHIYANI, RAHUL (rk0850)
ae278c674e Ingress: add apparmor profile to ingress init containers
concat is not available in helm 14.1, using work around
to emulate this functionality.

Change-Id: Iccbc5de567be1c899b7f5d47cf43b6e962c27e91
2020-06-12 21:02:32 +00: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
Gupta, Sangeet (sg774j)
9ff76434aa Ingress: Use latest controller image
Use nginx-ingress-controller:0.32.0 and change user to 101
intead of 33 which is suported by this image.

Change-Id: I38679e350ec352f13074055b7e08b98df1090fbf
2020-06-01 21:46:44 +00: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
KHIYANI, RAHUL (rk0850)
99a77eefda error-pages: updating the defaultbackend version to 1.4
removing the command "/tmp/ingress-error-pages.sh" script as the
1.4 version already uses "/server" exec
https://hub.docker.com/layers/siriuszg/defaultbackend/1.4/images/sha256-989154cad9fa0edab79acd8904b3ed643f3325fe827616ffa7c1181bb1e1321b?context=explore

Change-Id: I3769abeea16254fe5cc4f0f92eb8e8d89cf356a6
2020-05-26 10:42:29 -05:00
Zuul
ee57e65bf0 Merge "[ingress] Support nginx-ingress-controller 0.30.0" 2020-05-18 22:28:33 +00:00
Andrii Ostapenko
82c6ceaf18 Don't try to apply k8s acl control to non existent container
Change-Id: Iff8dee23cad5e1846135456df66d52b8aa3b19a2
2020-05-18 17:52:58 +00:00
Michael Polenchuk
0e644a1fac [ingress] Support nginx-ingress-controller 0.30.0
In 0.30.0 (busybox inside) the "find" tool doesn't support
"writable" option, so use "perm" instead. Also get rid of
several system calls by means of make all by one command.

Change-Id: Ia4f7bc01fb61f4f32c21c50d8c4e870d0244c868
2020-05-17 05:39:51 +00:00
Zuul
aa957ea2c4 Merge "Mariadb: Add apparmor profile to init-containers" 2020-05-14 18:10:47 +00:00
KHIYANI, RAHUL (rk0850)
845385de38 Mariadb: Add apparmor profile to init-containers
This change adds apparmor profile to mariadb init containers and
ingress init container

Change-Id: I843baf221a82d234104b14db5b02026fe87e6063
2020-05-14 09:57:21 -05:00
Tin Lam
3dd6d0e7a0 chore(images): update to stein bionic images
Some infra charts still have old ocata xenial images as default. This
should bring them up to date with the OSH charts.

Change-Id: If8454b6d0fe52387bf6327501ee4ff87f56e87b8
Signed-off-by: Tin Lam <tin@irrational.io>
2020-05-14 07:21:41 -05:00
Zuul
e53d28718d Merge "Remove OSH Authors copyright" 2020-05-12 20:00:38 +00:00
KHIYANI, RAHUL (rk0850)
8617c8c1e0 Ingress: Add apparmor profile to ingress init container
Change-Id: I2217a8ab8c76b8f6a14f477c3159e4133ef186f9
2020-05-07 13:51:29 +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
KHIYANI, RAHUL (rk0850)
5bc24e78a4 Ingress: Run nginx ingress as non-root user
Running nginx ingress with www-data user

Change-Id: I769577cdedd05cc1b8b035928e67ad7ed70568db
2020-04-27 16:12:21 -05:00
diwakar thyagaraj
965e1b6079 [FIX] Fix Typo in Apparmor profile to Ingress Charts
Change-Id: I548b441d6c712fd63fdf7dacb475683533a001ca
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
2020-04-19 00:13:49 +00:00
KHIYANI, RAHUL (rk0850)
ae41873341 Add Docker default AppArmor profile to ingress chart
Change-Id: Id4fee2008fd7544ccbf865084949c767013ca3fa
2020-02-13 22:41:37 +00:00
Tin Lam
c199addf3c Update apiVersion
This patch set updates and tests the apiVersion for rbac.authorization.k8s.io
from v1beta1 to v1 in preparation for its removal in k8s 1.20.

Change-Id: I4e68db1f75ff72eee55ecec93bd59c68c179c627
Signed-off-by: Tin Lam <tin@irrational.io>
2020-01-09 08:59:48 +00:00
Phil Sphicas
e7b4242c3b Ingress: nginx-ingress-controller 0.26.1+ support
nginx-ingress-controller 0.26.1 introduces configurable parameters for
streamPort and profilerPort, and changes the default for statusPort.

This change allows those parameters to be configured, while maintaining
compatibility with earlier versions of nginx-ingress.controller. It also
modifies the default status port value from 18080 to 10246.

Reference: https://github.com/kubernetes/ingress-nginx/blob/master/Changelog.md#0261

Change-Id: I88a7315f2ed47c31b8c2862ce1ad47b590b32137
2020-01-01 13:34:00 -08:00
Phil Sphicas
bcecbad652 Ingress: k8s and ingress version compatibility
k8s 1.14 first enabled Ingress in the networking.k8s.io/v1beta1 API
group, while still serving it in the extensions/v1beta1 API group. The
extensions/v1beta1 API endpoint is deprecated in 1.16 and scheduled for
removal in 1.20. [0]

ingress-nginx 0.25.0 actually uses the networking.k8s.io/v1beta1 API,
which requires updated RBAC rules. [1]

This change updates the ClusterRole used by the ingress service account
to grant access to Ingress resources via either the extensions/v1beta1
or networking.k8s.io/v1beta1 API, aligning with the static manifests
from the kubernetes/ingress-nginx repo [2]. It does not change the
apiVersion used when creating Ingress resources.

[0] https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/
[1] https://github.com/kubernetes/ingress-nginx/releases/tag/nginx-0.25.0
[2] 870be3bcd8/deploy/static/mandatory.yaml (L50-L106)

Change-Id: I67d4dbdb3834ca4ac8ce90ec51c8d6414ce80a01
2020-01-01 13:34:00 -08:00
Phil Sphicas
6ca136bae4 Ingress chart managed VIP fixes cleanup/startup
When the ingress pod (in routed mode, using a managed vip) moves from
one host to another, it is sometimes observed that: 1. the vip interface
is not removed on the original host, and 2. in some network topologies,
the switch fabric is unable to find the new pod.

This change updates the ingress deployment as follows:

Adds a 5s sleep before the shutdown of the ingress container in order to
allow the preStop action of the ingress-vip container to run completely.

Updates the start action of the ingress-vip-init container to check if
the vip is part of an existing connected subnet, and if so, sends a few
gratuitous ARP messages to let the switch fabric to build its ARP cache.

Change-Id: I784906865358566f42157dc2133569e4cb270cfa
2019-11-20 07:25:50 -08:00
Bjoern Teipel
b500d69591 Fxing lint errors for Helm 2.16
This commit fixes helm lint errors when linting against
the recent helm version.

Change-Id: I2a940ad1cea406ba923519cd5be188ee1bc409aa
2019-11-12 11:28:22 -06:00
Steve Wilkerson
74f3eb5824 Ingress: Move ingress objects back to the extensions api
This updates the ingress objects to move them back to the
extensions API.  While 1.16 moves them under the networking
api, they're still rendered and deployed as extensions/ objects.
This move prevents issues from arising where older versions of
kubernetes might still be deployed during an upgrade, as the
move to the networking API is nonfunctional at this time

Change-Id: I814bbc833b5b9f79f34aefc60b9c1f9890bca826
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-10-28 21:31:06 +00: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
Steve Wilkerson
c9acad238c Update Kubernetes version to 1.16.2
This updates the kubeadm and minikube Kubernetes deployments to
deploy version 1.16.2

Change-Id: I324f9665a24c9383c59376fb77cdb853facd0f18
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-10-16 21:54:53 +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
Gage Hugo
ab3ab66bcb Add open egress rules to multiple infra charts
This change adds egress rules to the following charts:
- ingress
- memcache
- libvirt
- rabbitmq

These rules will be tightend down in future changes

Change-Id: I6f297d50ca4c06234c7c79986a12cccf3beb5efb
2019-09-12 13:07:19 -05:00
Pete Birley
e96bdd9fb6 Ingress: Clean up tmp dir entirely on container start
This PS cleans up the container dir entirely on container restart,
as sometimes remnets of previous runs can cause issues.

Change-Id: I873667a8a57bca6096cbe777ee83ef8648a368d4
Signed-off-by: Pete Birley <pete@port.direct>
2019-07-16 01:21:02 +00:00
Alexander Noskov
3b5a1c7909 Take dnsPolicy from .Values.pod.dns_policy variable
Change-Id: Iae7caa5bdefe7749231c031c6003591a6251fa97
2019-07-15 17:31:16 +00:00
Alexander Noskov
0eff94f51c Remove quotes for bind-address in ingress Chart
Currently, we are getting `bind-address: null` in ingress-conf for ingress pod in kube-system namespace
In that case, nginx starting on 0.0.0.0:80 which breaks other ingress controllers, such as maas-ingress.
All further ingress controllers can't start because they can't bind on 80 port.

Change-Id: Ie7e9563bf14fe347969bea0d3c900c8d87d06de0
2019-07-12 17:10:00 -05:00
Zuul
c3ac26a35d Merge "Pentest-NC1.0 Nova–Security HTTP Headers Not Present" 2019-07-11 22:28:11 +00:00
NarlaSandeepNarlaSaibaba
3f32f08319 Pentest-NC1.0 Nova–Security HTTP Headers Not Present
Added new HTTP Security header Content-Security-Policy:self to make
sure the browser does not allow any cross-site scripting attacks.

Added new HTTP Security header X-Permitted-Cross-Domain-Policies:none
To prevent web client to load data from the current domain.

Added new HTTP Security header X-XSS-Protection:1 mode=block to
sanitize the page, when a XSS attack is detected, the browser will
prevent rendering of the page.

Change-Id: Ief137738f4b793f49f3632e25339c6f49492fd80
2019-07-09 09:45:53 -05:00
Steve Wilkerson
b117b14c3a Update helm version to 2.14.1
This updates the helm version from 2.13.1 to 2.14.1

Change-Id: I619351d846253bf17caa922ad7f7b0ff19c778a2
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-06-25 21:33:20 +00:00
Pete Birley
d60fe161a5 Ingress: Update config to be compatible with k8s schema validation
This PS updates the ingress controller configmap to be valid with
k8s schema validation turned on.

Change-Id: Ibbc82be62398ee63eb353aa58f1ebdf98e66b30d
Signed-off-by: Pete Birley <pete@port.direct>
2019-06-24 23:54:23 +00:00
SIRI KIM
9022c9237d Ingress: add keepalived-router-id for keeplived vip
When there are multiple keepalived instances in same network space,
equal keepalived router-ids cause conflict (now default router-id number
is 100). So we have to specify keepalived's router_id for VRRP peering.
This commit make keepalived route-id configurable, so that we can
prevent keepalived conflict caused by default keepalived router-id.

Change-Id: Ia92a8b64205ab52ad15237e9fdeaacb61aae6400
2019-06-19 18:06:04 +00:00
Pete Birley
fc58be6a93 Ingress: Clean prometheus-nginx.socket on startup
This PS cleans the prometheus-nginx.socket on startup of the container,
which is required to allow the container, as opposed to the pod, restart.

Change-Id: I7906e85a200f6fb92467371218b4e5957add39f4
Signed-off-by: Pete Birley <pete@port.direct>
2019-06-19 14:02:56 +00:00
Alexander Noskov
d9b939979d Ingress: Fix security context for pod/container
During armada bootstrap, ingress pod tries to execute chroot [0]
inside root directory on host machine to load dummy kernel module
and getting permission denied error.

[0] https://opendev.org/openstack/openstack-helm-infra/src/branch/master/ingress/templates/bin/_ingress-vip-routed.sh.tpl#L22

Change-Id: Icf7e29e95e0c3cf2bf71a22711a03218390c90cb
2019-06-14 17:24:42 +00:00
Zuul
5245f04d4c Merge "Ingress: Add pod/container security context" 2019-06-06 11:53:11 +00:00
RAHUL KHIYANI
a0d67a1117 Ingress: Add pod/container security context
This updates the etcd chart to include the pod
security context on the pod template.

This also adds the container security context to set
readOnlyRootFilesystem to true

Change-Id: I9bf05ab5c21f9afbe269e1566cfecd20b3c086c0
2019-06-04 15:19:21 -05:00
caoyuan
040edeb79a Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I0e3af4a3385f5b2a7705bc19b775863b16c2e08e
2019-05-31 01:52:10 +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
b69584bd65 Merge "Expose Anti-Affinity Weight Setting" 2019-05-16 17:17:03 +00:00
Roy Tang (rt7380)
85bd731562 Expose Anti-Affinity Weight Setting
This ps exposes the anti-affinity weight value, including
default, that will be consumed by the updated htk function.

Change-Id: Id8eb303674764ef8b0664f62040723aaf77e0a54
2019-05-14 17:04:52 -05:00
Ralf Haferkamp
64df756b72 Add overrides for openSUSE Leap15 images
Provide overrides for openSUSE images where those are available.
Currently for the ingress chart these are only the neutron images.

Change-Id: I37b220592f39c266e7812371ea8e5500fb393a9f
2019-04-30 11:57:23 +02:00
RAHUL KHIYANI
befb8b65e8 Ingress: Add pod/container security context
This PS fixes the use of the security context macros for the
ingress chart.

Change-Id: I28171d529a27c3f203b02c031a6cf289fcc5f3e6
2019-04-24 03:12:16 +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
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