113 Commits

Author SHA1 Message Date
Zuul
d27e548f8f Merge "OSH-Infra: Add emptydirs for tmp" 2019-04-21 02:21:11 +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
Zuul
7b539caf89 Merge "Revert "readOnlyFilesystem: true for elasticsearch chart"" 2019-04-20 19:32:49 +00:00
Rahul Khiyani
189630ba91 Revert "readOnlyFilesystem: true for elasticsearch chart"
This reverts commit ab86685bea6df436c93220ce63900549c19effff.

removing readOnlyRootFilesystem flag since pods are running to "crashLoopBackOff" state by implementing HTK functionality

when we have set the readOnly flag at pod without HTK functionality the changes were not effected. That is why it passed the gate.

Change-Id: Iaa6b89a6a19e8f85d02bf6d06f45570469674d4f
2019-04-18 20:42:13 +00:00
Steve Wilkerson
2e8c96a623 Elasticsearch, Fluent-logging, Kibana Ingress Policy
This adds ingress network policy for the fluent-logging, kibana
and Elasticsearch charts. This leverages the helm-toolkit template
that was used in openstack-helm for the openstack services

Change-Id: I2a89b62f1002851346e9a25de40113078e9c518f
2019-04-16 19:44:46 +00:00
Zuul
2abcc6d8b4 Merge "elasticsearch-exporter: Add security context for exporter pod/container" 2019-04-15 23:05:47 +00:00
Randeep Jalli
c98f7a7f05 Fix Elasticsearch helm test indentation
This indents the closing {{ end }} for the check for executing the 
Elasticsearch test that checks the snapshot repositories

Change-Id: I77ebb1af7ee648cc9787665bfb81dfbb1a30663a
2019-04-10 13:59:08 +00:00
RAHUL KHIYANI
f667804430 elasticsearch-exporter: Add security context for exporter pod/container
This adds the security context snippet for the elasticsearch
prometheus exporter container to set allowPrivilegeEscalation to false
and readOnlyRootFilesystem to true

Change-Id: Ia80aa9cfc837073fae0a884de5245764147d7ded
2019-04-01 22:56:56 +00:00
Steve Wilkerson
8193542c98 Elasticsearch: Add job to wait for Elasticsearch cluster formation
This adds a job that will query the Elasticsearch HTTP cat API to
determine whether the desired number of nodes have been discovered
via the Zen discovery mechanism to be included in the cluster.
This aims to address issues seen when upgrading Elasticsearch,
where the snapshot repository job may trigger due to endpoints
from older pods being present. This new job will be the dependency
required by the snapshot repository job to ensure the ES cluster
has the desired number of nodes before attempting to register a
snapshot repository or interact with the cluster

Change-Id: I94fbbfdec7ca66d04acca9558e56dca3b2bc7d52
2019-04-01 13:50:11 -05:00
Steve Wilkerson
f008379c8e Elasticsearch: Update dependencies for components
This updates the dependencies for the Elasticsearch chart to be
more cautious before proceeding. For example, this updates the
dependencies for the register snapshot job to wait until all
ES components have registered endpoints, and also updates the helm
test pod to wait for all components to have registered endpoints
and the snapshot job to have completed

Change-Id: Ie4e92bba4ae33b33cadb921bdda91ceb813e29e1
2019-03-21 13:41:29 -05: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
05e57f4e37 Elasticsearch: Remove insertion of test data in helm tests
This removes the insertion of test dummy data and the following
query for it from the Elasticsearch helm tests.  Upon upgrades,
it's possible for Elasticsearch to refuse the direct insertion of
data due to shard reallocation and due to full bulk endpoint
queues. These refusals should not be seen as test failures

Change-Id: Id53d53a7aa2b58e64932d50ca3e7a4fb1141bb3a
2019-03-20 12:06:57 -05:00
Zuul
e1b729e660 Merge "Elasticsearch: Update locations for apache virtual host" 2019-03-15 06:32:51 +00:00
Zuul
43ae215ca9 Merge "Elasticsearch: Add check to job for registering snapshot repo" 2019-03-07 20:19:57 +00:00
Rahul Khiyani
ab86685bea readOnlyFilesystem: true for elasticsearch chart
Fix for adding readOnlyFilesystem flag at pod
level

Change-Id: Ife8d2b5ea02b4734ee4a83e868e16831e5f2b23f
2019-03-07 17:13:08 +00:00
Steve Wilkerson
f361fd6477 Elasticsearch: Add check to job for registering snapshot repo
This updates the script used to register the elasticsearch
snapshot repositories. It will first gather a list of all
currently registered repositories, then check for the existence
of each configured repository.  If the repository exists, the job
will not attempt to register the repository again. If it doesn't
exist, the job will then register the desired repository

Change-Id: I2cfd3c44f1b2b4a54c9b07be79c2c87af77c540e
2019-03-06 03:09:27 +00:00
Steve Wilkerson
b2db75d3e8 Elasticsearch: Update locations for apache virtual host
This begins to break out the various location paths for the
Elasticsearch apache-proxy virtual host.  These include:

- Deny all access to the update document api
- Deny all access to the update by query api
- Deny all access to the delete by query api
- Prohibit the DELETE method on all document api endpoints

This helps ensure that documents can't be updated or deleted once
indexed into Elasticsearch

Change-Id: Iaa97a9f7699a47d13c25b9e2e4249c37c29e4559
2019-03-06 03:09:02 +00:00
Luna Das
ae24ce9999 Add default-docker (enforce) AppArmor profile to Elasticsearch
Change-Id: I86930ee90170385008d5c674eab34d7c0e34e6e4
2019-01-01 08:12:56 -05:00
Steve Wilkerson
4c0fd492ee Update logging format and config for apache reverse proxies
This updates the logging format and configuration for the apache
reverse proxies used for elasticsearch, kibana, nagios and
prometheus to enable logging of the remote clients used to access
these services

Change-Id: Id07e4294ea18203fbb890b78424a232c2d59cb82
2019-02-25 09:21:41 -06:00
Pete Birley
6ea6a85198 Ceph: Update default to use OSH image
This PS udpates the default image in the chart to the latest OSH image.

Change-Id: Ib8d2a72ad48049fe02560dc4405f0088890b6f64
Signed-off-by: Pete Birley <pete@port.direct>
2019-02-01 21:25:13 +00:00
Steve Wilkerson
290df62223 Elasticsearch: Update image for s3 bucket creation
This updates the Elasticsearch image used for s3 bucket creation
to use the same ceph daemon image used in the ceph-rgw chart now
that the Mimic release is supported

Change-Id: I416a283b8ac41f6b360d20aac1be8374c07badcd
2019-01-07 13:51:55 -06:00
Zuul
632742b5f7 Merge "Remove unused pod-etc-apache volumes" 2019-01-07 19:40:20 +00:00
Zuul
5347636108 Merge "Elasticsearch: Add security context for exporter pod/container" 2019-01-07 16:26:08 +00:00
Steve Wilkerson
8180635733 Helm-toolkit: Update job for creating s3 buckets
This updates the helm-toolkit manifest template and scipts for
creating an S3 bucket and linking it to a user. This moves away
from the previous python implementation that used rgwadmin, and
instead uses s3cmd for a cleaner approach that can support more
recent versions of ceph

Change-Id: I305062a5daa063bfe21a12448d7a3957bca00bf4
2019-01-05 14:37:47 +00:00
Steve Wilkerson
30d2cf00d4 Remove unused pod-etc-apache volumes
This removes unused pod-etc-apache volumes from the charts that
use an apache sidecar container as a reverse proxy.

Change-Id: Ibafff3b53f9d3c20f5aed30d40ee6470cb515a8a
2019-01-04 10:31:35 -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
Steve Wilkerson
0679ed49bd Elasticsearch: Add security context for exporter pod/container
This adds the security context snippet for the elasticsearch
prometheus exporter pod. This changes the pod's user from root to
the nobody user instead

This also adds the container security context to explicitly set
allowPrivilegeEscalation to false

Change-Id: If692fccaf4dd362b28fecb4656036289a3a97122
2019-01-03 16:12:17 -06: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
Zuul
d984f3c782 Merge "Elasticsearch: Define success criteria for adding snapshot repo" 2018-12-12 23:23:48 +00:00
Steve Wilkerson
7be42d3cd5 Elasticsearch: Define success criteria for adding snapshot repo
This adds a simple check to the Elasticsearch snapshot repo job
that will cause the job to fail if the repository isn't added
successfully

Change-Id: I9dca6ef545b43c52a37542319fa2f706b174c44b
2018-12-12 14:44:49 -06:00
Steve Wilkerson
d3e046d803 Elasticsearch: Update helm test
This updates the Elasticsearch helm test to execute a clean on the
test index before attempting to create it, in cases where a
stranded test index may exist

Change-Id: I87533f94f6ea55b0b2f929543f8d3e75baa81bed
2018-12-12 12:43:13 -06:00
Steve Wilkerson
00f6a4a9c1 Elasticsearch: Remove default Curator action configuration
This removes the default Curator action configuration. As these
values will potentially be merged with any supplied overrides, it
could result in undesirable behavior. As a result, we should leave
the existing defaults commented out as a reference instead.

Change-Id: Idaf1dc8f3e476f1189058b69b841588a15deb7cd
2018-12-10 14:06:35 +00:00
Steve Wilkerson
4c29bafcbc Gates: Update fluent-logging/elasticsearch configurations
This updates the fluentd buffer output configurations to account
for the restraints of the jobs deploying fluentd. This also
renames the fluentd configuration key from td_agent to fluentd to
reflect the fact we're no longer deploying td-agent

This also updates the Elasticsearch default replicas and overrides
the replica counts in each Elasticsearch deployment to account for
resource constraints

Change-Id: I55dee410eced99c3e1645f7452e4306ad646e601
2018-10-19 17:30:08 +00:00
Steve Wilkerson
92717bdc72 Ceph: Remove fluentbit sidecars, mount hostpath for logs
This removes the fluentbit sidecars from the ceph-mon and ceph-osd
charts. Instead, we mount /var/log/ceph as a hostpath, and use the
fluentbit daemonset to target the mounted log files instead

This also updates the fluentd configuration to better handle the
correct configuration type for flush_interval (time vs int), as
well as updates the fluentd elasticsearch output values to help
address the gate failures resulting from the Elasticsearch bulk
endpoints failing

Change-Id: If3f2ff6371f267ed72379de25ff463079ba4cddc
2018-10-17 11:05:03 -05: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
Steve Wilkerson
c7cbb9f4dd Charts: Update heat image used for jobs and helm tests
This changes the image used for various jobs and helm tests in the
osh-infra charts. This replaces the kolla heat image with the loci
based heat image used for jobs and helm tests in openstack-helm in
order to drive consistency

Change-Id: Ie9deedadb7507282fe62723ec4641dd508040364
2018-10-11 14:47:58 -05:00
Zuul
e231a7c5fd Merge "Elasticsearch: Update log4j2 configuration settings" 2018-10-10 19:23:47 +00:00
Zuul
922d7d3d26 Merge "Charts: Update helm test pod templates" 2018-10-10 06:00:44 +00:00
Zuul
9f63330f0b Merge "Add missing labels to cronJobs" 2018-10-09 21:49:41 +00:00
Steve Wilkerson
bfa237d347 Charts: Update helm test pod templates
This updates the helm test pod templates in the charts with helm
tests defined. This change includes the addition of:

- Generate test pod cluster roles and role bindings
- Generate service accounts for test pods
- Add node selectors to the test pods
- Add service accounts to the test pods
- Addition of entrypoint container to the test pods
- Indentation fix for rabbitmq test pod template

Change-Id: I9a0dd8a1a87bfe5eaf1362e92b37bc004f9c2cdb
2018-10-09 21:00:00 +00:00
Mike Pham
0ad481d9c6 Add missing labels to cronJobs
This PS adds the missing labels so it is able to target by the network policy.

Change-Id: I5da7e0a9b17d00a5e98488780d72c77a93af999f
2018-10-09 13:58:17 -04:00
Steve Wilkerson
30f339a080 Elasticsearch: Add node selector to Curator cron job
This adds the node selector key and value configuration to the
Curator cron job for Elasticsearch, as it was previously omitted

Change-Id: Id702007fa827a1e1f90dee9b2a855e4197f4567c
2018-10-09 11:01:41 -05:00
Steve Wilkerson
1f4a890343 Elasticsearch: Update log4j2 configuration settings
This updates the configuration settings used for the log4j2
template for Elasticsearch. The previous settings weren't
compatible with the version of Elasticsearch currently being used
(5.6.4)

Change-Id: Id4b02ad022c46d599ae02ef77bb0f81f7e62c9e4
2018-10-09 08:01:39 -05:00
Steve Wilkerson
a084769410 Elasticsearch S3 repo
This ps adds the ability to use the ceph radosgw s3 api for
snapshot repositories. It removes the ability to use a RWM pvc, as
the radosgw solution provides a more robust approach for storing
index snapshots

Change-Id: Ie56ac41ccdc61bfadcac52b400cceb35403e9fae
2018-09-19 15:53:21 -05:00
Zuul
a98b14d541 Merge "Elasticsearch: Add ingress, remove node ports" 2018-09-19 02:57:09 +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
Steve Wilkerson
cd88fc44fc Elasticsearch: Add ingress, remove node ports
This adds an ingress to the Elasticsearch chart, allowing for the
exposure of the Elasticsearch cluster externally if required.

This also removes the node ports from the data and discovery
services, as these ports should not be used beyond service
discovery by the elasticsearch nodes. It moves the node port for
the client service under the network.elasticsearch key to match
the network tree for the other services

Change-Id: Ia989eff87b8c9f112c697ae309bbb971dc699aa5
2018-09-04 14:19:13 +00:00