Skip to content

Commit 434cf6e

Browse files
authored
Merge pull request #620 from layer5io/reference-relationship
add reference relationship docs
2 parents c796762 + 964b0f1 commit 434cf6e

2 files changed

Lines changed: 52 additions & 13 deletions

File tree

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Understanding Model Relationships
2+
title: Understanding Relationships
33
weight: 4
44
type: docs
55
description: >
@@ -10,7 +10,7 @@ aliases:
1010
- /meshmap/concepts/relationships
1111
---
1212

13-
## What are Model Relationships?
13+
## What are Relationships?
1414

1515
Relationships define the nature of interaction between interconnected components in Kanvas. They represent various types of connections and dependencies between components no matter the genealogy of the relationship such as parent, siblings, binding.
1616

@@ -27,46 +27,85 @@ Edge relationships indicate the possibility of traffic flow between two componen
2727
**i. Edge-Network:**
2828

2929
The Edge-Network relationship type configures the networking between one or more components. This deals with IP addresses and DNS names and provides stable endpoints for communication. For instance, a “Service” provides a stable endpoint for accessing multiple replicas of a “Deployment”. Here's a visual representation of this kind of relationship.
30-
30+
3131
![example of edge-network relationship](./EdgeNetworkRelationship.svg)
32-
32+
3333
**ii. Edge-Firewall**
3434

3535
This acts as intermediary for communications which include standard networking protocols like TCP and UDP. It can enforce network policies to control traffic between components, for example between two Pods.
36-
36+
3737
![example of edge-firewall relationship](./edge_firewall_relationship_pod_to_pod.svg)
38-
38+
3939
**iii. Edge-Mount**
4040

4141
This subtype addresses the storage and access possibility between involved components. For example, a “PersistentVolume” can be mounted to a “Pod” to provide persistent storage for the pod’s data.
42-
42+
4343
![example of edge-mount relationship](./EdgeMountRelationship.svg)
44-
44+
4545
**iv. Edge-Permission**
4646

4747
This defines the permissions for components if they can have a possible relationship with other components. It ensures that only authorized components can interact with each other. For example, a “Role” can define permissions for Components to access specific resources.
48-
48+
4949
![example of edge-permission relationship](./edge_permission_relationship_cluster_role_service_account.svg)
5050

5151

52+
53+
**v. Edge-Reference**
54+
55+
The **Edge-Reference** relationship type represents a **logical or declarative link** between two components, where one component **refers to another by name, identifier, type, or scope**. This relationship allows components to dynamically locate, associate with, or depend on other components without being tightly coupled to them. It forms the basis for indirect communication, configuration reuse, ownership tracking, and dependency resolution in distributed systems.
56+
57+
This type of relationship does **not directly provide communication, access, or permission**, but **enables such interactions by declaring intent or pointing to another component**.
58+
59+
60+
**Example of an Edge-Reference Relationship**
61+
62+
* A component that refers to a configuration object (e.g., referencing a config file or environment settings).
63+
* A workload component referencing a credentials object or identity provider.
64+
* A service referencing a volume or storage claim.
65+
* A managed resource referencing its controller or owner entity.
66+
67+
**Kubernetes-Based Example**
68+
69+
```yaml
70+
apiVersion: v1
71+
kind: Pod
72+
metadata:
73+
name: example-pod
74+
spec:
75+
containers:
76+
- name: app
77+
image: nginx
78+
envFrom:
79+
- configMapRef:
80+
name: app-config # <- Reference to configuration object
81+
volumes:
82+
- name: secret-volume
83+
secret:
84+
secretName: app-secret # <- Reference to secret
85+
```
86+
87+
88+
89+
![example of edge-reference relationship](./reference-deployment-configmap.png)
90+
5291
### 2. Hierarchical Relationships
5392
5493
Hierarchical relationships involve either an ancestral connection of the components (i.e. the creation/deletion of a component higher up affects the existence of the components below in the lineage) or a connection which involves the inheritence of features from one component to the other. There are 2 subtypes of the hierarchical relationship.
5594
5695
**i. Hierarchical-Inventory**
5796
5897
This is a relationship between components where the configuration settings of one component, known as the parent, are combined or integrated with the configuration settings of another component, known as the child. This implies that changes or updates made to the parent component can affect or influence the configuration of the child component. Here's an example of a Hierarchical-Inventory relationship
59-
98+
6099
![example of edge-permission relationship](./Hierachical_Inventory_Relationships.svg)
61-
100+
62101
**ii. Hierarchical-Parent**
63102
64103
A parent-child relationship implies that the parent component must be present or established before the child component can be created. For instance, in Kubernetes, a 'Namespace' can serve as a parent to 'Pods' within that namespace. Therefore, the namespace must be created beforehand for pods to be deployed within it. Here's an example of a Hierarchical-Parent relationship
65-
104+
66105
![example of edge-permission relationship](./Hierarchical_Parent_Relationship.svg)
67106
68107
### 3. TagSets Relationships
69108
70109
These represent relationships between components of same Labels or Annotations key/value pairs. Labels and Annotations are two different types of Tags. Labels are often used to identify components and are visible on the design canvas. Annotations are often used to provide additional information about components.
71110
72-
![example of Tag sets](./tags.png)
111+
![example of Tag sets](./tags.png)
67.8 KB
Loading

0 commit comments

Comments
 (0)