mirror of
https://codeberg.org/crowci/crow.git
synced 2025-08-09 07:42:52 +03:00
K8s secrets reference from step (#3655)
This commit is contained in:
@@ -16,6 +16,7 @@ type BackendOptions struct {
|
||||
NodeSelector map[string]string `mapstructure:"nodeSelector"`
|
||||
Tolerations []Toleration `mapstructure:"tolerations"`
|
||||
SecurityContext *SecurityContext `mapstructure:"securityContext"`
|
||||
Secrets []SecretRef `mapstructure:"secrets"`
|
||||
}
|
||||
|
||||
// Resources defines two maps for kubernetes resource definitions.
|
||||
@@ -65,6 +66,19 @@ type SecProfile struct {
|
||||
|
||||
type SecProfileType string
|
||||
|
||||
// SecretRef defines Kubernetes secret reference.
|
||||
type SecretRef struct {
|
||||
Name string `mapstructure:"name"`
|
||||
Key string `mapstructure:"key"`
|
||||
Target SecretTarget `mapstructure:"target"`
|
||||
}
|
||||
|
||||
// SecretTarget defines secret mount target.
|
||||
type SecretTarget struct {
|
||||
Env string `mapstructure:"env"`
|
||||
File string `mapstructure:"file"`
|
||||
}
|
||||
|
||||
const (
|
||||
SecProfileTypeRuntimeDefault SecProfileType = "RuntimeDefault"
|
||||
SecProfileTypeLocalhost SecProfileType = "Localhost"
|
||||
|
Reference in New Issue
Block a user