Commit Graph

34 Commits

Author SHA1 Message Date
Gage Hugo ee0201bd7d Remove sonobuoy chart
This change removes the sonobuoy chart from openstack-helm-addons.

Change-Id: Ic9a48f2082c1aa602d903d22f42c1724fd4aec73
2021-06-24 10:51:18 -05:00
Andrii Ostapenko b6a94835a3
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: I6e0a3b301392e82231a2081859ca4d380a0138d8
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-09-29 13:12:55 -05:00
okozachenko 0945d57d27 Fix chart lint errors
Change-Id: Ifda0b64f7319f0885568a8848ee809af7b581014
2020-09-16 21:07:10 +03:00
Tin Lam c6e0daae8f fix(interface): makes the interface public
Changes the interface from the default (internal) to public.

Change-Id: I0862d7263dcb60b358f865002dc974d55deabee5
Signed-off-by: Tin Lam <tin@irrational.io>
2020-08-18 16:10:54 -05:00
Tin Lam e3ddb0b770 fix(ep): changes keystone endpoint
This patch set updates the endpoint from the internal to the public
endpoints for keystone-related processing.

Change-Id: Id792cba5a7227a63dfbd38035d98110da74efdc9
Signed-off-by: Tin Lam <tin@irrational.io>
2020-08-17 11:37:31 -05:00
Andrii Ostapenko 815deeaa2e Enable templates linting
- braces
- brackets
- colons
- commas
- comments
- hyphens
- indentation
- key-duplicates

with corresponding code changes.

Also disable document-(start|end) rule.

* 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.

Depends-On: https://review.opendev.org/739600
Change-Id: Ide884ed541898db2ba21a863aff0cea9ec3f75dd
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-07-13 17:28:42 +00:00
DODDA, PRATEEK REDDY 44f2de10b1 Add missing security context to Sonobuoy pods/containers
This updates the sonobuoy chart to include the pod
security context on the pod template.

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

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

Change-Id: I0964c9809402635c9a7049b61fb954a4ebf01bb1
2020-07-08 22:48:26 +00:00
dt241s@att.com 768722b1cf Enable Apparmor to Components in Addons
1)Added Apparmor Script andimoved apparmor configurations
to values-overrides to enable optional experimental Jobs.

2)Added Apparmor to mini-mirror,ranger,ranger-agent
 and sonobuy Components.

3)Moved apparmot
Change-Id: I9772d8425aa3d46e1fb0e1a6962ea999e77a6655
2020-06-17 19:30:06 +00:00
Andrii Ostapenko 4254e9a3ef Enable yamllint rules
- comments-indentation
- document-end
- document-start
- empty-lines
- new-line-at-end-of-file
- new-lines
- octal-values

Change-Id: I9cf4b60ee920b092c56cc54f331b6130955f93b8
2020-06-01 09:33:01 -05:00
Andrii Ostapenko c47a2b63c2 Enable yamllint checks
- brackets
- braces
- colon
- commas
- comments
- key-duplicates

with corresponding code adjustment.

Also removes x flag from yamls for ranger and ranger-agent charts.

Change-Id: I156b991ba6e17b6f9e1f128295362c0675afd8cc
2020-05-21 10:46:13 -05:00
Zuul 67c2dc7bfa Merge "Remove OSH Authors copyright" 2020-03-20 04:44:49 +00:00
Dustin Specker 2012efb64f sonobuoy: add role-exec
This role enables the readonly serviceaccount to additionally perform
pod/exec within the configured namespace.

Some organizations deploy pods in a particular namespace in Kubernetes
that have a locked down user/CLI that allows examining resources with
readonly access (to prevent any modifications, etc.). This change
enables the Sonobuoy plugins to leverage these pods by executing into
them.

Change-Id: I781248fdd251e7fca31e0ab831326a9f475392cd
2020-03-05 13:03:34 -06:00
Gage Hugo 09b6e52c32 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: I631ae4345f18fee70b380867ba8b33af5e3b3254
2020-03-02 14:01:56 -06:00
Dustin Specker 81c53caf73 sonobuoy: fix conf.sonobuoy.Version to match real version
This value was left at the old v0.11.4, but Sonobuoy was updated to
v0.16.4 [1]. This doesn't seem to impact anything, but could cause
confusion.

1 - https://review.opendev.org/#/c/695944/

Change-Id: Ifb230b55662ee5deadb91b6b7508f45773427401
2020-03-02 13:19:29 -06:00
Dustin Specker b60acc3307 sonobuoy: update to v0.16.4
v0.16.* supports Kubernetes 1.16.* [1]

v0.16.4 [2] prevents Sonobuoy considering a Node in "error" immediately
when an `ErrImagePull` or `ImagePullBackOff`. Instead, Sonobuoy gives
the pod 5 minutes to recover from this.

There are times when a Kubernetes cluster receives a timeout from the
Docker daemon when pulling images. This update will prevent a temporary
network issue from failing the Node immediately.

Also, new Sonobuoy images are published to docker.io instead of gcr.io.

[1] - https://github.com/vmware-tanzu/sonobuoy/releases/tag/v0.16.0
[2] - https://github.com/vmware-tanzu/sonobuoy/releases/tag/v0.16.4

Change-Id: I0c30ade1824cab297fe5b27944747a8607bef25c
2019-11-25 15:23:45 -06:00
Steve Wilkerson d6309100d7 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

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

Change-Id: I7f48605f08f574822179d51cd645ded07714d9c3
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-11-11 07:34:30 +00:00
Dustin Specker f6537ed4f8 sonobuoy: update image to v0.15.3
Change-Id: I4af38d826fb1111d8bc6f0b5170fb1974f96ce86
2019-10-17 02:33:28 +00:00
Drew Walters 32888e88fa sonobuoy: Support storing results on host
Currently, results are stored using an emptyDir volume. This change adds
support for storing results using a customizable hostPath. When storing
results in a hostPath, results can still be obtained form the hostPath
while result publishing is disabled.

Change-Id: Ibd01da23a8e74a54f500429cf0ba8ca72f2ac77d
2019-07-01 16:11:01 +00:00
Dustin Specker d0100055af fix(sonobuoy): only add apparmor for results-publisher when publishing
Before, if conf.publish_results was false then Helm would fail to
install the Sonobuoy chart because the apparmor annotation was being
added for the results-publisher container, but the container didn't
actually exist because it was disabled.

Now, the apparmor annotation is only included for the results-publisher
container when conf.publish_results is true.

Change-Id: I731b7d03c9699db0fcab61439479796617ebff2a
2019-06-19 16:30:55 -05:00
Dustin Specker 845fa7d686 Sonobuoy: add apparmor profile for sonobuoy pod
Change-Id: Ib533c1ea01bc5b10275c3c7416eab72db4496bf2
2019-06-12 13:27:26 +00:00
Zuul 0d1d2417ea Merge "Point to OSH-images images" 2019-05-26 10:16:58 +00:00
Jean-Philippe Evrard 87f30975b9 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-addons.

This should fix it.

Change-Id: I23d69b56e6de4f0f76d6031b301e81a294ddcc50
2019-05-13 11:20:51 +02:00
Bryan Strassner bade4e06ce Add Sonobuoy plugin config from yaml
Adds a yaml path for providing additional yaml that will be stored in a
secret and provided to the plugin. Values can be added to plugin_values
that will result in being needed configuration and expected values
for tests. Utilizes the extra-volumes functionality as described [0]

[0]: https://github.com/heptio/sonobuoy/blob/master/docs/plugins.md#writing-your-own-plugin

Change-Id: I41d9bc02c8c0154903366a4cdcd287b95ea9707a
2019-05-10 17:25:55 +00:00
caoyuan 77abfeb526 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ie7dccec5b2a7acd257f3385a3ba18c024baca21a
2019-04-23 17:01:36 +00:00
Dustin Specker 8c614d4ffd Sonobuoy: allow multiple simultaneous chart installations
Manually set Namespace for Sonobuoy's config.json.

Sonobuoy's bug forcing heptio-sonobuoy namespace [1] usage only does not
impact this Helm chart because the config.json is directly controlled
by the `values.yaml` and not Sonobuoy's CLI.

Now multiple instances of this chart may exist at once by specifying
unique namespaces at helm install time.

Modify Sonobuoy test script to install two instances of Sonobuoy Helm
chart. Also install readonly serviceaccount to verify it will work with
more than one instance simultaneously.

[1] https://github.com/heptio/sonobuoy/issues/420

Change-Id: I6d4ecfb812a4312af13abf1e265de495e27967f9
2019-02-26 14:23:36 +00:00
Dustin Specker df0aec7976 add post-upgrade hook and deletion policy to readonly SA token secret
Before, the secret was not getting installed when upgrading from a
previous version of this chart without the secret. On clean install it
was working.

Now, with the addition of the post-upgrade hook this chart will install
the secret correctly when upgrading from a previous version without this
secret.

The deletion policy is required for sequential upgrades. Tiller
does not keep track of resources installed via post-{install,upgrade}
hooks, this causes an "Already exists" error when upgrading without this
hook. With this hook, the secret will be deleted before upgrading,
which will then install this resource.


Change-Id: Ia3af5af8bcf28cae3ad31f427068a025a5a4c7fd
2019-01-28 20:28:22 +00:00
Dustin Specker 1765e62acb Add readonly ServiceAccount in Sonobuoy chart
Using this readonly ServiceAccount enables plugins
to use a Kubernetes client with different permissions
than the Sonobuoy ServiceAccount, which has full
permissions on the cluster.

This ServiceAccount enables get/list/watch on all resource types in all
API groups.

The reason the secret is used to mount the service account token because
there is not a way to specify a service account from just a container
spec [1]. Sonobuoy doesn't provide access to the pod spec for plugins,
so we are limited to the container spec.

[1] https://github.com/kubernetes/kubernetes/issues/66020

Change-Id: I69aeaaedf1fb7672f7167c83b220cf6abb890cb5
2019-01-22 14:26:05 +00:00
Dustin Specker fa705f1aaa make publishing Sonobuoy results optional
This change enables operators to disable results publishing where Swift
and Ceph may not be setup.

This configuration option does not prevent deploying other resources
such as ks-user. The operator will want to disable those via the
`manifests` dictionary in `values.yaml`.

Change-Id: I00be7d51309889fcaf3b2a9756e38dcf49c31312
2019-01-03 18:54:09 +00:00
Dustin Specker 5559878087 Store Sonobuoy results in Ceph
This enables persistently storing Sonobuoy tests results tarball
in Ceph (authed with Keystone).

1. Adds job-ks-user and secrety-keystone to create Sonobuoy user in
Keystone
2. Sonobuoy pod has a results-publisher container that waits for
Sonobuoy container to populate test results directory with the tarball
3. results-publisher container creates Swift container for Sonobuoy
results
4. results-publisher adds Sonobuoy test results to Swift container
5. results-publisher sets expiry date on the object to be deleted
after 30 days

Change-Id: Ic2d9fb345dce1101040e60113564e7ecdb2c51ea
2018-11-09 19:25:08 +00:00
Zuul beee7494c2 Merge "Fix setting WorkerImage in Sonobuoy's secret-etc" 2018-11-05 16:09:41 +00:00
Dustin Specker 69f4313701 Fix setting WorkerImage in Sonobuoy's secret-etc
This became out of sync after the re-order of values.yaml.

Change-Id: I9494eaf8f121b07c40cc96807808305384cc3544
2018-11-02 15:40:00 -05:00
Dustin Specker 58208263ee Prevent appending \n in Sonobuoy's secret-etc
It's presumed that some versions of Kubernetes do not handle this,
which is why the experimental job is still working.

Change-Id: If3a712cca278e02908cf9be8dfefa75a782bac09
2018-11-02 15:37:02 -05:00
Dustin Specker 5a610a290d Reorder Sonobuoy's values.yaml to follow spec
The values.yaml functionality is the same, just reordered according
to the values ordering spec[1].

[1] https://docs.openstack.org/openstack-helm/latest/specs/values-ordering.html

Change-Id: If31867e7b75b126880f61a57ac11a437c3519663
2018-10-16 08:15:43 -05:00
Dustin Specker f823544adb Add Sonobuoy chart
This adds a Sonobuoy chart that only runs the systemd-logs plugin[1]. The
Sonobuoy pod (tests) are executed as a `helm test`.

This chart must be installed under the heptio-sonobuoy namespace[2]. A node
with the label selector specified in values.yaml (labels.api) must exist
for the Sonobuoy pod to even be created.

Also add an experimental job to test Sonobuoy chart.

[1] https://github.com/heptio/sonobuoy-plugin-systemd-logs
[2] https://github.com/heptio/sonobuoy/issues/420

Change-Id: I613fab635b97a70ac20820e1ececde48952ac2da
2018-10-03 10:52:21 -05:00