Skip to content

Commit

Permalink
Add githooks
Browse files Browse the repository at this point in the history
  • Loading branch information
NoUseFreak committed Nov 17, 2020
1 parent 88e0838 commit 8ad9823
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/openvpn-as/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: openvpn-as
description: A Helm chart for Kubernetes
type: application
version: 0.1.4
version: 0.1.5
appVersion: version-2.8.6-916f8e7d-ubuntu18
maintainers:
- email: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion charts/openvpn-as/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The following tables list the configurable parameters of the openvpn-as chart an
| securityContext.capabilities.add[0] | string | `"NET_ADMIN"` | |
| service.admin.type | string | `"ClusterIP"` | |
| service.gui.type | string | `"ClusterIP"` | |
| service.type | string | `"LoadBalancer"` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
Expand Down
7 changes: 3 additions & 4 deletions charts/openvpn-as/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@

```console
helm repo add stenic https://stenic.github.io/helm-charts
helm install my-release stenic/{{ template "chart.name" . }}
helm install my-release --set "service.type=LoadBalancer" stenic/{{ template "chart.name" . }}
```


## Introduction

This chart installs `{{ template "chart.name" . }}` on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.


## Prerequisites

- Kubernetes 1.12+
- Helm 3.0+
- LoadBalancer to expose the vpn service
- PV provisioner support in the underlying infrastructure


Expand All @@ -26,7 +25,7 @@ To install the chart with the release name `my-release`:

```console
helm repo add stenic https://stenic.github.io/helm-charts
helm install my-release stenic/{{ template "chart.name" . }}
helm install my-release --set "service.type=LoadBalancer" stenic/{{ template "chart.name" . }}
```

These commands deploy {{ template "chart.name" . }} on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
Expand Down
23 changes: 23 additions & 0 deletions docs/githooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Githooks

This project takes advantange of [git-hooks](https://github.com/git-hooks/git-hooks) to ensure code quality.

Whenever a commit is done, some quick and basic validations will be performed.
See the `githooks` folder for more info.

## Requirements

- [helm-docs](https://github.com/norwoodj/helm-docs)

## Installation

```bash
brew install norwoodj/tap/helm-docs
brew install git-hooks-go
```

## Enable

```bash
git hook install
```
10 changes: 10 additions & 0 deletions githooks/pre-commit/10-docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e

echo "==> Generating docs..."
helm-docs 2> /dev/null

[[ $(git diff charts/*/README.md) ]] && (echo "==> ERROR: documentation updated" && exit 1)

exit 0
4 changes: 4 additions & 0 deletions githooks/pre-commit/20-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

echo "==> Running helm template..."
ct lint --config ct.yaml
9 changes: 9 additions & 0 deletions githooks/pre-commit/30-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

echo "==> Running helm template..."
for chart in charts/*
do
helm template $chart > /dev/null
done

0 comments on commit 8ad9823

Please sign in to comment.