Hide template
This parameter should be a detail of internal implementation and only facilitate compatibility with the legacy behaviour if we want to recommend only using the new format.
This commit is contained in:
parent
602f26c0ce
commit
e85c21af61
|
|
@ -48,7 +48,7 @@ data:
|
||||||
# gcp_credentials: ""
|
# gcp_credentials: ""
|
||||||
# kubernetes_use_configmaps: "false"
|
# kubernetes_use_configmaps: "false"
|
||||||
# infrastructure_roles_secret_name: "postgresql-infrastructure-roles"
|
# infrastructure_roles_secret_name: "postgresql-infrastructure-roles"
|
||||||
# infrastructure_roles_secrets: "secretname:monitoring-roles,userkey:user,passwordkey:password,rolekey:inrole,template:true"
|
# infrastructure_roles_secrets: "secretname:monitoring-roles,userkey:user,passwordkey:password,rolekey:inrole"
|
||||||
# inherited_labels: application,environment
|
# inherited_labels: application,environment
|
||||||
# kube_iam_role: ""
|
# kube_iam_role: ""
|
||||||
# log_s3_bucket: ""
|
# log_s3_bucket: ""
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,9 @@ configuration:
|
||||||
# userkey: "user"
|
# userkey: "user"
|
||||||
# passwordkey: "password"
|
# passwordkey: "password"
|
||||||
# rolekey: "inrole"
|
# rolekey: "inrole"
|
||||||
# template: true
|
|
||||||
# - secretname: "other-infrastructure-role"
|
# - secretname: "other-infrastructure-role"
|
||||||
# userkey: "other-user-key"
|
# userkey: "other-user-key"
|
||||||
# passwordkey: "other-password-key"
|
# passwordkey: "other-password-key"
|
||||||
# template: false
|
|
||||||
# inherited_labels:
|
# inherited_labels:
|
||||||
# - application
|
# - application
|
||||||
# - environment
|
# - environment
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
|
|
@ -141,6 +140,7 @@ func (c *Controller) getInfrastructureRoleDefinitions() []*config.Infrastructure
|
||||||
// The field contains the format in which secret is written, let's
|
// The field contains the format in which secret is written, let's
|
||||||
// convert it to a proper definition
|
// convert it to a proper definition
|
||||||
properties := strings.Split(c.opConfig.InfrastructureRolesDefs, propertySep)
|
properties := strings.Split(c.opConfig.InfrastructureRolesDefs, propertySep)
|
||||||
|
roleDef = config.InfrastructureRole{Template: false}
|
||||||
|
|
||||||
for _, property := range properties {
|
for _, property := range properties {
|
||||||
values := strings.Split(property, valueSep)
|
values := strings.Split(property, valueSep)
|
||||||
|
|
@ -163,10 +163,6 @@ func (c *Controller) getInfrastructureRoleDefinitions() []*config.Infrastructure
|
||||||
roleDef.PasswordKey = value
|
roleDef.PasswordKey = value
|
||||||
case "rolekey":
|
case "rolekey":
|
||||||
roleDef.RoleKey = value
|
roleDef.RoleKey = value
|
||||||
case "template":
|
|
||||||
if roleDef.Template, err = strconv.ParseBool(value); err != nil {
|
|
||||||
c.logger.Warningf("Could not extract template information %s: %v", value, err)
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
c.logger.Warningf("Role description is not known: %s", properties)
|
c.logger.Warningf("Role description is not known: %s", properties)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue