-
Notifications
You must be signed in to change notification settings - Fork 75
/
string_or_value.go
39 lines (32 loc) · 1.61 KB
/
string_or_value.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package v1alpha4
type ValueOrSecretRef struct {
Value string `json:"value" yaml:"value"`
ValueFrom *ValueFromSecret `json:"valueFrom,omitempty" yaml:"valueFrom,omitempty"`
}
type ValueFrom struct {
SecretKeyRef *SecretKeyRef `json:"secretKeyRef,omitempty" yaml:"secretKeyRef,omitempty"`
Vault *Vault `json:"vault,omitempty" yaml:"vault,omitempty"`
SSM *SSM `json:"ssm,omitempty" yaml:"ssm,omitempty"`
}
type ValueFromSecret struct {
SecretKeyRef *SecretKeyRef `json:"secretKeyRef,omitempty" yaml:"secretKeyRef,omitempty"`
}
type SecretKeyRef struct {
Name string `json:"name" yaml:"name"`
Key string `json:"key" yaml:"key"`
}
type Vault struct {
AgentInject bool `json:"agentInject,omitempty" yaml:"agentInject,omitempty"`
Secret string `json:"secret" yaml:"secret"`
Role string `json:"role" yaml:"role"`
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
ServiceAccount string `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty"`
ServiceAccountNamespace string `json:"serviceAccountNamespace,omitempty" yaml:"serviceAccountNamespace,omitempty"`
}
type SSM struct {
Name string `json:"name" yaml:"name"`
WithDecryption bool `json:"withDecryption,omitempty" yaml:"withDecryption,omitempty"`
Region string `json:"region,omitempty" yaml:"region,omitempty"`
AccessKeyID *ValueOrSecretRef `json:"accessKeyId,omitempty" yaml:"accessKeyId,omitempty"`
SecretAccessKey *ValueOrSecretRef `json:"secretAccessKey,omitempty" yaml:"secretAccessKey,omitempty"`
}