Skip to content

avoid empty dnsNames if custom issuerRef is set #1023

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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/redpanda/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type: application
# The chart version and the app version are not the same and will not track
# together. The chart version is a semver representation of changes to this
# chart.
version: 5.7.23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused why patch version was bumped +2, but not +1?

version: 5.7.25

# The app version is the default version of Redpanda to install.
# ** NOTE for maintainers: please ensure the artifacthub image annotation is updated before merging
Expand Down
26 changes: 26 additions & 0 deletions charts/redpanda/ci/20-certs-dns-names-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file name should be charts/redpanda/ci/19-certs-dns-names-values.yaml, right?

# 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.
---
tls:
enabled: true
certs:
default:
issuerRef:
name: custom-internal-issuer-ref
kind: ClusterIssuer
Comment on lines +19 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test will always fail as CI doesn't creates external issuer. It would require injecting ClusterIssuer in to template folder. That will only test helm install, but upgrade test would not work at all (helm upgrade) as chart-testing downloads previous version from the upstream.


external:
enabled: false
11 changes: 5 additions & 6 deletions charts/redpanda/templates/certs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ metadata:
{{- end }}
spec:
dnsNames:
{{- if (empty $data.issuerRef) }}
{{- if (tpl ($values.external.domain | default "") $) }}
- "{{ tpl $values.external.domain $ }}"
- "*.{{ tpl $values.external.domain $ }}"
{{ else }}
- {{ template "redpanda.fullname" $ }}-cluster.{{ printf "%s.%s.svc.%s" $service $ns $domain }}
- {{ template "redpanda.fullname" $ }}-cluster.{{ printf "%s.%s.svc" $service $ns }}
- {{ template "redpanda.fullname" $ }}-cluster.{{ printf "%s.%s" $service $ns }}
Expand All @@ -51,10 +54,6 @@ spec:
- {{ printf "*.%s.%s.svc" $service $ns | quote }}
- {{ printf "*.%s.%s" $service $ns | quote }}
{{- end }}
{{- if (tpl ($values.external.domain | default "") $) }}
- "{{ tpl $values.external.domain $ }}"
- "*.{{ tpl $values.external.domain $ }}"
{{- end }}
duration: {{ $d | default "43800h" }}
isCA: false
secretName: {{ template "redpanda.fullname" $ }}-{{ $name }}-cert
Expand Down Expand Up @@ -103,4 +102,4 @@ spec:
group: cert-manager.io
{{- end }}
{{- end }}
{{- end }}
{{- end }}