Skip to content

Commit 29068c9

Browse files
committed
Explain withDecryption arg
1 parent 3a66e4f commit 29068c9

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

apis/keda/v1alpha1/triggerauthentication_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,10 @@ type AwsParameterStoreValue struct {
424424
ValueFrom ValueFromSecret `json:"valueFrom"`
425425
}
426426

427+
// WithDecryption defaults to true if not specified.
428+
// For SecureString parameters, this must be true to retrieve the plaintext value.
429+
// Set to false for SecureString parameters to retrieve the encrypted value.
430+
// For String parameters, this setting has no effect.
427431
type AwsParameterStoreParameter struct {
428432
Parameter string `json:"parameter"`
429433
Name string `json:"name"`

pkg/scaling/resolver/aws_parameterstore_handler.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ func NewAwsParameterStoreHandler(a *kedav1alpha1.AwsParameterStore) *AwsParamete
4444
}
4545

4646
func (apsh *AwsParameterStoreHandler) Read(ctx context.Context, logger logr.Logger, parameterName string, withDecryption *bool) (string, error) {
47+
// WithDecryption defaults to true if not specified.
48+
// For SecureString parameters, this must be true to retrieve the plaintext value.
49+
// Set to false for SecureString parameters to retrieve the encrypted value.
50+
// For String parameters, this setting has no effect.
4751
decrypt := true
4852
if withDecryption != nil {
4953
decrypt = *withDecryption

0 commit comments

Comments
 (0)