Skip to content

Unproject binding using mapping used to create projection #138

@scothis

Description

@scothis

If a binding is applied to a workload, and then the mapping definition for the binding changes, we cannot reliably use the current mapping to remove the projection. Currently the projector always uses the latest mapping definition for projection and unprojection.

From the spec:

When a service binding projection is removed, the controller MUST use the same mappings from the projection creation. After a ClusterWorkloadResourceMapping resource is modified, each binding targeting the mapped workload type MUST be removed, then reattempted with the latest mapping.

This requirement was added to the spec in servicebinding/spec#199, after the projector was written, but before 1.0.

We need to preserve the mapping used to make the projection on the workload so we the know we can unproject at any point in the future. One possibility is to encode the mapping as an annotation on the workload during projection, and look for that annotation during unprojection.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions