{{- if and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.hubble.tls.ca.cert .Values.hubble.tls.ca.key }}
---
apiVersion: v1
kind: Secret
metadata:
  name: hubble-ca-secret
  namespace: {{ .Release.Namespace }}
type: kubernetes.io/tls
data:
  ca.crt: {{ .Values.hubble.tls.ca.cert }}
  ca.key: {{ .Values.hubble.tls.ca.key }}
{{- end }}

{{- if and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.hubble.tls.ca.cert .Values.hubble.tls.ca.key }}
---
apiVersion: v1
kind: Secret
metadata:
  name: hubble-ca-secret
  namespace: {{ .Release.Namespace }}
data:
  ca.crt: {{ .Values.hubble.tls.ca.cert }}
  ca.key: {{ .Values.hubble.tls.ca.key }}
{{- end }}

Remove `type: kubernetes.io/tls` from hubble-ca-secret
helm: Remove `type: kubernetes.io/tls` from hubble-ca-secret

While `hubble-ca-secret` is technically a TLS secret, it does not
conform to the naming scheme outlined in
https://kubernetes.io/docs/concepts/services-networking/ingress/#tls

There is currently no technical reason for it to be a secret of type
`TLS`. Therefore we simply remove the type for now. Renaming the files
to be conform to `type: kubernetes.io/tls` would require more in-depth
changes, as certgen currently requires the files to be named
`ca.{crt,key}`. certgen itself creates the CA secrets with type `Opaque`
if they are absent, so this change is consent with what certgen already
does.

This commit does not contain any functional changes.

Signed-off-by: Sebastian Wicki <db043b2055cb3a47b2eb0b5aebf4e114a8c24a5a@isovalent.com>
