Git Product home page Git Product logo

Comments (3)

martin-helmich avatar martin-helmich commented on May 27, 2024 2

Apologies for the late response.

I'm hesitant to add additional complex features that are configurable using annotations (in fact, I'd prefer phasing out annotation support entirely in favour of using CRs).

Maybe we could extend the CR definition to allow templated values? Maybe something like this:

apiVersion: "secretgenerator.mittwald.de/v1alpha1"
kind: "StringSecret"
metadata:
  name: "example-pw"
  namespace: "default"
spec:
  forceRegenerate: false
  data:
    username: "testuser"
  fields:
    - fieldName: "postgresPassword"
      encoding: "hex"
      length: "15"
  templateFields:
    - fieldName: dbconfig
      template: |
        database:
          name: psycopg2
          args:
            user: synapse_user
            password: {{ .data.dbconfig }}

WDYT? Anyway, PRs are always welcome. 🙂

from kubernetes-secret-generator.

mittwald-machine avatar mittwald-machine commented on May 27, 2024

There has not been any activity to this issue in the last 30 days. It will automatically be closed after 7 more days. Remove the stale label to prevent this.

from kubernetes-secret-generator.

telmich avatar telmich commented on May 27, 2024

I'm also in favor for CR >> annotations. The template looks great, unfortunately my go skills are not really existing :-(
In regards to the template, I think you meant to refer {{ .data.postgresPassword }}, didn't you?

from kubernetes-secret-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.