mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
45 lines
1.1 KiB
Go
45 lines
1.1 KiB
Go
// +kubebuilder:object:generate=true
|
|
package v1beta1
|
|
|
|
import (
|
|
corev1 "k8s.io/api/core/v1"
|
|
)
|
|
|
|
type ConfigSource struct {
|
|
// Selects a key of a ConfigMap.
|
|
// +optional
|
|
ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"`
|
|
// Selects a key of a secret in the pod's namespace
|
|
// +optional
|
|
SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"`
|
|
}
|
|
|
|
type PostgresConfig struct {
|
|
// +optional
|
|
Port int `json:"port"`
|
|
// +optional
|
|
PortFrom *ConfigSource `json:"portFrom"`
|
|
// +optional
|
|
Host string `json:"host"`
|
|
// +optional
|
|
HostFrom *ConfigSource `json:"hostFrom"`
|
|
// +optional
|
|
Username string `json:"username"`
|
|
// +optional
|
|
UsernameFrom *ConfigSource `json:"usernameFrom"`
|
|
// +optional
|
|
Password string `json:"password"`
|
|
// +optional
|
|
PasswordFrom *ConfigSource `json:"passwordFrom"`
|
|
// +optional
|
|
DisableSSLMode bool `json:"disableSSLMode"`
|
|
}
|
|
|
|
type PostgresConfigWithDatabase struct {
|
|
PostgresConfig `json:",inline"`
|
|
// +optional
|
|
Database string `json:"database"`
|
|
// +optional
|
|
DatabaseFrom *ConfigSource `json:"databaseFrom"`
|
|
}
|