File tree Expand file tree Collapse file tree 5 files changed +66
-3
lines changed
Expand file tree Collapse file tree 5 files changed +66
-3
lines changed Original file line number Diff line number Diff line change 11apiVersion : v1
22name : pgdog
3- version : v0.22
3+ version : v0.23
Original file line number Diff line number Diff line change 11apiVersion : apps/v1
2+ {{- if .Values.statefulSet.enabled }}
3+ kind : StatefulSet
4+ {{- else }}
25kind : Deployment
6+ {{- end }}
37metadata :
48 name : {{ include "pgdog.fullname" . }}
59 labels :
610 {{- include "pgdog.labels" . | nindent 4 }}
711spec :
12+ {{- if .Values.statefulSet.enabled }}
13+ serviceName : {{ include "pgdog.fullname" . }}-headless
14+ {{- end }}
815 replicas : {{ .Values.replicas }}
916 selector :
1017 matchLabels :
3542 - " /etc/pgdog/pgdog.toml"
3643 - " --users"
3744 - " /etc/secrets/pgdog/users.toml"
45+ env :
46+ - name : NODE_ID
47+ valueFrom :
48+ fieldRef :
49+ fieldPath : metadata.name
3850 ports :
3951 - name : pgdog
4052 containerPort : {{ .Values.port }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.statefulSet.enabled }}
2+ apiVersion : v1
3+ kind : Service
4+ metadata :
5+ name : {{ include "pgdog.fullname" . }}-headless
6+ labels :
7+ {{- include "pgdog.labels" . | nindent 4 }}
8+ spec :
9+ type : ClusterIP
10+ clusterIP : None
11+ selector :
12+ {{- include "pgdog.selectorLabels" . | nindent 4 }}
13+ ports :
14+ - name : pgdog
15+ protocol : TCP
16+ port : {{ .Values.port }}
17+ targetPort : {{ .Values.port }}
18+ - name : openmetrics
19+ protocol : TCP
20+ port : {{ .Values.openMetricsPort }}
21+ targetPort : {{ .Values.openMetricsPort }}
22+ {{- end }}
Original file line number Diff line number Diff line change @@ -2,14 +2,29 @@ apiVersion: v1
22kind : Service
33metadata :
44 name : {{ include "pgdog.fullname" . }}
5- {{- if .Values.service.annotations }}
5+ {{- if or .Values.service.annotations .Values.service.aws.enabled }}
66 annotations :
7- {{- toYaml .Values.service.annotations | nindent 4 }}
7+ {{- if .Values.service.aws.enabled }}
8+ service.beta.kubernetes.io/aws-load-balancer-scheme : {{ .Values.service.aws.scheme | quote }}
9+ service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled : " true"
10+ service.beta.kubernetes.io/aws-load-balancer-nlb-target-type : " ip"
11+ service.beta.kubernetes.io/aws-load-balancer-type : " external"
12+ service.beta.kubernetes.io/aws-load-balancer-manage-backend-security-group-rules : " true"
13+ service.beta.kubernetes.io/aws-load-balancer-listener-attributes.TCP-{{ .Values.port }} : tcp.idle_timeout.seconds=1800
14+ {{- end }}
15+ {{- with .Values.service.annotations }}
16+ {{- toYaml . | nindent 4 }}
17+ {{- end }}
818 {{- end }}
919 labels :
1020 {{- include "pgdog.labels" . | nindent 4 }}
1121spec :
22+ {{- if .Values.service.aws.enabled }}
23+ type : LoadBalancer
24+ loadBalancerClass : service.k8s.aws/nlb
25+ {{- else }}
1226 type : {{ .Values.service.type }}
27+ {{- end }}
1328 selector :
1429 {{- include "pgdog.selectorLabels" . | nindent 4 }}
1530 {{- if .Values.service.trafficDistribution }}
Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ port: 6432
4040# replicas indicates how many instances of PgDog will run (HA).
4141replicas : 2
4242
43+ # statefulSet controls whether to deploy as StatefulSet instead of Deployment
44+ # StatefulSet provides stable DNS hostnames for each pod (e.g., pgdog-0, pgdog-1)
45+ statefulSet :
46+ # enabled switches from Deployment to StatefulSet
47+ enabled : false
48+
4349# resources define resource requests and limits for the pgdog container
4450# Note: requests and limits are set to the same values for Guaranteed QoS
4551# Ratio: 1GB memory per 1 CPU (1000m CPU = 1Gi memory)
@@ -106,6 +112,14 @@ service:
106112 # (PreferClose, PreferSameZone, PreferSameNode)
107113 # see https://kubernetes.io/docs/reference/networking/virtual-ips/#traffic-distribution for more details.
108114 trafficDistribution : " "
115+ # aws configures AWS Load Balancer Controller annotations
116+ # When enabled, service type is automatically set to LoadBalancer
117+ aws :
118+ # enabled controls whether to add AWS LB annotations
119+ enabled : false
120+ # scheme controls whether the load balancer is internet-facing or internal
121+ # Valid values: "internet-facing" or "internal"
122+ scheme : " internal"
109123
110124
111125# nodeSelector allows scheduling pods on nodes with specific labels
You can’t perform that action at this time.
0 commit comments