Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add fetch_only documentation #10

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ inventory:
jobs:
# Job to fetch defined sources
fetch:
# Set to `true` to enable the job
enabled: false
# Set to `false` to disable the job
enabled: true
# Run every 15 minutes
schedule: '*/15 * * * *'
send: true
Expand All @@ -50,7 +50,6 @@ inventory:
enabled: true
# Run every minute
schedule: '* * * * *'
# Set to `true` to enable sending fetched data to the GitGuardian instance

# This needs to be created separately, and contain the following keys:
# - `HASHICORP_VAULT_TOKEN` - the hashicorp vault token to use
Expand All @@ -60,6 +59,8 @@ envFrom:
name: gitguardian-nhi-scout-secrets
```

If you want to only fetch the identities without sending them, please see this [example](charts/nhi-scout/examples/fetch_only)

Other examples can be found in [charts/nhi-scout/examples](charts/nhi-scout/examples).

## Development
Expand Down
8 changes: 8 additions & 0 deletions charts/nhi-scout/examples/fetch_only/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: v1
kind: Secret
metadata:
name: gitguardian-nhi-scout-secrets
stringData:
# OUTPUT_PATH is the path that the Scout `fetch` command is using to write the inventory
OUTPUT_PATH: "/tmp/output/inventory.json"
38 changes: 38 additions & 0 deletions charts/nhi-scout/examples/fetch_only/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# yaml-language-server: $schema=../../values.schema.json

inventory:
config:
sources:
vault-secrets:
type: hashicorpvault
vault_address: "https://your-vault-address-here"
# Token configuration can be read from environment variables like so:
auth_token: "${HASHICORP_VAULT_TOKEN}"
fetch_all_versions: true
path: "secret/"

jobs:
fetch:
schedule: "* * * * *"
enabled: true
# send is set to `false` so this job will only retrieve secrets and write there into `${OUTPUT_PATH}`
send: false

# This needs to be created separately, and contain the following keys:
# - `OUTPUT_PATH` - path that the Scout `fetch` command is using to write the inventory
envFrom:
- secretRef:
name: gitguardian-nhi-scout-secrets

volumes:
- name: test-local
hostPath:
# The host local volume where the inventory will be sent
path: /tmp/output
type: DirectoryOrCreate

volumeMounts:
# The mount point where the inventory will be written. Must be the same directory than the one set in OUTPUT_PATH
- mountPath: /tmp/output
name: test-local
2 changes: 1 addition & 1 deletion charts/nhi-scout/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Options for the inventory configuration.
inventory:
# Specific version of the image to use
version: 0.11.0
version: 0.12.0
# Schedule to run the collection on
log_level: info
# Enable syncing secrets to vaults
Expand Down
Loading