Create a secret for imagePullSecrets on K8S

Hi @dmcgeobroker!

Welcome to the Doppler Community!

If I’m following you right, you have a secret in Doppler that you want to be mapped into k8s with a different name (e.g., DOCKERCONFIGJSON to .dockerconfigjson). Is that right?

If so, then you should actually be able to do that using a newer feature we added to the operator:

The TL;DR is that you’d setup a processor like this:

apiVersion: secrets.doppler.com/v1alpha1
kind: DopplerSecret
metadata:
  name: prod-dockerhub
  namespace: doppler-operator-system
spec:
  tokenSecret:
    name: doppler-docker-secret
  managedSecret:
    name: regcred
    namespace: my-namespace
    type: kubernetes.io/dockerconfigjson
  processors:
    DOCKERCONFIGJSON:
      type: plain
      asName: .dockerconfigjson

This would result in a secret named regcred with one entry named .dockerconfigjson with the contents you expect. Give it a shot and let me know if that’ll accomplish what you’re after!

Regards,
-Joel

1 Like