Commit Graph

120 Commits

Author SHA1 Message Date
Ritchie, Frank (fr801x) d097c3bf24 Fix typo in selenium test
For selenium v3 the proper syntax is

link = browser.find_element_by_link_text(link_name)

not

 link = browser.find_element_by_text_link(link_name)

Change-Id: I9f6062bae5caaa840208e90e8f29b63bf52d113b
2023-08-25 14:34:48 -04:00
Ritchie, Frank (fr801x) e325bd6bcb Make selenium tests backwards compatible
Make using pre-selenium v4 syntax an option. See:

https: //review.opendev.org/c/openstack/openstack-helm-infra/+/883894/5/nagios/templates/bin/_selenium-tests.py.tpl
Change-Id: I982029e620d944458ac0a4670189534023a6f972
2023-08-24 17:07:17 -04:00
Ritchie, Frank (fr801x) fbeb69e3b2 Use helm toolkit for readiness probes
Use helm toolkit template for readiness probes.

Change-Id: Ibcaf0deec74e3607d441b1d153fa54196e745981
2023-08-22 16:17:57 -04:00
astebenkova 92d16f3a29 [osh-selenium] Upgrade image to latest-ubuntu_focal
+ migrate all Python tests to use Selenium v4 (bionic image had v3 installed):
https://www.selenium.dev/documentation/webdriver/getting_started/upgrade_to_selenium_4/
+ amend selenium role in order to install ChromeDriver compatible with Google Chrome:
https://chromedriver.chromium.org/downloads/version-selection
+ run selenium tests AFTER the charts are deployed

Change-Id: I46200b7dc173bd0e1e6bf3545d9a26c252a21927
2023-05-23 18:09:16 +03: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
Andrii Ostapenko 092e295a67
Move to bionic nagios image
Change-Id: I0dd1f739ea4225dc56dc5bfd1fdafd872c8e4b73
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2021-10-27 11:38:56 -06: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
Gupta, Sangeet (sg774j) 7057def52b Nagios: Mount internal TLS CA certificate
Mounted internal TLS CA certificate to be able to communicate with
prometheus and elasticsearch.

Change-Id: I1fc5e1e7c46a95f50487eea5924a13bdcad51b51
2021-06-29 13:23:55 +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
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
KHIYANI, RAHUL (rk0850) cf131bacb2 Add missing security context template to nagios init container
This change adds security context template at container level
to implement readOnly-fs flag

Change-Id: Ibd4f8a916bcd74c1d89aa360e89d4477cd01d367
2020-08-05 10:29:30 -05:00
Andrii Ostapenko ed1cc58de0 Unpin nagios, osh-selenium and heat images for grafana and nagios
Change-Id: I28a314da6e08f5555b7e68a4ad9f8c1802fde9ca
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-07-22 15:10:22 +00: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
Singh, Jasvinder (js581j) fd8cdb66af Updating nagios cluster role for rbd monitoring
This patchset is required for the patch set https://review.opendev.org/#/c/737629.
The kuberntes python api requires these permissions, for this script to work properly.

Change-Id: I69f2ca40ab6068295a4cb2d85073183ca348af1e
2020-06-23 17:59:17 -04: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 dfb32ccf60 Enable yamllint rules for templates
- braces
- brackets
- colons
- commas
- comments
- comments-indentation
- document-start
- hyphens
- indentation

With corresponding code changes.

Also idempotency fix for lint script.

Change-Id: Ibe5281cbb4ad7970e92f3d1f921abb1efc89dc3b
2020-06-17 13:13:53 -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
diwakar thyagaraj 163c5aa780 Enable Apparmor to all osh-infra test pods
Also Changed container names to static.

Change-Id: I51f53b480d18aaa38a9707429f01052ee122e7e9
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
2020-05-19 15:36:07 +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
Zuul f0e3ce9a08 Merge "Add ability to set the domain name in the Nagios chart" 2020-03-17 17:52:47 +00:00
Meg Heisler 3b7227b393 Add ability to set the domain name in the Nagios chart
This allows the ability to set the domain name in the
Nagios deployment. This change goes along with a change
to imageswhich will allow the ability to append the
domain name to the host name in Nagios so the full
FQDN appears in the dashboard.

Change-Id: I512112921111e49345f19dfca70406b56dd55452
2020-03-17 08:33:35 -05:00
dt241s@att.com 920bddde64 Enable Apparmor to nagios
Change-Id: I5927d32903cabd93b9d78c0c47994a94162deb1c
2020-02-28 13:31:50 +00:00
Zuul 75474c01b8 Merge "Address bandit gate failures" 2020-02-18 17:35:45 +00:00
Steven Fitzpatrick f37865d6a0 Prometheus: Ceph Alerts Scalar/Vector Conversion
This change updates the prometheus alerting rules to use ranged vectors
in their expressions, to avoid situations wher missed scrapes would
cause scalar metrics to "go stale" - resetting the alert timer.

Only the ceph alerts are affected by this change.

Change-Id: Ib47866d12616aaa808e6a09c58aa4352e338a152
Co-Authored-By: Meghan Heisler <mkheisler93@gmail.com>
2020-02-11 15:14:35 +00:00
Gage Hugo 86e56b2aee Address bandit gate failures
This change addresses the results that were found when running
bandit against the templated python files in the various charts.

This also makes the bandit gate only run when python template
files are changed as well as makes the job voting.

Change-Id: Ia158f5f9d6d791872568dafe8bce69575fece5aa
2020-02-04 15:33:17 -06:00
Zuul cc399a08ed Merge "Fix incorrect prometheus alert names in nagios" 2020-01-15 23:43:05 +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
Steven Fitzpatrick 4fdcff593c Fix incorrect prometheus alert names in nagios
I noticed a some nagios service checks were checking prometheus
alerts which did not exist in our default prometheus configuration.
In one case a prometheus alert did not match the naming convention
of similar alerts.

One nagios service check, ceph_monitor_clock_skew_high, does not
have a corresponding alert  at all, so I've changed it to check the

node_ntmp_clock_skew_high

alert, where a node has the label ceph-mon="enabled".

Change-Id: I2ebf9a4954190b8e2caefc8a61270e28bf24d9fa
2020-01-03 10:30:08 -06:00
Zuul 9632d8719f Merge "Nagios: Add support for arbitrary object definitions via overrides" 2019-12-03 21:09:55 +00:00
Steve Wilkerson 6c4404ee4d Nagios: Disable Nagios page tours by default
This disables the Nagios page tours option. This option is enabled
by default, which results in a youtube video being overlaid on
each Nagios page.

Change-Id: Ifd80a8d122dcbe145315b37753a72e1309e1d210
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-12-03 14:48:41 +00:00
Steve Wilkerson 6f7790e451 Nagios: Add support for arbitrary object definitions via overrides
This adds support for arbitrary object definitions via the conf
key in the Nagios chart. This allows for customizing the
definitions required by different deployment targets instead of
assuming all nagios deployments are monitoring and targeting the
same hosts and executing the same service checks and commands.

This also adds reference overrides to the chart for elasticsearch,
postgresql, and openstack nagios objects that are deployed in the
single and multinode jobs here

Change-Id: I6475ca980447591b5b691220eb841a2ab958e854
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-12-02 13:46:20 +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
Zuul be29dd6fb6 Merge "Fxing lint errors for Helm 2.16" 2019-11-14 17:33:35 +00:00
Steve Wilkerson 59dac085ce Nagios: Update ceph health check command
This updates the ceph health check command in Nagios to use the
updated plugin that determines the active ceph-mgr instance
endpoint to use before querying for ceph's health. This results in
more robust and reliable reporting of ceph's overall health

Depends-On: https://review.opendev.org/#/c/693900/

Change-Id: I5eeb076e5af3c820dbdcc3cc321cefcb5f85ef8d
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-11-13 08:51:26 -06: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
Steven Fitzpatrick 1971d23da8 Make corrections to pod lifecycle upgrade values
It was observed in some charts' values.yaml that the values defining
lifecycle upgrade parameters were incorrectly placed.

This change aims to correct these instances by adding a deployment-
type subkey corresponding with the deployment types identified in
the chart's templates dir, and indenting the values appropriately.

Change-Id: Id5437b1eeaf6e71472520f1fee91028c9b6bfdd3
2019-10-31 20:34:07 +00:00
Steven Fitzpatrick b3d2a178ad Update Nagios Helm test to use python3
This change updates the selenium_tests container image
to one which installs python3.

The selenium-test.py template file has been refactored
to match the structure of the selenium tests in
/tools/gate/selenium

Depends On: https://review.opendev.org/688436
Change-Id: I49e0cfd05f27f868864a98e8e68ffe79e28c0f03
2019-10-18 13:31:29 +00:00
Steve Wilkerson d52fd14373 Use internal endpoint lookups for selenium helm tests
This updates the grafana and nagios helm test pod templates to
use the internal endpoints for their selenium tests instead of the
public endpoints when defined

Change-Id: I1138cb29a808894d3339bc1b07c3a60804b9546f
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-08-28 15:06:55 -05:00
RAHUL KHIYANI ac65a37b0b Nagios – API Handling – HTTP Security Headers Not Present
Added new X-Content-Type-Options: nosniff header to make sure the browser
does not try to detect a different Content-Type than what is actually
sent (can lead to XSS)

Added new X-Frame-Options: sameorigin header to protect against
drag and drop clickjacking attacks in older browsers

Added new Content-Security-Policy: script-src self for implementation

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: Ic79bbb96484a7f1a497c001883783338fd26a47a
2019-08-07 19:08:48 +00:00
Pai, Radhika (rp592h) 47565d2d19 Nagios: Updated the alert for Ceph OSD Down
Earlier the Nagios alert monitor was percent based as in when the percent of OSD
down is greater than 80, it will send alert.
>check_prom_alert!ceph_osd_down_pct_high!CRITICAL- CEPH OSDs down is
more than 80 percent!OK- CEPH OSDs down is less than 80 percent

Updated the code in nagios values.yaml to send alert when even 1 OSD is
down:
>check_prom_alert!ceph_osd_down!CRITICAL- One or more CEPH OSDs are down
>for more than 5 minutes!OK- All the CEPH OSDs are up

Change-Id: Id24c4a0cca64674890dae3599edc0c90d9534e90
2019-07-19 19:25:53 +00:00
Steve Wilkerson cb35bd1616 Nagios: Add init container for generating hosts
This updates the Nagios chart to include an init container for
generating the host and host group definitions Nagios requires to
function. The benefit is that Nagios does not need to constantly
attempt to update its host and host group definitions, which
currently triggers a restart of the Nagios service even in cases
where the host file hasn't changed.  With the introduction of an
init container for handling this, we can also remove the service
check definition and command definition for executing the plugin
at periodic intervals

Depends-On: https://review.opendev.org/668197

Change-Id: Id1d63d8c99850b960eb352361d7796162bd6be2f
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-07-02 15:48:12 +00:00
Steve Wilkerson b2415bf023 Nagios: Update Nagios image, check_prometheus_hosts command
This updates the Nagios image used to the image that is built
out of openstack-helm-images instead of the image hosted in quay.

This new image includes the updated host definition plugin that
uses the kubernetes python client instead of prometheus queries,
so the check_prometheus_hosts command has also been updated to
reflect the change in required arguments

Change-Id: If3440ca9be3227fc48cd698a7d44501e6747bb1e
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-07-02 15:47:39 +00:00
Steve Wilkerson b4b1dd9528 Add missing affinity keys to chart pod specs
This adds the affinity key to the pod spec for the grafana,
nagios, kube-state-metrics, and openstack-exporter charts as it
was previously missed

Change-Id: Ifefa88d7f33607b4d595effa5fbf72f3387e5081
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-06-13 19:15:42 +00:00
Zuul 0714b9d7ae Merge "Nagios: Use helm-toolkit template renderer for config files" 2019-06-10 16:09:53 +00:00
Steve Wilkerson 40769d5a60 Nagios: Add Selenium tests via helm test pod
This adds selenium tests for the Nagios chart via a helm test
pod to help ensure the Nagios deployment is functional and
accessible

Change-Id: I44f30fbac274546abadba0290de029ed2b9d1958
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-06-06 19:35:59 +00:00
Steve Wilkerson d72299db4b Nagios: Use helm-toolkit template renderer for config files
This updates the Nagios chart to use the helm-toolkit template
renderer snippet for generating the Nagios configuration files.
This was done to make the exposure of the configuration files
simpler for those who are more familiar with traditional Nagios
configuration files, as well as allowing for values overrides for
adding custom host names or custom object definitions to nagios
objects (as Nagios doesn't easily allow for this via environment
accessible macros).

Change-Id: I84d5c83d84d6438af5f3ab57997e80e8b1fc8312
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-06-06 19:35:32 +00:00
caoyuan 040edeb79a Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I0e3af4a3385f5b2a7705bc19b775863b16c2e08e
2019-05-31 01:52:10 +00:00
Meg Heisler e1f2a3cf78 Fix broken network policy check/gate
This adds a basic egress policy to the charts run by the
network-policy check. A change was recently merged requiring
the eggress tag to be in the chart but did not add it, this
addresses that

Change-Id: I60669c9351db7854cba8c69723eb783a966d2a56
2019-05-10 05:55:22 +00:00