Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Models]: Add feature to write relationships for multiple models in the same file #10710

Open
pandeyshubham03 opened this issue Apr 10, 2024 · 0 comments
Labels
area/models Models, Components, Relationships related changes kind/feature New major feature or request

Comments

@pandeyshubham03
Copy link
Contributor

Current Situation

Currently, to define multiple relationships for the same component inside multiple Models in the same category or Models having similar origins, manual effort is required to define each relationship. For example, Field Export is a common component in every AWS Model and the behavior of Field Export is similar inside every model. But to define this relationship requires manual effort to define each relationship individually.

Proposed Change

Addition of a feature that will allow all Models/ Components starting or ending with a similar name to be covered under a single relationship definition. For example aws-* will cover all Models whose names start with aws-.

Contributor Guides and Handbook

Contributing to Meshery Models

!! See https://docs.meshery.io/project/contributing/contributing-models

Instructions for Models

Forthcoming

Instructions for Components

While the default shape for new components is a circle, each component should be considered for its best-fit shape.

  1. Review and familiarize with the available set of predefined relationship types. Refer the Cytoscape node types for a list of possible shapes.
  2. Propose a specific shape, best-suited to visually represent the Component. Example - Deployment as a pentagon.
  3. Proposee a specific icon, best-suited to visually represent the Component. Example - DaemonSet as a skull icon.

Instructions for Relationships

  1. Identify the relationship and any specific constraints to be enforced between the two specific components, their models or potentially other components, models, or environmental considerations.
  2. Propose a specific visual representation for the relationship. See example on Modeling Relationships.
  3. Prospose the appropriate relationship type, using one of the predefined set of relationship types or suggest a new relationship where an existing type does not fit.
  4. Create a Relationship Definition (yaml).
  5. Create a policy for evaluation of the relationship (rego).
  6. Review a prior pull request as an example of how to define a Relationships: https://github.com/meshery/meshery/pull/9880/files

Instructions for Policies

  1. Forthcoming
@pandeyshubham03 pandeyshubham03 added area/models Models, Components, Relationships related changes kind/feature New major feature or request labels Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/models Models, Components, Relationships related changes kind/feature New major feature or request
Projects
None yet
Development

No branches or pull requests

1 participant