Not all MeshModel components will not be directly deployable to Kubernetes or another platform under management. Examples:
- Design Annotations: A “Note” component that Design authors can use to visually place notes on the canvas.
- Component Subsets: A “WASM Filter” component that represents a portion of an overall configuration for another component, like an “Envoy Filter”.
To satisfy these used cases, a new attribute is proposed isAnnotation
for the Components Schema. However, other component subset examples don’t necessary neatly fit within and are completely satisfied by an isAnnotation
attribute only. Example:
- A “Pod” component isAnnotation as a stand-alone resource. A “Pod” component can also be considered a subset of a Deployment or of a Cronjob or many other Kubernetes resources given the high reuse of the Pod spec.
Consider the scenario in which a user first defines a Pod (isAnnotation: true
), second defines a Deployment, after which they want to join the Pod as a child of Deployment, leaving both the parent and child as components in the design. A Relationship will need to accompany the Pod component in order to nullify it as independently deployable component and adjoining policy to affix (copy) the Pod component’s configuration into the Deployment component’s configuration.
isAnnotation
is proposed to be a mutable attribute of the Component located under metadata
, such that while a given Component may carry an initial value for this attribute, design authors may optionally choose to overwrite. Mutability of this attribute facilitates use cases like:
A separate, but related concern is that of deploy-time concerns that are preferences that can be updated at time of deployment of the design:
-
Depends-on- This includes the use case for deploying CRDs and Operators.
-
Ignore - Design author has a design full of components and wants to deploy a sub-section of the design (only specific components). Perhaps, they are performing a test or perhaps they want to avoid conflict with existing resources within the environment, like a Kubernetes Namespace without having to be bothered to remove the Namespace from the design.
What thoughts do you have about these use cases for incorporating isAnnotation
as an attribute in the ComponentSchema? Does such a combination of isAnnotation
and a Relationship satisfy these scenarios? Is there a more robust solution? In what other scenarios will additional Relationships (and their policies) will need to accompany certain components?