DopplerHQ / kubernetes-operator

Apache License 2.0
44 stars 18 forks source link

Is there an option to automatically create a new config if it's not found? #49

Closed michielswaanen closed 11 months ago

michielswaanen commented 11 months ago

Issue Description: I'm using Doppler for production, staging, and local development. To streamline the onboarding process for new developers, it would be beneficial if the Kubernetes operator could automatically generate new configurations if they are not already present. Currently, this requires an additional step, either using the CLI or the interface.

Suggested Approach: I'm currently using the following doppler.yaml configuration:

apiVersion: secrets.doppler.com/v1alpha1
kind: DopplerSecret
metadata:
  name: "{{ .Values.name }}-api-doppler"
  namespace: default
spec:
  tokenSecret:
    name: "doppler-api-token-secret"
  project: api
  config: 
     name: "{{ .Values.dopplerEnv }}"
     auto: true # Automatically creates the config if not found.
  managedSecret:
    name: "{{ .Values.name }}-api-secrets"
    namespace: default

Question: Is there an alternative approach using Kubernetes YAML files to achieve this desired behavior, without relying on the CLI or interface?

watsonian commented 11 months ago

@MichielS-1848709 Right now the operator won't create missing configs. To do that, you'd need to use some other automation using our Terraform provider, CLI, or our API. That said, it sounds like you're trying to create personal branches for your engineers (e.g., dev_michiel, dev_bob, dev_jane, etc.). If that's what you're after, then you'll be happy to hear that we're working on a new "personal branches" feature where users with access to a config will automatically get a personal config that only they have access to. It won't require any additional steps to create and should make this kind of thing a lot easier! I don't have an exact ETA for when that feature will release, but it's in the works! In the mean time, using some form of automation as mentioned earlier is probably the way to go!