Skip to content

Commit 2be8dba

Browse files
Add support for aws.config provider secret
This change adds support for injecting a aws configuration into the nodepool processes. Change-Id: I9ac4030c9c945016b467a7e876d6be33a5c56065
1 parent 4c56c23 commit 2be8dba

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

controllers/nodepool.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@ func (r *SFController) setProviderSecretsVolumeMounts() ([]apiv1.VolumeMount, ap
252252
ReadOnly: true,
253253
})
254254
}
255+
256+
if data, ok := nodepoolProvidersSecrets.Data["aws.config"]; ok && len(data) > 0 {
257+
volumeMount = append(volumeMount, apiv1.VolumeMount{
258+
Name: "nodepool-providers-secrets",
259+
SubPath: "aws.config",
260+
MountPath: "/var/lib/nodepool/.aws/config",
261+
ReadOnly: true,
262+
})
263+
}
255264
}
256265
return volumeMount, nodepoolProvidersSecrets, exists
257266
}

docs/deployment/nodepool.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ The spec is constantly evolving during alpha development and should be considere
3939

4040
## Setting up providers secrets
4141

42-
Currently the SF Operator supports OpenStack (`clouds.yaml`) and Kubernetes (`kube.config`) configuration files. These files are used by Nodepool to manage resources on its providers.
42+
Currently the SF Operator supports OpenStack (`clouds.yaml`), Kubernetes (`kube.config`) and AWS (`aws.config`) configuration files. These files are used by Nodepool to manage resources on its providers.
4343
They are managed by the SF Operator in a secret called `nodepool-providers-secrets`.
4444

4545
```sh
46-
kubectl create secret generic nodepool-providers-secrets --from-file=clouds.yaml=<path-to>/clouds.yaml --from-file=kube.config=<path-to>/kube.config --dry-run=client -o yaml | kubectl apply -f -
46+
kubectl create secret generic nodepool-providers-secrets \
47+
--from-file=clouds.yaml=<path-to>/clouds.yaml \
48+
--from-file=kube.config=<path-to>/kube.config \
49+
--from-file=aws.config=<path-to>/aws.config \
50+
--dry-run=client -o yaml | kubectl apply -f -
4751
```
4852

4953
Then wait until your deployment becomes ready again:

docs/reference/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
77
### Added
88

99
- Improved logserver SSH key rotation: refactored authorized_keys reconciliation logic and added `logserver-uploader-spare-keys` secret support to allow long-running jobs to maintain access during key rotation without service interruption.
10+
- Support for aws.config key in nodepool-providers-secrets.
1011

1112
### Changed
1213

0 commit comments

Comments
 (0)