-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mutual SSL added in PGBouncer configuration in the Chart (#11384)
Adds SSL configuration for PGBouncer in the Helm Chart. PGBouncer is crucial to handle the big number of connections that airflow opens for the database, but often the database is outside of the Kubernetes Cluster or generally the environment where Airflow is installed and PGBouncer needs to connect securely to such database. This PR adds capability of seting CA/Certificate and Private Key in the PGBouncer configuration that allows for mTLS authentication (both client and server are authenticated) and secure connection even over public network. (cherry picked from commit 9a01ce0)
- Loading branch information
Showing
5 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
chart/templates/secrets/pgbouncer-certificates-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
################################ | ||
## Pgbouncer Certificate Secret | ||
################################# | ||
{{- if or .Values.pgbouncer.ssl.ca .Values.pgbouncer.ssl.cert .Values.pgbouncer.ssl.key }} | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ template "pgbouncer_certificates_secret" . }} | ||
labels: | ||
release: {{ .Release.Name }} | ||
chart: {{ .Chart.Name }} | ||
heritage: {{ .Release.Service }} | ||
{{- with .Values.labels }} | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
type: Opaque | ||
data: | ||
{{- if .Values.pgbouncer.ssl.ca }} | ||
root.crt: {{ .Values.pgbouncer.ssl.ca | b64enc }} | ||
{{- end }} | ||
{{- if .Values.pgbouncer.ssl.cert }} | ||
server.crt: {{ .Values.pgbouncer.ssl.cert | b64enc }} | ||
{{- end }} | ||
{{- if .Values.pgbouncer.ssl.key }} | ||
server.key: {{ .Values.pgbouncer.ssl.key | b64enc }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters