Skip to content

Clear Approach How Do We Prefer Configuring Dependent Resources - Behavior and Properties #1511

Closed
@csviri

Description

@csviri

Currently there could be two approaches to take how to specify some behavior / properties of a Dependent Resource. One is to specify it as a property, or implement it as an interface. To see on concrete example, the discriminator here is a property:

https://github.com/java-operator-sdk/java-operator-sdk/blob/9c1be9d59151f1673b5b2a5bea60543021fabd34/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/multiplemanageddependentsametype/MultipleManagedDependentResourceConfigMap2.java#L15-L16

While we set a SecondaryToPrimary mapper for a dependent resource, by implementing an interface:

https://github.com/java-operator-sdk/java-operator-sdk/blob/9c1be9d59151f1673b5b2a5bea60543021fabd34/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/primaryindexer/DependentPrimaryIndexerTestReconciler.java#L33-L34

we should clearly define how to and when to use an approach.

Notes

The result of this issues should be an ADR (But let's agree on guidlines) , also the adjustment to the implementation of any.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions