47 Commits

Author SHA1 Message Date
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
Steve Wilkerson
3413dba8c0 Update ingress controller image, ingress cookie annotations
This updates the ingress controller image to v0.23.0, which was
required to add support for configuring cookie max age and expires
for ingresses via annotations on the ingress.

This also removes the --enable-dynamic-configuration flag, as the
flag is no longer valid in 0.23.0 due to the functionality being
a default behavior of the nginx ingress controller in recent
releases

Change-Id: I4917797c43ec973ed0bb311fc305b01f10abd4e5
2019-03-07 20:39:03 +00:00
Rahul Khiyani
9a34331bcf readOnlyFilesystem: true for ingress chart
Fix for adding readOnlyFilesystem flag at pod level

Change-Id: Icc8fa3aae2d80e1038d7335af9a0a51885f9dad8
2019-02-26 09:21:57 -05:00
Chris Wedgwood
03ee843b22 [ingress] explicitly specify the Prometheus scrape port
Change-Id: I9e191257c436ca6ab74d013feb07bb0ffed2d532
2019-01-29 04:42:26 +00:00
Jagan Kavva
c49207819e Pentest - NC1.0 K8S –Security HTTP Headers Not Present – TCP 6443
The server should send an X-Content-Type-Options: nosniff to make sure
the browser does not try to detect a different Content-Type than what is
actually sent (can lead to XSS).

Additionally the server should send an X-Frame-Options: deny to protect
against drag'n drop clickjacking attacks in older browsers.

Change-Id: I779c519cf75bbee23d3a8348291c0fd053e61e4e
2019-01-23 16:21:32 -06:00
Chris Wedgwood
0c4e37391f 'NOP' cleanup for more consistent white-space use in charts
Where we have the style '{{ ...' we should use the style '... }}'.

Change-Id: Ic3e779e4681370d396f95d3804ca27db5b9d3642
2019-01-03 22:45:49 +00:00
Zuul
6d354f0f7b Merge "Revert "Add Egress Helm-toolkit function & enforce the nework policy at OSH-INFRA"" 2018-12-16 08:57:09 +00:00
Pete Birley
0bf3674539 Revert "Add Egress Helm-toolkit function & enforce the nework policy at OSH-INFRA"
This reverts commit 8d33a2911cda0c9e88406b9eeacbd8dfa70286f2.

Change-Id: Ic861b9bf9b337449b47a3558da8355e7a5bcacee
2018-12-16 04:21:46 +00:00
Zuul
b90bf10b89 Merge "Add Egress Helm-toolkit function & enforce the nework policy at OSH-INFRA" 2018-12-15 09:32:21 +00:00
Mike Pham
8d33a2911c Add Egress Helm-toolkit function & enforce the nework policy at OSH-INFRA
This PS implements the helm toolkit function to generate the
Egress in kubernetes network policy manifest based on overrideable values.
It also enbale the K8s network policy at Osh-infra gate.

Change-Id: Icbe2a18c98dba795d15398dcdcac64228f6a7b4c
2018-12-14 16:32:40 -05:00
Pete Birley
99f5fe22f2 Ingress: Share container PID namespaces under docker
This PS shares pid namespaces for containers in pods under docker,
bringing running in this runtime inline with other runc based container
backends, allowing the pause process in the pod to act as a reaper.

Change-Id: I70965a62b585de31fb953ba98189a84021dba1cb
Signed-off-by: Pete Birley <pete@port.direct>
2018-12-14 04:52:44 +00:00
Zuul
ef2e415ec8 Merge "Ingress: Remove server headers from response" 2018-12-12 22:13:53 +00:00
Pete Birley
337ac99234 Ingress: Update sleep function to not require dumb-init
This PS updates the sleep function to not require dumb-init to be
present in images.

Change-Id: I9ee7270f2c101a3a85b2aecd01097a70014ea4a6
Signed-off-by: Pete Birley <pete@port.direct>
2018-12-11 12:53:38 -06:00
Pete Birley
8c9227273f Ingress: Remove server headers from response
This PS removes the server headers from client responses, as per
security guidelines.

Change-Id: I351f396e8e735e1d13f00c661b9c4068664d934a
Signed-off-by: Pete Birley <pete@port.direct>
2018-12-11 10:05:43 -06:00
Pete Birley
4803fe31d1 Ingress: Break out helper container images
This PS breaks out the helper container images, which is required
now that the ingress image is more compact.

Change-Id: I6afb08954f37eda1ed913a4b3acdaf6e2b89d30e
Signed-off-by: Pete Birley <pete@port.direct>
2018-11-28 20:54:35 -06:00
Andrey Pavlov
5ac56d9307 add parameter to allow redefining of server port for ingress
To allow to integrate TungstenFabric(Contrail) with Airship
there should be ability to redifine ports that can be conflicted.

Change-Id: Id15658c65339577cec03f25ebd22dd664bb5976a
2018-11-27 13:15:32 +03:00
Zuul
8e369d2c9c Merge "Ingress: Update version of ingress controller image" 2018-11-23 20:39:38 +00:00
Pete Birley
4d2085f0af Ingress: Update version of ingress controller image
This PS updates the version of the ingress controller image used.

This brings in the ability to update the ingress configuration without
reloading nginx. There may also need to be some changes for prom based
monitoring:
 * https://github.com/kubernetes/ingress-nginx/blob/master/Changelog.md#0100

Change-Id: Ia0bf3dbb9b726f3a5cfb1f95d7ede456af13374a
Signed-off-by: Pete Birley <pete@port.direct>
2018-11-21 19:21:40 +00:00
Pete Birley
ea875b1dcc Ingress: Make healthz port configurable
This PS updates the healthz port to be configurable

Change-Id: Ifa5ea4b7b422156a7309886ecc21668fc096065b
Signed-off-by: Pete Birley <pete@port.direct>
2018-11-20 12:28:14 -06:00
Pete Birley
f3e1fa4e72 Ingress: Allow status port to be customised
This PS updates the ingress chart to allow the status pport to be
changed.

Change-Id: Ia38223c56806f6113622a809e792b4fedd010d87
Signed-off-by: Pete Birley <pete@port.direct>
2018-11-20 09:57:56 -06:00
Tin Lam
92e68d33ea Add network policy toolkit function
This patch set implements the helm toolkit function to generate a
kubernetes network policy manifest based on overrideable values.
This also adds a chart that shuts down all the ingress and egress
traffics in the namespace. This can be used to ensure the
whitelisted network policy works as intended.

Additionally, implementation is done for some infrastructure charts.

Change-Id: I78e87ef3276e948ae4dd2eb462b4b8012251c8c8
Co-Authored-By: Mike Pham <tp6510@att.com>
Signed-off-by: Tin Lam <tin@irrational.io>
2018-10-15 13:50:50 +00:00
Pete Birley
bb3ff98d53 Add release uuid to pods and rc objects
This PS adds the ability to attach a release uuid to pods and rc
objects as desired. A follow up ps will add the ability to add arbitary
annotations to the same objects.

Change-Id: Iceedba457a03387f6fc44eb763a00fd57f9d84a5
Signed-off-by: Pete Birley <pete@port.direct>
2018-09-13 05:35:35 +00:00
Jean-Philippe Evrard
bf069b2311 Revert "Update OSH Author copyrights to OSF"
This reverts commit 178aa271a44956e86f4e962bf815fa827d93c9af.

Change-Id: I38a52d866527dfff2689b618e055f439bc248c13
2018-08-28 17:25:54 +00:00
Matt McEuen
178aa271a4 Update OSH Author copyrights to OSF
This PS updates the "Openstack-Helm Authors" copyright attribution
to be the "OpenStack Foundation", as decided in the 2018-03-20
team meeting:
http://eavesdrop.openstack.org/meetings/openstack_helm/2018/openstack_helm.2018-03-20-15.00.log.html

No other copyright attributions were changed.

Change-Id: I1137dee2ae5728771835f4b33fcaff60fcc22ca9
2018-08-26 17:17:06 -05:00
Seungkyu Ahn
a430533e6a Quoting node_select_value in Ingress Controller
In most cases, the ingress controller's nodeSelector key and value
are "node-role.kubernetes.io/ingress" and "true".
Using quote to treat the nodeSelector value as a string.

Change-Id: Ie1745629b90795e4d888d85f35565e6d6350e09b
2018-08-01 02:39:05 +00:00
Pete Birley
d8a2864779 Ingress: move ingress chart to OSH-Infra
This PS moves the ingress chart to OSH-Infra

Story: 2002204
Task: 21733

Change-Id: I85a46d5907f2ffe293f6fef0f528fdef167a7f0f
Signed-off-by: Pete Birley <pete@port.direct>
2018-07-24 21:01:51 +00:00