Skip to content

Reference API key from a Kubernetes secret #138

@gjpin

Description

@gjpin

Hello!

While trying to reference a API key from a k8s secret, as mentioned in the README, helm fails to render the template and apply it.

secrets.yaml template is set to always create a k8s secret from the apiKey value.

Should the secret be created only if the apiKey value is set, like so?

{{- if not .Values.hyperdx.apiKey.valueFrom }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "hdx-oss.fullname" . }}-app-secrets
  labels:
    {{- include "hdx-oss.labels" . | nindent 4 }}
type: Opaque
data:
  api-key: {{ .Values.hyperdx.apiKey | b64enc }}
{{- end }}

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions