Skip to content

Commit

Permalink
Add example to show how to use external secrets (#744)
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Wall <pete.wall@grafana.com>
  • Loading branch information
petewall authored Sep 20, 2024
1 parent bacf05d commit 8a62b6a
Show file tree
Hide file tree
Showing 8 changed files with 70,886 additions and 0 deletions.
46 changes: 46 additions & 0 deletions examples/external-secrets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# External Secrets

Using external secrets allows you to store the hostnames, usernames, passwords and other sensitive data in a pre-made
Kubernetes Secret object. This example shows how to reference that secret, as well the keys within it:

```yaml
cluster:
name: external-secrets-test
externalServices:
prometheus:
hostKey: prom_hostname
secret:
create: false
name: alloy-secret
namespace: monitoring
basicAuth:
usernameKey: prom_username
passwordKey: password

loki:
hostKey: loki_hostname
secret:
create: false
name: alloy-secret
namespace: monitoring
basicAuth:
usernameKey: loki_username
passwordKey: password
```
here is the secret object itself:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: alloy-secret
namespace: monitoring
type: Opaque
stringData:
prom_hostname: "https://prometheus.example.com"
prom_username: "12345"
loki_hostname: "https://loki.example.com"
loki_username: "12345"
password: "It's a secret to everyone"
```
12 changes: 12 additions & 0 deletions examples/external-secrets/alloy-secret.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions examples/external-secrets/events.alloy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

155 changes: 155 additions & 0 deletions examples/external-secrets/logs.alloy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8a62b6a

Please sign in to comment.