Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Skip mounting Postgres TLS certificats from secret when sslSource is 'manual' #189

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/bindplane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: bindplane
description: BindPlane OP is an observability pipeline.
type: application
# The chart's version
version: 1.23.0
version: 1.23.1
# The BindPlane OP tagged release. If the user does not
# set the `image.tag` values option, this version is used.
appVersion: 1.84.0
Expand Down
2 changes: 1 addition & 1 deletion charts/bindplane/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bindplane

![Version: 1.23.0](https://img.shields.io/badge/Version-1.23.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.84.0](https://img.shields.io/badge/AppVersion-1.84.0-informational?style=flat-square)
![Version: 1.23.1](https://img.shields.io/badge/Version-1.23.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.84.0](https://img.shields.io/badge/AppVersion-1.84.0-informational?style=flat-square)

BindPlane OP is an observability pipeline.

Expand Down
6 changes: 4 additions & 2 deletions charts/bindplane/templates/bindplane-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ spec:
{{- toYaml .Values.topologySpreadConstraints.jobs | nindent 8 }}
{{- end }}
{{- if .Values.backend.postgres.sslsecret.name }}
{{- if eq .Values.backend.postgres.sslSource "secret" }}
initContainers:
- name: postgres-tls
image: {{ .Values.busybox_image }}
Expand All @@ -74,6 +73,7 @@ spec:
subPath: init.sh
- mountPath: /postgres-tls
name: postgres-tls-dir
{{- if eq .Values.backend.postgres.sslSource "secret" }}
{{- if .Values.backend.postgres.sslsecret.sslrootcertSubPath }}
- mountPath: /ca.crt
name: {{ .Values.backend.postgres.sslsecret.name }}
Expand All @@ -87,7 +87,7 @@ spec:
name: {{ .Values.backend.postgres.sslsecret.name }}
subPath: {{ .Values.backend.postgres.sslsecret.sslkeySubPath }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
containers:
- name: server
Expand Down Expand Up @@ -613,10 +613,12 @@ spec:
{{- if .Values.backend.postgres.sslsecret.name }}
- name: postgres-tls-dir
emptyDir: {}
{{- if eq .Values.backend.postgres.sslSource "secret" }}
- name: {{ .Values.backend.postgres.sslsecret.name }}
secret:
defaultMode: 0400
secretName: {{ .Values.backend.postgres.sslsecret.name }}
{{- end }}
- name: postgres-tls-init
configMap:
name: postgres-tls-init
Expand Down
6 changes: 4 additions & 2 deletions charts/bindplane/templates/bindplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ spec:
mountPath: /data
{{- end }}
{{- if .Values.backend.postgres.sslsecret.name }}
{{- if eq .Values.backend.postgres.sslSource "secret" }}
- name: postgres-tls
image: {{ .Values.busybox_image }}
command:
Expand All @@ -99,6 +98,7 @@ spec:
subPath: init.sh
- mountPath: /postgres-tls
name: postgres-tls-dir
{{- if eq .Values.backend.postgres.sslSource "secret" }}
{{- if .Values.backend.postgres.sslsecret.sslrootcertSubPath }}
- mountPath: /ca.crt
name: {{ .Values.backend.postgres.sslsecret.name }}
Expand All @@ -112,7 +112,7 @@ spec:
name: {{ .Values.backend.postgres.sslsecret.name }}
subPath: {{ .Values.backend.postgres.sslsecret.sslkeySubPath }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
containers:
- name: server
Expand Down Expand Up @@ -671,10 +671,12 @@ spec:
{{- if .Values.backend.postgres.sslsecret.name }}
- name: postgres-tls-dir
emptyDir: {}
{{- if eq .Values.backend.postgres.sslSource "secret" }}
- name: {{ .Values.backend.postgres.sslsecret.name }}
secret:
defaultMode: 0400
secretName: {{ .Values.backend.postgres.sslsecret.name }}
{{- end }}
- name: postgres-tls-init
configMap:
name: postgres-tls-init
Expand Down
4 changes: 2 additions & 2 deletions charts/bindplane/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ data:
chmod 0750 /data
{{ end }}
{{- if .Values.backend.postgres.sslsecret.name }}
{{- if eq .Values.backend.postgres.sslSource "secret" }}
kind: ConfigMap
apiVersion: v1
metadata:
name: postgres-tls-init
data:
init.sh: |
#!/bin/sh
{{- if eq .Values.backend.postgres.sslSource "secret" }}
cp /ca.crt /client.crt /client.key /postgres-tls
{{- end }}
chmod 0400 /postgres-tls/*
chown -R 65534:65534 /postgres-tls
{{ end }}
{{ end }}