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

Support for aws secret manager authentication #4739

Closed
wants to merge 2 commits into from
Closed
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
37 changes: 37 additions & 0 deletions apis/keda/v1alpha1/triggerauthentication_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ type TriggerAuthenticationSpec struct {

// +optional
AzureKeyVault *AzureKeyVault `json:"azureKeyVault,omitempty"`

// +optional
AwsSecretManager *AwsSecretManager `json:"awsSecretManager,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down Expand Up @@ -227,6 +230,40 @@ type AzureKeyVaultCloudInfo struct {
ActiveDirectoryEndpoint string `json:"activeDirectoryEndpoint"`
}

// AwsSecretManager is used to authenticate using AwsSecretManager
type AwsSecretManager struct {
Credentials *AwsSecretManagerCredentials `json:"credentials"`
Secrets []AwsSecretManagerSecret `json:"secrets"`

// +optional
PodIdentity *AuthPodIdentity `json:"podIdentity"`

Cloud *AwsSecretMangerCloudInfo `json:"cloud"`
}

type AwsSecretManagerCredentials struct {
AccessKey ValueFromSecret `json:"accessKey"`
AccessSecretKey ValueFromSecret `json:"accessSecretKey"`
// +optional
AccessToken ValueFromSecret `json:"accessToken,omitempty"`
}

type AwsSecretManagerSecret struct {
Parameter string `json:"parameter"`
Name string `json:"name"`
// +optional
VersionId string `json:"versionId,omitempty"`
// +optional
VersionStage string `json:"versionStage,omitempty"`
}

type AwsSecretMangerCloudInfo struct {
// +optional
Region string `json:"region,omitempty"`
// +optional
Endpoint string `json:"endpoint,omitempty"`
}

func init() {
SchemeBuilder.Register(&ClusterTriggerAuthentication{}, &ClusterTriggerAuthenticationList{})
SchemeBuilder.Register(&TriggerAuthentication{}, &TriggerAuthenticationList{})
Expand Down
88 changes: 88 additions & 0 deletions apis/keda/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 94 additions & 0 deletions config/crd/bases/keda.sh_clustertriggerauthentications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,100 @@ spec:
spec:
description: TriggerAuthenticationSpec defines the various ways to authenticate
properties:
awsSecretManager:
description: AwsSecretManager is used to authenticate using AwsSecretManager
properties:
cloud:
properties:
endpoint:
type: string
region:
type: string
type: object
credentials:
properties:
accessKey:
properties:
secretKeyRef:
properties:
key:
type: string
name:
type: string
required:
- key
- name
type: object
required:
- secretKeyRef
type: object
accessSecretKey:
properties:
secretKeyRef:
properties:
key:
type: string
name:
type: string
required:
- key
- name
type: object
required:
- secretKeyRef
type: object
accessToken:
properties:
secretKeyRef:
properties:
key:
type: string
name:
type: string
required:
- key
- name
type: object
required:
- secretKeyRef
type: object
required:
- accessKey
- accessSecretKey
type: object
podIdentity:
description: AuthPodIdentity allows users to select the platform
native identity mechanism
properties:
identityId:
type: string
provider:
description: PodIdentityProvider contains the list of providers
type: string
required:
- provider
type: object
secrets:
items:
properties:
name:
type: string
parameter:
type: string
versionId:
type: string
versionStage:
type: string
required:
- name
- parameter
type: object
type: array
required:
- cloud
- credentials
- secrets
type: object
azureKeyVault:
description: AzureKeyVault is used to authenticate using Azure Key
Vault
Expand Down
94 changes: 94 additions & 0 deletions config/crd/bases/keda.sh_triggerauthentications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,100 @@ spec:
spec:
description: TriggerAuthenticationSpec defines the various ways to authenticate
properties:
awsSecretManager:
description: AwsSecretManager is used to authenticate using AwsSecretManager
properties:
cloud:
properties:
endpoint:
type: string
region:
type: string
type: object
credentials:
properties:
accessKey:
properties:
secretKeyRef:
properties:
key:
type: string
name:
type: string
required:
- key
- name
type: object
required:
- secretKeyRef
type: object
accessSecretKey:
properties:
secretKeyRef:
properties:
key:
type: string
name:
type: string
required:
- key
- name
type: object
required:
- secretKeyRef
type: object
accessToken:
properties:
secretKeyRef:
properties:
key:
type: string
name:
type: string
required:
- key
- name
type: object
required:
- secretKeyRef
type: object
required:
- accessKey
- accessSecretKey
type: object
podIdentity:
description: AuthPodIdentity allows users to select the platform
native identity mechanism
properties:
identityId:
type: string
provider:
description: PodIdentityProvider contains the list of providers
type: string
required:
- provider
type: object
secrets:
items:
properties:
name:
type: string
parameter:
type: string
versionId:
type: string
versionStage:
type: string
required:
- name
- parameter
type: object
type: array
required:
- cloud
- credentials
- secrets
type: object
azureKeyVault:
description: AzureKeyVault is used to authenticate using Azure Key
Vault
Expand Down
Loading