Skip to content

Commit a51e0e8

Browse files
Carlos Rodríguez HernándezBitnami Containers
Carlos Rodríguez Hernández
and
Bitnami Containers
authored
[bitnami/*] Fix markdown linter issues (#14874)
* [bitnami/*] Fix markdown linter issues Signed-off-by: Carlos Rodríguez Hernández <[email protected]> * Fix more issues Signed-off-by: Carlos Rodríguez Hernández <[email protected]> * Fix petetes Signed-off-by: Carlos Rodríguez Hernández <[email protected]> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <[email protected]> --------- Signed-off-by: Carlos Rodríguez Hernández <[email protected]> Signed-off-by: Bitnami Containers <[email protected]> Co-authored-by: Bitnami Containers <[email protected]>
1 parent f7f24d6 commit a51e0e8

File tree

108 files changed

+1690
-2478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1690
-2478
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
### Applicable issues
2626

2727
<!-- Enter any applicable Issues here (You can reference an issue using #) -->
28-
- fixes #
28+
- fixes #
2929

3030
### Additional information
3131

CODE_OF_CONDUCT.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ If you are subjected to or witness unacceptable behavior, or have any other conc
1212

1313
If you have suggestions to improve this Code of Conduct, please submit an issue or PR.
1414

15-
**Attribution**
15+
## Attribution
1616

17-
This Code of Conduct is adapted from the Angular project available at this page: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
17+
This Code of Conduct is adapted from the Angular project available at this page: <https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md>

CONTRIBUTING.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Any type of contribution is welcome; from new features, bug fixes, [tests](#test
1414
### Technical Requirements
1515

1616
When submitting a PR make sure that it:
17+
1718
- Must pass CI jobs for linting and test the changes on top of different k8s platforms. (Automatically done by the Bitnami CI/CD pipeline).
1819
- Must follow [Helm best practices](https://helm.sh/docs/chart_best_practices/).
1920
- Any change to a chart requires a version bump following [semver](https://semver.org/) principles. This is the version that is going to be merged in the GitHub repository, then our CI/CD system is going to publish in the Helm registry a new patch version including your changes and the latest images and dependencies.
@@ -32,14 +33,14 @@ If you set your `user.name` and `user.email` git configs, you can sign your comm
3233

3334
Note: If your git config information is set properly then viewing the `git log` information for your commit will look something like this:
3435

35-
```
36-
Author: Joe Smith <[email protected]>
37-
Date: Thu Feb 2 11:41:15 2018 -0800
36+
```text
37+
Author: Joe Smith <[email protected]>
38+
Date: Thu Feb 2 11:41:15 2018 -0800
3839

39-
Update README
40+
Update README
4041

41-
Signed-off-by: Joe Smith <[email protected]>
42-
```
42+
Signed-off-by: Joe Smith <[email protected]>
43+
```
4344

4445
Notice the `Author` and `Signed-off-by` lines match. If they don't your PR will be rejected by the automated DCO check.
4546

@@ -68,6 +69,7 @@ Notice the `Author` and `Signed-off-by` lines match. If they don't your PR will
6869
### Adding a new chart to the repository
6970

7071
There are three major technical requirements to add a new Helm chart to our catalog:
72+
7173
- The chart should use Bitnami based container images. If they don't exist, you can [open a GitHub issue](https://github.com/bitnami/charts/issues/new/choose) and we will work together to create them.
7274
- Follow the same structure/patterns that the rest of the Bitnami charts (you can find a basic scaffolding in the [`template` directory](https://github.com/bitnami/charts/tree/main/template)) and the [Best Practices for Creating Production-Ready Helm charts](https://docs.bitnami.com/tutorials/production-ready-charts/) guide.
7375
- Use an [OSI approved license](https://opensource.org/licenses) for all the software.

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Popular applications, provided by [Bitnami](https://bitnami.com), ready to launc
88
## TL;DR
99

1010
```bash
11-
$ helm repo add bitnami https://charts.bitnami.com/bitnami
12-
$ helm search repo bitnami
13-
$ helm install my-release bitnami/<chart>
11+
helm repo add bitnami https://charts.bitnami.com/bitnami
12+
helm search repo bitnami
13+
helm install my-release bitnami/<chart>
1414
```
1515

1616
![Installing a chart](demo.gif)
@@ -39,7 +39,6 @@ The quickest way to setup a Kubernetes cluster to install Bitnami Charts is foll
3939
- [Get Started with Bitnami Charts using the Azure Kubernetes Service (AKS)](https://docs.bitnami.com/kubernetes/get-started-aks/)
4040
- [Get Started with Bitnami Charts using the Amazon Elastic Container Service for Kubernetes (EKS)](https://docs.bitnami.com/kubernetes/get-started-eks/)
4141
- [Get Started with Bitnami Charts using the Google Kubernetes Engine (GKE)](https://docs.bitnami.com/kubernetes/get-started-gke/)
42-
- [Get Started with Bitnami Charts using the IBM Cloud Kubernetes Service (IKS)](https://docs.bitnami.com/kubernetes/get-started-charts-iks/)
4342

4443
For setting up Kubernetes on other cloud platforms or bare-metal servers refer to the Kubernetes [getting started guide](https://kubernetes.io/docs/getting-started-guides/).
4544

@@ -54,7 +53,7 @@ To install Helm, refer to the [Helm install guide](https://github.com/helm/helm#
5453
The following command allows you to download and install all the charts from this repository:
5554

5655
```bash
57-
$ helm repo add bitnami https://charts.bitnami.com/bitnami
56+
helm repo add bitnami https://charts.bitnami.com/bitnami
5857
```
5958

6059
> **_NOTE:_** It is important to note that the above mentioned repo is truncated so it only contains entries for the releases produced in the last 6 months. In case you need a full index, you can use it from the [archive-full-index branch](https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/index.yaml) in the bitnami/charts Github repository.
@@ -70,9 +69,10 @@ Once you have installed the Helm client, you can deploy a Bitnami Helm Chart int
7069
Please refer to the [Quick Start guide](https://helm.sh/docs/intro/quickstart/) if you wish to get running in just a few commands, otherwise the [Using Helm Guide](https://helm.sh/docs/intro/using_helm/) provides detailed instructions on how to use the Helm client to manage packages on your Kubernetes cluster.
7170

7271
Useful Helm Client Commands:
73-
* View available charts: `helm search repo`
74-
* Install a chart: `helm install my-release bitnami/<package-name>`
75-
* Upgrade your application: `helm upgrade`
72+
73+
- View available charts: `helm search repo`
74+
- Install a chart: `helm install my-release bitnami/<package-name>`
75+
- Upgrade your application: `helm upgrade`
7676

7777
## License
7878

@@ -82,7 +82,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
8282

8383
You may obtain a copy of the License at
8484

85-
http://www.apache.org/licenses/LICENSE-2.0
85+
<http://www.apache.org/licenses/LICENSE-2.0>
8686

8787
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8888
See the License for the specific language governing permissions and limitations under the License.

TESTING.md

+41-38
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@ In this section, we will discuss:
2020
* [Test types and tools](#test-types-and-tools)
2121
* [Generic acceptance criteria](#generic-acceptance-criteria)
2222
* [Cypress](#cypress)
23-
* [Run it locally](#run-it-locally)
24-
* [Useful information](#useful-information)
25-
* [Specific acceptance criteria](#specific-acceptance-criteria)
23+
* [Run Cypress locally](#run-cypress-locally)
24+
* [Useful Cypress information](#useful-cypress-information)
25+
* [Specific Cypress acceptance criteria](#specific-cypress-acceptance-criteria)
2626
* [Ginkgo](#ginkgo)
27-
* [Run it locally](#run-it-locally-1)
28-
* [Specific acceptance criteria](#specific-acceptance-criteria-1)
27+
* [Run Ginkgo locally](#run-ginkgo-locally)
28+
* [Useful Ginkgo information](#useful-ginkgo-information)
29+
* [Specific Ginkgo acceptance criteria](#specific-ginkgo-acceptance-criteria)
2930
* [GOSS](#goss)
30-
* [Run it locally](#run-it-locally-2)
31-
* [Useful information](#useful-information-1)
32-
* [Specific acceptance criteria](#specific-acceptance-criteria-2)
31+
* [Run GOSS locally](#run-goss-locally)
32+
* [Useful GOSS information](#useful-goss-information)
33+
* [Specific GOSS acceptance criteria](#specific-goss-acceptance-criteria)
3334

3435
## Where to find the tests
3536

@@ -123,10 +124,11 @@ Hence, tweaking the files allows to define different action policies depending o
123124
The general aim of the tests should be to verify the Chart package works as expected. As such, the focus IS NOT on the application OR the container images, which should be regarded as trustful components (i.e. they should have been respectively tested at a previous stage), but in the Chart itself and the different features it provides. It is expected though to assert the CORE functionality (or functionalities) of the application works, but checks defined in this repository should never aim to replace the official test suite.
124125

125126
Some examples on the suitability of tests for the `bitnami/wordpress` chart:
126-
* ✅ Creating a blog post (represents the CORE functionality of the asset)
127-
* ❌ Creating a comment in a post (far too specific, not useful)
128-
* ❌ Installing a plugin through the admin panel (far too specific, not useful)
129-
* ✅ Specifying a different UID using the `containerSecurityContext.runAsUser` in `values.yaml` and checking it (checks a feature intrinsic to the Chart)
127+
128+
* ✅ Creating a blog post (represents the CORE functionality of the asset)
129+
* ❌ Creating a comment in a post (far too specific, not useful)
130+
* ❌ Installing a plugin through the admin panel (far too specific, not useful)
131+
* ✅ Specifying a different UID using the `containerSecurityContext.runAsUser` in `values.yaml` and checking it (checks a feature intrinsic to the Chart)
130132

131133
The tests may be regarded as _deployment_ tests since their goal is to verify that the software is correctly deployed with all the inherent features. Both functional and non-functional characteristics are evaluated in these tests, focusing on the installation aspect.
132134

@@ -136,9 +138,9 @@ Before writing any test scenario, understand the primary purpose of the chart an
136138

137139
As Charts are usually composed of a number of different components, it is also essential to test their integrations and the Chart as a whole. As a general guideline, testing a `bitnami/chart` can be reduced to:
138140

139-
1. Identifying the components of the Chart and verifying their integration. *e.g. WordPress + MariaDB + PHP + Data Volume*
140-
1. Summarizing the main area features the asset offers and asserting the Chart delivers them. *e.g. Creating a post in a blog*
141-
1. Focusing on the unique features the Chart offers. *e.g. ConfigMaps, PVCs, Services, secrets, etc.*
141+
1. Identifying the components of the Chart and verifying their integration. _e.g. WordPress + MariaDB + PHP + Data Volume_
142+
1. Summarizing the main area features the asset offers and asserting the Chart delivers them. _e.g. Creating a post in a blog_
143+
1. Focusing on the unique features the Chart offers. _e.g. ConfigMaps, PVCs, Services, secrets, etc._
142144

143145
It is easily noticeable though that Charts are usually highly configurable artifacts. Through parameters exposed in `values.yaml`, it is fairly common to perform customizations that range from enabling simple features (e.g. exporting metrics to Prometheus) to complete changes in the architecture of the application that will be deployed (e.g. standalone vs. main-secondary replication in DBs). In order to cope with this high variability, we should:
144146

@@ -256,7 +258,7 @@ In order for VIB to execute Cypress tests, the following block of code needs to
256258

257259
> ℹ️❗️ Cypress tests needs the UI to be accessible from outside the K8s testing cluster. This means (in most cases) that the service of the chart which exposes such UI should be set to use a `LoadBalancer` type and port `80` or `443`.
258260
259-
### Run it locally
261+
### Run Cypress locally
260262

261263
Sometimes it is of interest to run the tests locally, for example during development. Though there may be different approaches, you may follow the steps below to execute the tests locally:
262264

@@ -333,7 +335,7 @@ Sometimes it is of interest to run the tests locally, for example during develop
333335
✔ All specs passed! 371ms 1 1
334336
```
335337

336-
### Useful information
338+
### Useful Cypress information
337339

338340
* In most cases, a single test which covers the following topics is enough:
339341
* Login/Logout: Checks the UI, app, and DB are working together
@@ -343,7 +345,7 @@ Sometimes it is of interest to run the tests locally, for example during develop
343345

344346
* If the asset exposes an API, Cypress is an excellent option to test this feature!
345347

346-
### Specific acceptance criteria
348+
### Specific Cypress acceptance criteria
347349

348350
* [ ] Test file name has the following format: Helm chart name + spec (ex: `wordpress_spec.js`)
349351
* [ ] No `describe()` blocks should be present
@@ -389,7 +391,7 @@ In order for VIB to execute Ginkgo tests, the following block of code needs to b
389391
}
390392
```
391393
392-
### Run it locally
394+
### Run Ginkgo locally
393395
394396
Sometimes it is of interest to run the tests locally, for example during development. Though there may be different approaches, you may follow the steps below to execute the tests locally:
395397
@@ -420,15 +422,15 @@ Sometimes it is of interest to run the tests locally, for example during develop
420422
Test Suite Passed
421423
```
422424
423-
### Useful information
425+
### Useful Ginkgo information
424426
425427
Ginkgo provides extreme flexibility when it comes to tests. Nonetheless, here are the most frequent use cases we have used it for so far:
426428
427429
* Checking logs produced by a scratch or a k8s-native pod
428430
* Deploying, managing and interacting with K8s resources: CRDs, Ingresses, Secrets... Really useful for **K8s operators**
429431
* Directly interacting (instead of managing) resources deployed at installation time using the `extraDeploy` param, available in bitnami charts
430432
431-
### Specific acceptance criteria
433+
### Specific Ginkgo acceptance criteria
432434
433435
* [ ] Test file name has the following format: Helm chart name + `test` (ex: `metallb_test.go`)
434436
* [ ] Helper functions should be placed in an additional file named `integration_suite_test.go`
@@ -457,21 +459,7 @@ In order for VIB to execute GOSS tests, the following block of code needs to be
457459
}
458460
```
459461
460-
### Useful information
461-
462-
As our Charts implement some standardized properties, there are a number of test cases that have been found recurrently throughout the catalog:
463-
464-
* Correct user ID and Group of the running container
465-
* Reachability of the different ports exposed through services
466-
* Existence of mounted volumes
467-
* Correct configuration was applied to a config file or enviroment variable
468-
* Existence of a created Service Account
469-
* Restricted capabilities are applied to a running container
470-
* Valuable CLI checks (when available)
471-
472-
[Kong](https://github.com/bitnami/charts/blob/main/.vib/kong/goss/goss.yaml) or [MetalLB](https://github.com/bitnami/charts/blob/main/.vib/metallb/goss/goss.yaml) are two good examples of tests implementing some of the above.
473-
474-
### Run it locally
462+
### Run GOSS locally
475463
476464
Sometimes it is of interest to run the tests locally, for example during development. Though there may be different approaches, you may follow the steps below to execute the tests locally:
477465
@@ -495,6 +483,7 @@ Sometimes it is of interest to run the tests locally, for example during develop
495483
$ kubectl cp .vib/nginx/goss/goss.yaml nginx-5fbc8786f-95rpl:/tmp/
496484
$ kubectl cp .vib/nginx/goss/vars.yaml nginx-5fbc8786f-95rpl:/tmp/
497485
```
486+
498487
1. Grant execution permissions to the binary and launch the tests
499488
500489
```bash
@@ -506,10 +495,24 @@ Sometimes it is of interest to run the tests locally, for example during develop
506495
Count: 9, Failed: 0, Skipped: 0
507496
```
508497
509-
### Specific acceptance criteria
498+
### Useful GOSS information
499+
500+
As our Charts implement some standardized properties, there are a number of test cases that have been found recurrently throughout the catalog:
501+
502+
* Correct user ID and Group of the running container
503+
* Reachability of the different ports exposed through services
504+
* Existence of mounted volumes
505+
* Correct configuration was applied to a config file or enviroment variable
506+
* Existence of a created Service Account
507+
* Restricted capabilities are applied to a running container
508+
* Valuable CLI checks (when available)
509+
510+
[Kong](https://github.com/bitnami/charts/blob/main/.vib/kong/goss/goss.yaml) or [MetalLB](https://github.com/bitnami/charts/blob/main/.vib/metallb/goss/goss.yaml) are two good examples of tests implementing some of the above.
511+
512+
### Specific GOSS acceptance criteria
510513
511514
* [ ] Main test file name should be `goss.yaml`
512515
* [ ] Deployment-related parameters should be specified in a file named `vars.yaml`. This is a subset of the `runtime_parameters`
513516
* [ ] Use templating to parametrize tests with the help of the `vars.yaml` file
514517
* [ ] Tests should not rely on system packages (e.g. `curl`). Favor built-in GOSS primitives instead
515-
* [ ] Prefer checking the exit status of a command rather than looking for a specific output. This will avoid most of the potential flakiness
518+
* [ ] Prefer checking the exit status of a command rather than looking for a specific output. This will avoid most of the potential flakiness

0 commit comments

Comments
 (0)