Skip to content

Commit

Permalink
Fix certificate injection
Browse files Browse the repository at this point in the history
  • Loading branch information
eliaskoromilas committed May 8, 2024
1 parent 5400696 commit 29b06f7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/fpga-cloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ sources:
- https://docs.inaccel.com
- https://github.com/inaccel/helm
type: application
version: 1.2.1
version: 1.2.2
31 changes: 26 additions & 5 deletions charts/fpga-cloud/templates/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,38 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
labels:
app.kubernetes.io/component: cloud-init
{{- include "labels" $ | nindent 4 }}
name: {{ $.Chart.Name }}
name: {{ $.Chart.Name }}-cloud-init
namespace: {{ $.Release.Namespace }}
spec:
dnsNames:
- {{ $.Chart.Name }}
- {{ $.Chart.Name }}.{{ $.Release.Namespace }}
- {{ $.Chart.Name }}.{{ $.Release.Namespace }}.svc
- {{ $.Chart.Name }}-cloud-init
- {{ $.Chart.Name }}-cloud-init.{{ $.Release.Namespace }}
- {{ $.Chart.Name }}-cloud-init.{{ $.Release.Namespace }}.svc
issuerRef:
name: {{ $.Chart.Name }}
secretName: {{ $.Chart.Name }}
secretName: {{ $.Chart.Name }}-cloud-init
subject:
organizations:
- inaccel.com
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
labels:
app.kubernetes.io/component: kubevirt-hack
{{- include "labels" $ | nindent 4 }}
name: {{ $.Chart.Name }}-kubevirt-hack
namespace: {{ $.Release.Namespace }}
spec:
dnsNames:
- {{ $.Chart.Name }}-kubevirt-hack
- {{ $.Chart.Name }}-kubevirt-hack.{{ $.Release.Namespace }}
- {{ $.Chart.Name }}-kubevirt-hack.{{ $.Release.Namespace }}.svc
issuerRef:
name: {{ $.Chart.Name }}
secretName: {{ $.Chart.Name }}-kubevirt-hack
subject:
organizations:
- inaccel.com
Expand Down
4 changes: 2 additions & 2 deletions charts/fpga-cloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
path: certs/ssl.pem
- key: tls.key
path: private/ssl.key
secretName: {{ $.Chart.Name }}
secretName: {{ $.Chart.Name }}-cloud-init
{{- else }}
- emptyDir: {}
name: config-root
Expand Down Expand Up @@ -152,7 +152,7 @@ spec:
path: certs/ssl.pem
- key: tls.key
path: private/ssl.key
secretName: {{ $.Chart.Name }}
secretName: {{ $.Chart.Name }}-kubevirt-hack
{{- else }}
- emptyDir: {}
name: config-root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: MutatingWebhookConfiguration
metadata:
{{- if .Capabilities.APIVersions.Has "cert-manager.io/v1" }}
annotations:
cert-manager.io/inject-ca-from: {{ $.Release.Namespace }}/{{ $.Chart.Name }}
cert-manager.io/inject-ca-from: {{ $.Release.Namespace }}/{{ $.Chart.Name }}-cloud-init
{{- end }}
labels:
app.kubernetes.io/component: cloud-init
Expand All @@ -24,7 +24,7 @@ kind: MutatingWebhookConfiguration
metadata:
{{- if .Capabilities.APIVersions.Has "cert-manager.io/v1" }}
annotations:
cert-manager.io/inject-ca-from: {{ $.Release.Namespace }}/{{ $.Chart.Name }}
cert-manager.io/inject-ca-from: {{ $.Release.Namespace }}/{{ $.Chart.Name }}-kubevirt-hack
{{- end }}
labels:
app.kubernetes.io/component: kubevirt-hack
Expand Down

0 comments on commit 29b06f7

Please sign in to comment.