servicebinding / spec

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

Define custom Secret type #130

Closed scothis closed 4 years ago

scothis commented 4 years ago

Replace the default Secret type of 'Opaque' with a custom value based on the data type. This will help advertise the content of the Secret and aid in discovery.

The type is recommended for secrets referenced by a provisioned service, and required for secrets created by a ServiceBinding.

Resolves #124

baijum commented 4 years ago

This will help advertise the content of the Secret and aid in discovery.

How is this helping discovery? It's not a fixed value, and the--field-selector flag doesn't support pattern matching.

If the information regarding type is available in the .type attribute, why secret requires the same information under data?

baijum commented 4 years ago

why secret requires the same information under data?

I realized one important use case. The data will be used by volume mount and it will be available as a file that can be accessed by the application within the container to identify the type.

scothis commented 4 years ago

How is this helping discovery? It's not a fixed value, and the --field-selector flag doesn't support pattern matching.

See https://github.com/k8s-service-bindings/spec/issues/124#issuecomment-708458374

I realized one important use case. The data will be used by volume mount and it will be available as a file that can be accessed by the application within the container to identify the type.

Yes, the .data.type value is crucial, the .type value is extra.

baijum commented 4 years ago

LGTM