define new variables

This commit is contained in:
inovindasari
2024-11-25 14:49:24 +01:00
parent 766597980f
commit 8b79e33b1c
11 changed files with 45 additions and 3 deletions
+6
View File
@@ -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"`
+8
View File
@@ -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{
+2
View File
@@ -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"`