You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 26, 2022. It is now read-only.
feat(aws-ssm): Add support to get parameters by path (#603)
* Adding support to scrape full paths instead of each individual key from SSM
* Multiple changes related with improvements
Updating Readme
Improving code with users suggestions
Lint fixes
Adding tests for ssm path feature
* Fixing additional lint issues with tests
Copy file name to clipboardExpand all lines: README.md
+27
Original file line number
Diff line number
Diff line change
@@ -391,6 +391,33 @@ spec:
391
391
property: password
392
392
```
393
393
394
+
# AWS SSM Parameter Store
395
+
396
+
You can scrape values from SSM Parameter Store individually or by providing a path to fetch all keys inside.
397
+
398
+
Additionally you can also scrape all sub paths (child paths) if you need to. The default is not to scrape child paths
399
+
400
+
```yml
401
+
apiVersion: kubernetes-client.io/v1
402
+
kind: ExternalSecret
403
+
metadata:
404
+
name: hello-service
405
+
spec:
406
+
backendType: secretsManager
407
+
# optional: specify role to assume when retrieving the data
408
+
roleArn: arn:aws:iam::123456789012:role/test-role
409
+
# optional: specify region
410
+
region: us-east-1
411
+
data:
412
+
- key: /foo/name
413
+
name: fooName
414
+
- path: /extra-people/
415
+
recursive: false
416
+
```
417
+
418
+
419
+
420
+
394
421
### Hashicorp Vault
395
422
396
423
kubernetes-external-secrets supports fetching secrets from [Hashicorp Vault](https://www.vaultproject.io/), using the [Kubernetes authentication method](https://www.vaultproject.io/docs/auth/kubernetes).
async_getByPath({ path, keyOptions,specOptions: { roleArn, region }}){
76
+
letclient=this._client
77
+
letfactoryArgs=null
78
+
constrecursive=keyOptions.recursive||false
79
+
80
+
this._logger.info(`fetching all secrets ${recursive ? '(recursively)' : ''} inside path ${path} with role ${roleArn!==' from pod'} in region ${region}`)
81
+
82
+
if(roleArn){
83
+
constcredentials=this._assumeRole({
84
+
RoleArn: roleArn,
85
+
RoleSessionName: 'k8s-external-secrets'
86
+
})
87
+
factoryArgs={
88
+
...factoryArgs,
89
+
credentials
90
+
}
91
+
}
92
+
if(region){
93
+
factoryArgs={
94
+
...factoryArgs,
95
+
region
96
+
}
97
+
}
98
+
if(factoryArgs){
99
+
client=this._clientFactory(factoryArgs)
100
+
}
101
+
try{
102
+
constgetAllParameters=async()=>{
103
+
constEMPTY=Symbol('empty')
104
+
this._logger.info(`fetching parameters for path ${path}`)
0 commit comments