You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CODE_OF_CONDUCT.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,6 @@ If you are subjected to or witness unacceptable behavior, or have any other conc
12
12
13
13
If you have suggestions to improve this Code of Conduct, please submit an issue or PR.
14
14
15
-
**Attribution**
15
+
## Attribution
16
16
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>
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+8-6
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ Any type of contribution is welcome; from new features, bug fixes, [tests](#test
14
14
### Technical Requirements
15
15
16
16
When submitting a PR make sure that it:
17
+
17
18
- Must pass CI jobs for linting and test the changes on top of different k8s platforms. (Automatically done by the Bitnami CI/CD pipeline).
18
19
- Must follow [Helm best practices](https://helm.sh/docs/chart_best_practices/).
19
20
- 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
32
33
33
34
Note: If your git config information is set properly then viewing the `git log` information for your commit will look something like this:
Notice the `Author` and `Signed-off-by` lines match. If they don't your PR will be rejected by the automated DCO check.
45
46
@@ -68,6 +69,7 @@ Notice the `Author` and `Signed-off-by` lines match. If they don't your PR will
68
69
### Adding a new chart to the repository
69
70
70
71
There are three major technical requirements to add a new Helm chart to our catalog:
72
+
71
73
- 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.
72
74
- 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.
73
75
- Use an [OSI approved license](https://opensource.org/licenses) for all the software.
@@ -39,7 +39,6 @@ The quickest way to setup a Kubernetes cluster to install Bitnami Charts is foll
39
39
-[Get Started with Bitnami Charts using the Azure Kubernetes Service (AKS)](https://docs.bitnami.com/kubernetes/get-started-aks/)
40
40
-[Get Started with Bitnami Charts using the Amazon Elastic Container Service for Kubernetes (EKS)](https://docs.bitnami.com/kubernetes/get-started-eks/)
41
41
-[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/)
43
42
44
43
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/).
45
44
@@ -54,7 +53,7 @@ To install Helm, refer to the [Helm install guide](https://github.com/helm/helm#
54
53
The following command allows you to download and install all the charts from this repository:
> **_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
70
69
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.
71
70
72
71
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`
76
76
77
77
## License
78
78
@@ -82,7 +82,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
82
82
83
83
You may obtain a copy of the License at
84
84
85
-
http://www.apache.org/licenses/LICENSE-2.0
85
+
<http://www.apache.org/licenses/LICENSE-2.0>
86
86
87
87
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.
88
88
See the License for the specific language governing permissions and limitations under the License.
@@ -123,10 +124,11 @@ Hence, tweaking the files allows to define different action policies depending o
123
124
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.
124
125
125
126
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)
130
132
131
133
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.
132
134
@@ -136,9 +138,9 @@ Before writing any test scenario, understand the primary purpose of the chart an
136
138
137
139
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:
138
140
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._
142
144
143
145
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:
144
146
@@ -256,7 +258,7 @@ In order for VIB to execute Cypress tests, the following block of code needs to
256
258
257
259
> ℹ️❗️ 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`.
258
260
259
-
### Run it locally
261
+
### Run Cypress locally
260
262
261
263
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:
262
264
@@ -333,7 +335,7 @@ Sometimes it is of interest to run the tests locally, for example during develop
333
335
✔ All specs passed! 371ms 1 1
334
336
```
335
337
336
-
### Useful information
338
+
### Useful Cypress information
337
339
338
340
* In most cases, a single test which covers the following topics is enough:
339
341
* 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
343
345
344
346
* If the asset exposes an API, Cypress is an excellent option to test this feature!
345
347
346
-
### Specific acceptance criteria
348
+
### Specific Cypress acceptance criteria
347
349
348
350
* [ ] Test file name has the following format: Helm chart name + spec (ex: `wordpress_spec.js`)
349
351
* [ ] 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
389
391
}
390
392
```
391
393
392
-
### Run it locally
394
+
### Run Ginkgo locally
393
395
394
396
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:
395
397
@@ -420,15 +422,15 @@ Sometimes it is of interest to run the tests locally, for example during develop
420
422
Test Suite Passed
421
423
```
422
424
423
-
### Useful information
425
+
### Useful Ginkgo information
424
426
425
427
Ginkgo provides extreme flexibility when it comes to tests. Nonetheless, here are the most frequent use cases we have used it for so far:
426
428
427
429
* Checking logs produced by a scratch or a k8s-native pod
428
430
* Deploying, managing and interacting with K8s resources: CRDs, Ingresses, Secrets... Really useful for**K8s operators**
429
431
* Directly interacting (instead of managing) resources deployed at installation time using the `extraDeploy` param, available in bitnami charts
430
432
431
-
### Specific acceptance criteria
433
+
### Specific Ginkgo acceptance criteria
432
434
433
435
* [ ] Test file name has the following format: Helm chart name + `test` (ex: `metallb_test.go`)
434
436
* [ ] 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
457
459
}
458
460
```
459
461
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
475
463
476
464
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:
477
465
@@ -495,6 +483,7 @@ Sometimes it is of interest to run the tests locally, for example during develop
1. Grant execution permissions to the binary and launch the tests
499
488
500
489
```bash
@@ -506,10 +495,24 @@ Sometimes it is of interest to run the tests locally, for example during develop
506
495
Count: 9, Failed: 0, Skipped: 0
507
496
```
508
497
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
510
513
511
514
* [ ] Main test file name should be `goss.yaml`
512
515
* [ ] Deployment-related parameters should be specified in a file named `vars.yaml`. This is a subset of the `runtime_parameters`
513
516
* [ ] Use templating to parametrize tests with the help of the `vars.yaml` file
514
517
* [ ] 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