Skip to content

Commit 2c9ac23

Browse files
author
Thomas Forbes
committed
Add a readme and examples
1 parent 9fd70a2 commit 2c9ac23

File tree

6 files changed

+61
-4
lines changed

6 files changed

+61
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repos:
66
- id: yamlfmt
77
files: .*.(yaml|yml)
88
exclude: (templates|.github)/
9-
args: [--mapping, '2', --sequence, '2', --offset, '0']
9+
args: [--mapping, '2', --sequence, '2', --offset, '0', --preserve-quotes, --preserve_null]
1010
- repo: local
1111
hooks:
1212
- entry: ./scripts/bundle_schemas.sh

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# GitGuardian NHI Helm Charts
22

3+
## Installation
4+
5+
Add the repository to Helm with:
6+
7+
```shell
8+
helm repo add gg-nhi https://gitguardian.github.io/nhi-explorer-helm-charts
9+
```
10+
11+
Then install the explorer, with a values file (examples below):
12+
13+
```shell
14+
helm upgrade explorer gg-nhi/nhi-explorer --install --values values.yml
15+
```
16+
17+
An example values file that fetches from HashiCorp Vault:
18+
19+
```yaml
20+
inventory:
21+
# Run every 15 minutes
22+
schedule: '*/15 * * * *'
23+
config:
24+
sources:
25+
vault-secrets:
26+
type: hashicorpvault
27+
vault_address: "https://your-vault-address-here"
28+
# Token configuration can be read from environment variables like so:
29+
auth_token: "${HASHICORP_VAULT_TOKEN}"
30+
fetch_all_versions: true
31+
path: "secret/"
32+
33+
# This needs to be created separately, and contain a `HASHICORP_VAULT_TOKEN` key with
34+
# the token to use.
35+
envFrom:
36+
- secretRef:
37+
name: hashicorpvault-secrets
38+
```
39+
40+
Other examples can be found in [charts/nhi-explorer/examples](charts/nhi-explorer/examples).
41+
42+
343
## Development
444
545
Install the [helm unittest plugin](https://github.com/helm-unittest/helm-unittest)

charts/nhi-explorer/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type: application
1616
# This is the chart version. This version number should be incremented each time you make changes
1717
# to the chart and its templates, including the app version.
1818
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19-
version: 0.1.5
19+
version: 0.1.6
2020

2121
# This is the version number of the application being deployed. This version number should be
2222
# incremented each time you make changes to the application. Versions are not expected to
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: test-secret
6+
stringData:
7+
secret-one: "some-secret-value"
8+
secret-two: "another-secret-value"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# yaml-language-server: $schema=../../values.schema.json
3+
4+
inventory:
5+
config:
6+
sources:
7+
vault-secrets:
8+
type: k8s

charts/nhi-explorer/values.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ inventory:
88
version: 0.6.1
99
upload: false
1010
# Schedule to run the collection on
11-
schedule: '* * * * *'
12-
config:
11+
schedule: '*/15 * * * *'
12+
# Need to add this explicitly
13+
config: null
1314

1415
# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
1516
image:

0 commit comments

Comments
 (0)