-
Notifications
You must be signed in to change notification settings - Fork 60
feat: Add JSON Log Format Support to Vault CSI Provider #398
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
Open
khajanwolt
wants to merge
9
commits into
hashicorp:main
Choose a base branch
from
khajanwolt:feat-log-format
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8734e10
feat: Add log format config
khajanwolt 4be80d7
Only add relevant tests
khajanwolt cbf9194
Makefile: remove manual log format cleanup
khajanwolt a383cf5
main() test combination of log-level and log-format
khajanwolt 6e60fd1
Readme: add json fmt example
khajanwolt f8e8f98
Update go version
khajanwolt eb241ad
removing test-log-format already have unit test
khajanwolt d19f4a0
update bootstrap makefile
khajanwolt b55ebd0
update README
khajanwolt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 1.24.7 | ||
| 1.25.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| # Test application that mounts secrets from Vault | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: test-app | ||
| namespace: csi | ||
| spec: | ||
| serviceAccountName: test-app | ||
| containers: | ||
| - name: app | ||
| image: busybox:latest | ||
| command: | ||
| - /bin/sh | ||
| - -c | ||
| - | | ||
| echo "==> Checking mounted secrets..." | ||
| ls -la /mnt/secrets-store/ | ||
| echo "" | ||
| echo "==> Secret contents:" | ||
| cat /mnt/secrets-store/* 2>/dev/null || echo "No secrets found" | ||
| echo "" | ||
| echo "==> Keeping pod alive for testing..." | ||
| sleep 3600 | ||
| volumeMounts: | ||
| - name: secrets-store | ||
| mountPath: "/mnt/secrets-store" | ||
| readOnly: true | ||
| volumes: | ||
| - name: secrets-store | ||
| csi: | ||
| driver: secrets-store.csi.k8s.io | ||
| readOnly: true | ||
| volumeAttributes: | ||
| secretProviderClass: "vault-test-secrets" | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: test-app | ||
| namespace: csi | ||
| --- | ||
| # SecretProviderClass - tells the CSI driver how to fetch secrets from Vault | ||
| apiVersion: secrets-store.csi.x-k8s.io/v1 | ||
| kind: SecretProviderClass | ||
| metadata: | ||
| name: vault-test-secrets | ||
| namespace: csi | ||
| spec: | ||
| provider: vault | ||
| parameters: | ||
| vaultAddress: "http://vault:8200" | ||
| roleName: "test-role" | ||
| objects: | | ||
| - objectName: "secret1" | ||
| secretPath: "secret/data/test" | ||
| secretKey: "password" | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: csi | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: vault-csi-provider | ||
| namespace: csi | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: DaemonSet | ||
| metadata: | ||
| name: vault-csi-provider | ||
| namespace: csi | ||
| labels: | ||
| app: vault-csi-provider | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: vault-csi-provider | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: vault-csi-provider | ||
| spec: | ||
| serviceAccountName: vault-csi-provider | ||
| containers: | ||
| - name: provider-vault-installer | ||
| image: e2e/vault-csi-provider:latest | ||
| imagePullPolicy: Never | ||
| args: | ||
| - -endpoint=/provider/vault.sock | ||
| - -log-level=info | ||
| - -log-format=LOG_FORMAT_PLACEHOLDER # text or json | ||
khajanwolt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| volumeMounts: | ||
| - name: providervol | ||
| mountPath: "/provider" | ||
| resources: | ||
| limits: | ||
| memory: 100Mi | ||
| requests: | ||
| cpu: 50m | ||
| memory: 100Mi | ||
| volumes: | ||
| - name: providervol | ||
| hostPath: | ||
| path: "/var/run/secrets-store-csi-providers" | ||
| tolerations: | ||
| - operator: Exists | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.