App Sig
For controllers that are creating multiple resources on behalf of a CRD.
Not exactly sure of the best way to integrate this, and not positive that all operators would benefit from it. So it may be best to implement as a module that could be used from a lifecycle function or possible as an additional library that can be included if needed.
I was thinking of implementing it as a struct that mimics the Application CRD's OpenAPI spec, but would accept a set of resource maps as well.
app = %Application{
name: "wordpress-01",
version: 3,
components: [],
assembly_phase: "Pending",
descriptor: %{
# version:
# description:
# icons:
# type:
# maintainers:
# owners:
# keywords:
# links:
}
}
deployment = %{
kind: "Deployment",
# ...
}
service = %{
kind: "Service",
# ...
}
app
|> Application.add_component(deployment)
|> Application.add_component(service)
|> Application.apply
Application.apply/1 would apply each component resource w/ proper labels to integrate w/ the Application CRD and finally create the Application resource
App Sig
For controllers that are creating multiple resources on behalf of a CRD.
Not exactly sure of the best way to integrate this, and not positive that all operators would benefit from it. So it may be best to implement as a module that could be used from a lifecycle function or possible as an additional library that can be included if needed.
I was thinking of implementing it as a struct that mimics the Application CRD's OpenAPI spec, but would accept a set of resource maps as well.
Application.apply/1would apply each component resource w/ proper labels to integrate w/ the Application CRD and finally create theApplicationresource