apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: taskcluster-built-in-workers
  labels:
    app.kubernetes.io/name: taskcluster-built-in-workers
    app.kubernetes.io/instance: '{{ .Release.Name }}'
    app.kubernetes.io/component: taskcluster-built-in-workers-secrets
    app.kubernetes.io/part-of: taskcluster
data:
  TASKCLUSTER_ROOT_URL: '{{ if typeIs "<nil>" .Values.rootUrl }}{{ else }}{{ if typeIs "string" .Values.rootUrl }}{{ .Values.rootUrl | b64enc }}{{ else }}{{ .Values.rootUrl | toJson | b64enc }}{{ end }}{{ end }}'
  TASKCLUSTER_CLIENT_ID: '{{ if typeIs "<nil>" .Values.built_in_workers.taskcluster_client_id }}{{ else }}{{ if typeIs "string" .Values.built_in_workers.taskcluster_client_id }}{{ .Values.built_in_workers.taskcluster_client_id | b64enc }}{{ else }}{{ .Values.built_in_workers.taskcluster_client_id | toJson | b64enc }}{{ end }}{{ end }}'
  TASKCLUSTER_ACCESS_TOKEN: '{{ if typeIs "<nil>" .Values.built_in_workers.taskcluster_access_token }}{{ else }}{{ if typeIs "string" .Values.built_in_workers.taskcluster_access_token }}{{ .Values.built_in_workers.taskcluster_access_token | b64enc }}{{ else }}{{ .Values.built_in_workers.taskcluster_access_token | toJson | b64enc }}{{ end }}{{ end }}'
  LEVEL: '{{ if typeIs "<nil>" .Values.built_in_workers.level }}{{ else }}{{ if typeIs "string" .Values.built_in_workers.level }}{{ .Values.built_in_workers.level | b64enc }}{{ else }}{{ .Values.built_in_workers.level | toJson | b64enc }}{{ end }}{{ end }}'
  ERROR_CONFIG: '{{ if typeIs "<nil>" .Values.errorConfig }}{{ else }}{{ if typeIs "string" .Values.errorConfig }}{{ .Values.errorConfig | b64enc }}{{ else }}{{ .Values.errorConfig | toJson | b64enc }}{{ end }}{{ end }}'
  NEW_RELIC: '{{ if typeIs "<nil>" .Values.newRelic }}{{ else }}{{ if typeIs "string" .Values.newRelic }}{{ .Values.newRelic | b64enc }}{{ else }}{{ .Values.newRelic | toJson | b64enc }}{{ end }}{{ end }}'
  DEBUG: '{{ if typeIs "<nil>" .Values.built_in_workers.debug }}{{ else }}{{ if typeIs "string" .Values.built_in_workers.debug }}{{ .Values.built_in_workers.debug | b64enc }}{{ else }}{{ .Values.built_in_workers.debug | toJson | b64enc }}{{ end }}{{ end }}'
