|
|
@@ -31,7 +31,7 @@ type Conf struct {
|
|
|
Namespace string
|
|
|
ID string
|
|
|
Redis *config.RedisConf
|
|
|
- Postgres *PostgresConf
|
|
|
+ Postgres *config.DBConf
|
|
|
Operation ProvisionerOperation
|
|
|
|
|
|
// provider-specific configurations
|
|
|
@@ -40,12 +40,6 @@ type Conf struct {
|
|
|
EKS *eks.Conf
|
|
|
}
|
|
|
|
|
|
-// PostgresConf is the postgres config for the provisioner container
|
|
|
-type PostgresConf struct {
|
|
|
- Host string
|
|
|
- Port int
|
|
|
-}
|
|
|
-
|
|
|
type ProvisionerOperation string
|
|
|
|
|
|
const (
|
|
|
@@ -172,19 +166,20 @@ func (conf *Conf) addRedisEnv(env []v1.EnvVar) []v1.EnvVar {
|
|
|
|
|
|
env = append(env, v1.EnvVar{
|
|
|
Name: "REDIS_USER",
|
|
|
- Value: "default",
|
|
|
+ Value: conf.Redis.Username,
|
|
|
})
|
|
|
|
|
|
env = append(env, v1.EnvVar{
|
|
|
- Name: "REDIS_PASS",
|
|
|
- ValueFrom: &v1.EnvVarSource{
|
|
|
- SecretKeyRef: &v1.SecretKeySelector{
|
|
|
- LocalObjectReference: v1.LocalObjectReference{
|
|
|
- Name: "redis",
|
|
|
- },
|
|
|
- Key: "redis-password",
|
|
|
- },
|
|
|
- },
|
|
|
+ Name: "REDIS_PASS",
|
|
|
+ Value: conf.Redis.Password,
|
|
|
+ // ValueFrom: &v1.EnvVarSource{
|
|
|
+ // SecretKeyRef: &v1.SecretKeySelector{
|
|
|
+ // LocalObjectReference: v1.LocalObjectReference{
|
|
|
+ // Name: "redis",
|
|
|
+ // },
|
|
|
+ // Key: "redis-password",
|
|
|
+ // },
|
|
|
+ // },
|
|
|
})
|
|
|
|
|
|
env = append(env, v1.EnvVar{
|
|
|
@@ -209,19 +204,12 @@ func (conf *Conf) addPostgresEnv(env []v1.EnvVar) []v1.EnvVar {
|
|
|
|
|
|
env = append(env, v1.EnvVar{
|
|
|
Name: "PG_USER",
|
|
|
- Value: "postgres",
|
|
|
+ Value: conf.Postgres.Username,
|
|
|
})
|
|
|
|
|
|
env = append(env, v1.EnvVar{
|
|
|
- Name: "PG_PASS",
|
|
|
- ValueFrom: &v1.EnvVarSource{
|
|
|
- SecretKeyRef: &v1.SecretKeySelector{
|
|
|
- LocalObjectReference: v1.LocalObjectReference{
|
|
|
- Name: "postgres-postgresql",
|
|
|
- },
|
|
|
- Key: "postgresql-password",
|
|
|
- },
|
|
|
- },
|
|
|
+ Name: "PG_PASS",
|
|
|
+ Value: conf.Postgres.Password,
|
|
|
})
|
|
|
|
|
|
return env
|