Skip to content

Commit

Permalink
Add development guidelines and update repository readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dnskr committed Jul 15, 2024
1 parent fc42b1c commit ef38c2c
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 20 deletions.
41 changes: 41 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Development

This document describes development guidelines for Presto Helm charts.

## Running locally
[Minikube](https://minikube.sigs.k8s.io) can be used to deploy the chart and run Presto locally for testing purposes.

The following commands start minikube instance and open Kubernetes cluster dashboard in the default web browser:
```shell
minikube start --cpus=4 --memory=8g --addons=ingress --addons=ingress-dns
minikube dashboard
```

## Debugging chart templates

### Linting
Use `helm lint` to examine the chart by running a series of tests for potential issues or errors.
The command takes a path to the chart and validates that the chart is well-formed.

For instance, the following command validates Presto Helm chart with enabled Ingress:
```shell
helm lint charts/presto --set ingress.enabled=true
```

### Rendering templates
Use `helm template --debug` to render the chart templates locally.

For example, the command below checks templates correctness with enabled Ingress:
```shell
helm template my-presto charts/presto --set ingress.enabled=true --debug
```

### Simulate installation
Use `helm install --dry-run --debug` to simulate the chart installation and print rendered templates.
The command generates manifests and sends them to the Kubernetes API server for verification.
It is useful to check if the chart and configuration are valid for a specific Kubernetes cluster.

The following command simulates Presto Helm chart installation with enabled Ingress:
```shell
helm install my-presto charts/presto --set ingress.enabled=true --dry-run --debug
```
34 changes: 14 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,24 @@

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Repository for Presto Helm charts.
Repository for official Presto Helm charts.

## Add Presto charts Helm repo
Use the following command to add Presto charts repository to Helm configuration:
## Helm charts repository
Use the following command to add the repository to Helm client configuration:
```shell
$ helm repo add presto https://prestodb.github.io/presto-helm-charts
helm repo add presto https://prestodb.github.io/presto-helm-charts
```

## Debugging chart templates
Use `helm template --debug` to render the chart templates locally, for example, to check correctness when Ingress is enabled:
List the latest stable versions of available Helm charts with the command:
```shell
$ helm template my-presto charts/presto --set ingress.enabled=true --debug
helm search repo presto
```

Use `helm install --dry-run --debug` to render the chart templates on a server side without creating resources.
The command simulates installation, which is useful to check if the chart and configuration are valid for a specific Kubernetes cluster:
```shell
$ helm install my-presto charts/presto --set ingress.enabled=true --dry-run --debug
```
## Contributing
Presto welcomes contributions from everyone.

## Running locally
[Minikube](https://minikube.sigs.k8s.io) can be used to deploy the chart and run Presto locally.
The following commands start minikube instance and open Kubernetes cluster dashboard in the default web browser:
```shell
$ minikube start --cpus=4 --memory=8g --addons=ingress --addons=ingress-dns
$ minikube dashboard
```
Feel free to create an issue with a bug report, feature request or submit a PR.

Check out [development guidelines](https://github.com/prestodb/presto-helm-charts/blob/main/DEVELOPMENT.md) for local development and testing.

## Questions
Join [PrestoDB on Slack](https://communityinviter.com/apps/prestodb/prestodb) to ask questions to the community.

0 comments on commit ef38c2c

Please sign in to comment.