mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-08 17:51:31 +02:00
define new variables
This commit is contained in:
@@ -1497,6 +1497,12 @@ var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||
"pod_role_label": {
|
||||
Type: "string",
|
||||
},
|
||||
"pod_leader_label_value": {
|
||||
Type: "string",
|
||||
},
|
||||
"pod_standby_leader_label_value": {
|
||||
Type: "string",
|
||||
},
|
||||
"pod_service_account_definition": {
|
||||
Type: "string",
|
||||
},
|
||||
|
||||
@@ -81,6 +81,8 @@ type KubernetesMetaConfiguration struct {
|
||||
InfrastructureRolesSecretName spec.NamespacedName `json:"infrastructure_roles_secret_name,omitempty"`
|
||||
InfrastructureRolesDefs []*config.InfrastructureRole `json:"infrastructure_roles_secrets,omitempty"`
|
||||
PodRoleLabel string `json:"pod_role_label,omitempty"`
|
||||
PodLeaderLabelValue string `json:"pod_leader_label_value,omitempty"`
|
||||
PodStandbyLeaderLabelValue string `json:"pod_standby_leader_label_value,omitempty"`
|
||||
ClusterLabels map[string]string `json:"cluster_labels,omitempty"`
|
||||
InheritedLabels []string `json:"inherited_labels,omitempty"`
|
||||
InheritedAnnotations []string `json:"inherited_annotations,omitempty"`
|
||||
|
||||
@@ -950,6 +950,14 @@ func (c *Cluster) generateSpiloPodEnvVars(
|
||||
Name: "KUBERNETES_ROLE_LABEL",
|
||||
Value: c.OpConfig.PodRoleLabel,
|
||||
},
|
||||
{
|
||||
Name: "KUBERNETES_LEADER_LABEL_VALUE",
|
||||
Value: c.OpConfig.PodLeaderLabelValue,
|
||||
},
|
||||
{
|
||||
Name: "KUBERNETES_STANDBY_LEADER_LABEL_VALUE",
|
||||
Value: c.OpConfig.PodStandbyLeaderLabelValue,
|
||||
}
|
||||
{
|
||||
Name: "PGPASSWORD_SUPERUSER",
|
||||
ValueFrom: &v1.EnvVarSource{
|
||||
|
||||
@@ -48,6 +48,8 @@ type Resources struct {
|
||||
DeleteAnnotationDateKey string `name:"delete_annotation_date_key"`
|
||||
DeleteAnnotationNameKey string `name:"delete_annotation_name_key"`
|
||||
PodRoleLabel string `name:"pod_role_label" default:"spilo-role"`
|
||||
PodLeaderLabelValue string `name:"pod_leader_label_value" default:"master"`
|
||||
PodStandbyLeaderLabelValue string `name:"pod_standby_leader_label_value" default:"master"`
|
||||
PodToleration map[string]string `name:"toleration" default:""`
|
||||
DefaultCPURequest string `name:"default_cpu_request"`
|
||||
DefaultMemoryRequest string `name:"default_memory_request"`
|
||||
|
||||
Reference in New Issue
Block a user