Skip to content

Commit 4574807

Browse files
Imtiaz246tamalsaha
andauthored
Add session token in aws-credentials field (#122)
Signed-off-by: Imtiaz Uddin <imtiaz@appscode.com> Signed-off-by: Tamal Saha <tamal@appscode.com> Co-authored-by: Tamal Saha <tamal@appscode.com>
1 parent ec25a66 commit 4574807

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

apis/cloud/v1alpha1/credential_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ type AzureStorageCredential struct {
136136
type AWSCredential struct {
137137
AccessKeyID string `json:"accessKeyID"`
138138
SecretAccessKey string `json:"secretAccessKey"`
139+
SessionToken string `json:"sessionToken"`
139140
}
140141

141142
type PacketCredential struct {

apis/cluster/types.go

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,23 @@ type BasicInfo struct {
2626
HubClusterID string `json:"hubClusterID,omitempty"`
2727
}
2828

29+
// +kubebuilder:validation:Enum=IRSA;PodIdentity
30+
type EksAuthMode string
31+
32+
const (
33+
EksAuthModeIRSA EksAuthMode = "IRSA"
34+
EksAuthModePodIdentity EksAuthMode = "PodIdentity"
35+
)
36+
2937
type ProviderOptions struct {
30-
Name string `json:"name"`
31-
Credential string `json:"credential,omitempty"`
32-
ClusterID string `json:"clusterID,omitempty"`
33-
Project string `json:"project,omitempty"`
34-
Region string `json:"region,omitempty"`
35-
ResourceGroup string `json:"resourceGroup,omitempty"`
36-
KubeConfig string `json:"kubeConfig,omitempty"`
38+
Name string `json:"name"`
39+
Credential string `json:"credential,omitempty"`
40+
EksAuthMode EksAuthMode `json:"eksAuthMode,omitempty"`
41+
ClusterID string `json:"clusterID,omitempty"`
42+
Project string `json:"project,omitempty"`
43+
Region string `json:"region,omitempty"`
44+
ResourceGroup string `json:"resourceGroup,omitempty"`
45+
KubeConfig string `json:"kubeConfig,omitempty"`
3746
}
3847

3948
type ComponentOptions struct {

crds/cloud.appscode.com_credentials.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ spec:
4949
type: string
5050
secretAccessKey:
5151
type: string
52+
sessionToken:
53+
type: string
5254
required:
5355
- accessKeyID
5456
- secretAccessKey
57+
- sessionToken
5558
type: object
5659
azure:
5760
properties:

0 commit comments

Comments
 (0)