Skip to content

Commit ccf3c9e

Browse files
Merge pull request #15 from finleap-connect/fix/11-bug-ks-secret-vault-operator-creds
Fix/11 bug ks secret vault operator creds
2 parents 5cb0c45 + cec11f5 commit ccf3c9e

File tree

4 files changed

+43
-8
lines changed

4 files changed

+43
-8
lines changed

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,40 @@
77
[![GitHub release](https://img.shields.io/github/release/finleap-connect/vaultoperator.svg)](https://github.com/finleap-connect/vaultoperator/releases)
88

99
The `vault-operator` provides several CRDs to interact securely and indirectly with secrets.
10+
11+
## Quick start
12+
13+
Add the helm repository to your list of repos:
14+
15+
```bash
16+
$ helm repo add finleap-connect https://finleap-connect.github.io/charts/
17+
$ helm repo update
18+
```
19+
20+
Execute the following to get the complete list of values available:
21+
22+
```bash
23+
helm show values finleap-connect/vault-operator --version <VERSION>
24+
```
25+
26+
Configure at least the following settings within your `values.yaml` :
27+
```yaml
28+
# Configure Vault connection
29+
vault:
30+
addr: "" # Address of the Vault instance
31+
tls:
32+
secretName: "" # Specify secret containing CA to access Vault
33+
credentials:
34+
secretName: "" # Specify secret containing AppRole credentials as fields VAULT_ROLE_ID and VAULT_SECRET_ID, see https://www.vaultproject.io/docs/auth/approle
35+
namespace: "" # Which Vault namespace to connect to
36+
```
37+
38+
Install VaultOperator with the following command:
39+
40+
```bash
41+
$ helm install finleap-connect/vault-operator --name myrealease --version <VERSION> --values values.yaml
42+
```
43+
1044
## Details
1145

1246
Currently only _stage 1_ is implemented, which includes the `VaultSecret`-CRD.
@@ -97,4 +131,3 @@ The test suite needs the kubebuilder assets. If they are not installed in the de
97131
path make sure to set `KUBEBUILDER_ASSETS` before running tests.
98132
Similarly the vault CLI needs to be setup, if it is outside your `PATH` make sure to
99133
set `VAULT_ASSETS` to the directory containing the vault executable.
100-

charts/vault-operator/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ metadata:
55
labels:
66
{{- include "vault-operator.labels" . | nindent 4 }}
77
data:
8-
VAULT_ADDR: {{ .Values.vault.addr }}
8+
VAULT_ADDR: {{ required "A valid .Values.vault.addr is required!" .Values.vault.addr }}
99
VAULT_NAMESPACE: {{ .Values.vault.namespace | quote }}
1010
SHARED_PATHS: {{ join "," .Values.sharedPaths | quote }}

charts/vault-operator/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
- configMapRef:
4040
name: vault-operator-env
4141
- secretRef:
42-
name: vault-operator-creds
42+
name: {{ required "A valid .Values.vault.credentials.secretName is required!" .Values.vault.credentials.secretName }}
4343
ports:
4444
- containerPort: 443
4545
name: webhook-server
@@ -79,7 +79,7 @@ spec:
7979
{{- if .Values.vault.tls.secretName }}
8080
- name: tls-certs
8181
secret:
82-
secretName: {{ .Values.vault.tls.secretName }}
82+
secretName: {{ required "A valid .Values.vault.tls.secretName is required!" .Values.vault.tls.secretName }}
8383
{{- end }}
8484

8585

charts/vault-operator/values.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,18 @@ securityContext: {}
3636

3737
terminationGracePeriodSeconds: 10
3838

39-
# Set this to false for GKE, which runs a CertManager, which only
39+
# Set this to false for older CertManager, which only
4040
# supports the cert-manager.io/v1 API
4141
useOldCertManager: true
4242

4343
# Configure Vault connection
4444
vault:
45-
addr: "" # Address of the Vault instance
45+
addr: "" # Required address of Vault
4646
tls:
47-
secretName: "" # Specify secret containing CA to access Vault
48-
namespace: "" # Which Vault namespace to connect to
47+
secretName: "" # Required secret containing CA to access Vault
48+
credentials:
49+
secretName: "" # Required secret containing AppRole credentials as fields VAULT_ROLE_ID and VAULT_SECRET_ID, see https://www.vaultproject.io/docs/auth/approle
50+
namespace: "" # Optional Vault namespace to connect to
4951

5052
# Set which paths in Vault are allowed to be accessed from any namespace
5153
sharedPaths:

0 commit comments

Comments
 (0)