Closed nebhale closed 3 years ago
Wildcards for versions?
@arturdzm Can you please write up an example for RuntimeComponent
?
@arthurdm Wildcard added and ready for review.
Example for RuntimeComponent
apiVersion: service.binding/v1alpha2
kind: ClusterApplicationResourceMapping
metadata:
name: app.stacks.runtimecomponent
spec:
versions:
- version: v1beta1
env:
- .spec.env
- .spec.initContainers[*].env
volumeMounts:
- .spec.volumeMounts
- .spec.initContainers[*].volumeMounts
volumes: .spec.volumes
We do not have containers[] in the spec, but RuntimeComponent
has spec.initContainers
We do have spec.sidecarContainers[]
that is appended to main application container as is
@arturdzm should the sidecar containers be bindable as well? Something like:
versions:
- version: v1beta1
env:
- .spec.env
- .spec.sidecarContainers[*].env
- .spec.initContainers[*].env
volumeMounts:
- .spec.volumeMounts
- .spec.sidecarContainers[*].volumeMounts
- .spec.initContainers[*].volumeMounts
volumes: .spec.volumes
@scothis Well, we no longer have any examples with a hard-coded version at all, nor do we have any that show the "fallback to wildcard" behavior where some versions can be specified but not all. On the other hand, there are no in-the-wild examples of either of those, so trying to force them in seems like a mistake.
This change adds an extension specification for a cluster-wide mapping of non-Podspec-able resource types acting as applications.