post polishing for latest PRs
This commit is contained in:
parent
3b6dc4f92d
commit
4a99ea61e9
|
|
@ -263,6 +263,11 @@ spec:
|
|||
type: boolean
|
||||
enable_replica_load_balancer:
|
||||
type: boolean
|
||||
external_traffic_policy:
|
||||
type: string
|
||||
enum:
|
||||
- "Cluster"
|
||||
- "Local"
|
||||
master_dns_name_format:
|
||||
type: string
|
||||
replica_dns_name_format:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
{{- if .Values.priorityClassName }}
|
||||
apiVersion: scheduling.k8s.io/v1
|
||||
description: 'Use only for databases controlled by Postgres operator'
|
||||
kind: PriorityClass
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "postgres-operator.name" . }}
|
||||
helm.sh/chart: {{ template "postgres-operator.chart" . }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
name: {{ .Values.priorityClassName }}
|
||||
preemptionPolicy: PreemptLowerPriority
|
||||
globalDefault: false
|
||||
value: 1000000
|
||||
{{- end }}
|
||||
|
|
@ -183,6 +183,8 @@ configLoadBalancer:
|
|||
enable_master_load_balancer: false
|
||||
# toggles service type load balancer pointing to the replica pod of the cluster
|
||||
enable_replica_load_balancer: false
|
||||
# define external traffic policy for the load balancer
|
||||
external_traffic_policy: "Cluster"
|
||||
# defines the DNS name string template for the master load balancer cluster
|
||||
master_dns_name_format: "{cluster}.{team}.{hostedzone}"
|
||||
# defines the DNS name string template for the replica load balancer cluster
|
||||
|
|
|
|||
|
|
@ -172,6 +172,8 @@ configLoadBalancer:
|
|||
enable_master_load_balancer: "false"
|
||||
# toggles service type load balancer pointing to the replica pod of the cluster
|
||||
enable_replica_load_balancer: "false"
|
||||
# define external traffic policy for the load balancer
|
||||
external_traffic_policy: "Cluster"
|
||||
# defines the DNS name string template for the master load balancer cluster
|
||||
master_dns_name_format: '{cluster}.{team}.{hostedzone}'
|
||||
# defines the DNS name string template for the replica load balancer cluster
|
||||
|
|
|
|||
|
|
@ -434,6 +434,12 @@ CRD-based configuration.
|
|||
Those options affect the behavior of load balancers created by the operator.
|
||||
In the CRD-based configuration they are grouped under the `load_balancer` key.
|
||||
|
||||
* **custom_service_annotations**
|
||||
This key/value map provides a list of annotations that get attached to each
|
||||
service of a cluster created by the operator. If the annotation key is also
|
||||
provided by the cluster definition, the manifest value is used.
|
||||
Optional.
|
||||
|
||||
* **db_hosted_zone**
|
||||
DNS zone for the cluster DNS name when the load balancer is configured for
|
||||
the cluster. Only used when combined with
|
||||
|
|
@ -450,11 +456,8 @@ In the CRD-based configuration they are grouped under the `load_balancer` key.
|
|||
cluster. Can be overridden by individual cluster settings. The default is
|
||||
`false`.
|
||||
|
||||
* **custom_service_annotations**
|
||||
This key/value map provides a list of annotations that get attached to each
|
||||
service of a cluster created by the operator. If the annotation key is also
|
||||
provided by the cluster definition, the manifest value is used.
|
||||
Optional.
|
||||
* **external_traffic_policy** defines external traffic policy for load
|
||||
balancers. Allowed values are `Cluster` (default) and `Local`.
|
||||
|
||||
* **master_dns_name_format** defines the DNS name string template for the
|
||||
master load balancer cluster. The default is
|
||||
|
|
@ -470,9 +473,6 @@ In the CRD-based configuration they are grouped under the `load_balancer` key.
|
|||
replaced with the hosted zone (the value of the `db_hosted_zone` parameter).
|
||||
No other placeholders are allowed.
|
||||
|
||||
* **external_traffic_policy** define external traffic policy for the load
|
||||
balancer, it will default to `Cluster` if undefined.
|
||||
|
||||
## AWS or GCP interaction
|
||||
|
||||
The options in this group configure operator interactions with non-Kubernetes
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ data:
|
|||
# enable_team_superuser: "false"
|
||||
enable_teams_api: "false"
|
||||
# etcd_host: ""
|
||||
external_traffic_policy: "Cluster"
|
||||
# gcp_credentials: ""
|
||||
# kubernetes_use_configmaps: "false"
|
||||
# infrastructure_roles_secret_name: "postgresql-infrastructure-roles"
|
||||
|
|
@ -80,12 +81,12 @@ data:
|
|||
# pod_environment_secret: "my-custom-secret"
|
||||
pod_label_wait_timeout: 10m
|
||||
pod_management_policy: "ordered_ready"
|
||||
# pod_priority_class_name: "postgres-pod-priority"
|
||||
pod_role_label: spilo-role
|
||||
# pod_service_account_definition: ""
|
||||
pod_service_account_name: "postgres-pod"
|
||||
# pod_service_account_role_binding_definition: ""
|
||||
pod_terminate_grace_period: 5m
|
||||
# pod_priority_class_name: "postgres-pod-priority"
|
||||
# postgres_superuser_teams: "postgres_superusers"
|
||||
# protected_role_names: "admin"
|
||||
ready_wait_interval: 3s
|
||||
|
|
|
|||
|
|
@ -265,6 +265,11 @@ spec:
|
|||
type: boolean
|
||||
enable_replica_load_balancer:
|
||||
type: boolean
|
||||
external_traffic_policy:
|
||||
type: string
|
||||
enum:
|
||||
- "Cluster"
|
||||
- "Local"
|
||||
master_dns_name_format:
|
||||
type: string
|
||||
replica_dns_name_format:
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ configuration:
|
|||
# pod_environment_configmap: "default/my-custom-config"
|
||||
# pod_environment_secret: "my-custom-secret"
|
||||
pod_management_policy: "ordered_ready"
|
||||
# pod_priority_class_name: ""
|
||||
# pod_priority_class_name: "postgres-pod-priority"
|
||||
pod_role_label: spilo-role
|
||||
# pod_service_account_definition: ""
|
||||
pod_service_account_name: postgres-pod
|
||||
|
|
@ -90,12 +90,13 @@ configuration:
|
|||
resource_check_interval: 3s
|
||||
resource_check_timeout: 10m
|
||||
load_balancer:
|
||||
# db_hosted_zone: ""
|
||||
enable_master_load_balancer: false
|
||||
enable_replica_load_balancer: false
|
||||
# custom_service_annotations:
|
||||
# keyx: valuex
|
||||
# keyy: valuey
|
||||
# db_hosted_zone: ""
|
||||
enable_master_load_balancer: false
|
||||
enable_replica_load_balancer: false
|
||||
external_traffic_policy: "Cluster"
|
||||
master_dns_name_format: "{cluster}.{team}.{hostedzone}"
|
||||
replica_dns_name_format: "{cluster}-repl.{team}.{hostedzone}"
|
||||
aws_or_gcp:
|
||||
|
|
|
|||
|
|
@ -1135,12 +1135,6 @@ var OperatorConfigCRDResourceValidation = apiextv1beta1.CustomResourceValidation
|
|||
"enable_replica_load_balancer": {
|
||||
Type: "boolean",
|
||||
},
|
||||
"master_dns_name_format": {
|
||||
Type: "string",
|
||||
},
|
||||
"replica_dns_name_format": {
|
||||
Type: "string",
|
||||
},
|
||||
"external_traffic_policy": {
|
||||
Type: "string",
|
||||
Enum: []apiextv1beta1.JSON{
|
||||
|
|
@ -1152,6 +1146,12 @@ var OperatorConfigCRDResourceValidation = apiextv1beta1.CustomResourceValidation
|
|||
},
|
||||
},
|
||||
},
|
||||
"master_dns_name_format": {
|
||||
Type: "string",
|
||||
},
|
||||
"replica_dns_name_format": {
|
||||
Type: "string",
|
||||
},
|
||||
},
|
||||
},
|
||||
"aws_or_gcp": {
|
||||
|
|
|
|||
|
|
@ -177,10 +177,9 @@ type Config struct {
|
|||
EnablePodAntiAffinity bool `name:"enable_pod_antiaffinity" default:"false"`
|
||||
PodAntiAffinityTopologyKey string `name:"pod_antiaffinity_topology_key" default:"kubernetes.io/hostname"`
|
||||
StorageResizeMode string `name:"storage_resize_mode" default:"ebs"`
|
||||
// ExternalTrafficPolicy for load balancer
|
||||
ExternalTrafficPolicy string `name:"external_traffic_policy" default:"Cluster"`
|
||||
// deprecated and kept for backward compatibility
|
||||
EnableLoadBalancer *bool `name:"enable_load_balancer"`
|
||||
ExternalTrafficPolicy string `name:"external_traffic_policy" default:"Cluster"`
|
||||
MasterDNSNameFormat StringTemplate `name:"master_dns_name_format" default:"{cluster}.{team}.{hostedzone}"`
|
||||
ReplicaDNSNameFormat StringTemplate `name:"replica_dns_name_format" default:"{cluster}-repl.{team}.{hostedzone}"`
|
||||
PDBNameFormat StringTemplate `name:"pdb_name_format" default:"postgres-{cluster}-pdb"`
|
||||
|
|
|
|||
Loading…
Reference in New Issue