1
0
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:
Thomas Anderson
2024-06-23 19:20:21 +03:00
committed by GitHub
parent 4987fefba0
commit 7bc38a1d8b
9 changed files with 607 additions and 29 deletions

View File

@@ -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"