Skip to content

Commit

Permalink
fix: unknown object type "nil" error in Kubernetes <= v1.24 (#537)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrizio Sestito <[email protected]>
  • Loading branch information
fabriziosestito authored Sep 18, 2024
1 parent 63d47e5 commit 5be967f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions charts/kubewarden-controller/templates/webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ metadata:
data:
ca.crt: {{ $caCert }}
ca.key: {{ $caPrivateKey }}
{{- if $oldCaCert }}
old-ca.crt: {{ $oldCaCert }}
{{- end }}
---
apiVersion: v1
kind: Secret
Expand Down
2 changes: 1 addition & 1 deletion charts/kubewarden-controller/tests/webhooks_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tests:
path: data["ca.crt"]
- isNotNullOrEmpty:
path: data["ca.key"]
- isNullOrEmpty:
- notExists:
path: data["old-ca.crt"]
- it: "should generate a leaf certificate and store it in the kubewarden-webhook-server-cert secret"
documentSelector:
Expand Down

0 comments on commit 5be967f

Please sign in to comment.