Skip to content

Application CRD integration #76

@coryodaniel

Description

@coryodaniel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions