Fix installation of Kubernetes metrics server by updating the URL
[osm/devops.git] / installers / helm / osm / templates / nbi / nbi-certificate.yaml
1 {{- if .Values.nbi.enabled -}}
2 {{- if .Values.certauth.enabled -}}
3 #######################################################################################
4 # Copyright ETSI Contributors and Others.
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #    http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 # implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #######################################################################################
19 apiVersion: cert-manager.io/v1
20 kind: Certificate
21 metadata:
22   name: nbi
23   namespace: {{ .Release.Namespace }}
24 spec:
25   secretName: nbi-cert
26   privateKey:
27     rotationPolicy: Always
28     algorithm: ECDSA
29     size: 256
30   duration: "8760h"
31   renewBefore: "2208h"
32   dnsNames:
33   {{- if .Values.nbi.ingress.host }}
34     - {{ .Values.nbi.ingress.host }}
35   {{- else }}
36     - "nbi.{{ .Values.global.hostname }}"
37   {{- end }}
38   usages:
39     - "client auth"
40   issuerRef:
41     name: ca-issuer
42     kind: ClusterIssuer
43     group: cert-manager.io
44 {{- end }}
45 {{- end }}