Skip to content

Commit

Permalink
attempt to fix user certs with _ in the name to have - in the secret …
Browse files Browse the repository at this point in the history
…and cert name
  • Loading branch information
jessebot committed Dec 8, 2023
1 parent 9491334 commit e5ab717
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/cloudnative-pg-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cnpg-cluster
description: Create postgres tenant clusters managed by the CNPG Operator
type: application
version: 0.3.10
version: 0.3.11

maintainers:
- name: "cloudymax"
Expand Down
2 changes: 1 addition & 1 deletion charts/cloudnative-pg-cluster/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cnpg-cluster

![Version: 0.3.10](https://img.shields.io/badge/Version-0.3.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.3.11](https://img.shields.io/badge/Version-0.3.11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Create postgres tenant clusters managed by the CNPG Operator

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{{- if and .Values.certificates.user.enabled }}
{{- range .Values.certificates.user.username }}
{{- $username := . | replace "_" "-" -}}
---
apiVersion: v1
kind: Secret
metadata:
name: "{{ $.Values.name }}-{{ . }}-cert"
name: "{{ $.Values.name }}-{{ $username }}-cert"
labels:
cnpg.io/reload: ""
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "{{ $.Values.name }}-{{ . }}-cert"
name: "{{ $.Values.name }}-{{ $username }}-cert"
spec:
secretName: "{{ $.Values.name }}-{{ . }}-cert"
secretName: "{{ $.Values.name }}-{{ $username }}-cert"
usages:
- client auth
commonName: {{ . }}
Expand Down

0 comments on commit e5ab717

Please sign in to comment.