servicebinding / spec

Specification for binding services to k8s workloads
https://servicebinding.io
Apache License 2.0
92 stars 35 forks source link

feat: allow users to define static key-value pairs in Service Binding… #151

Closed johnpoth closed 3 years ago

johnpoth commented 3 years ago

… annotations (#140)

This is especially useful when defining Service Binding annotations in CRDs who's value are the same across all CRs. For example, the type and provider will be the same for Databases or Kafka brokers etc ...

Thanks !

nebhale commented 3 years ago

@johnpoth Thanks for the contribution! I don't think that we're going to include this change because we're talking about a much more flexible approach to how mappings are done (#145). If you read that over, it becomes much clearer how static contributions might be added (TypeProvider notably, but almost any of the templates could do it too). It also frees us up to talk about Cluster-wide mappings.

It'd be great if you could chime in on #145 about how you think about the problem, and whether the described solution works for you.

johnpoth commented 3 years ago

Another advantage I came across is that it avoid users creating mappings and thus is less error prone then what the Spec offers today or described in #145.

If the a key/value pair is static and is defined in the CRD then it doesn't need to exist anywhere else. This makes one less field the user doesn't have to worry about.

I've updated the syntax a little bit to leverage Go templates, thanks !

nebhale commented 3 years ago

This may be covered by an expansion/update of the Secret Generation Strategies covered by #161.