Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
doc: Update links in docs
Browse files Browse the repository at this point in the history
Update links to source code files in the OSM Components & Interactions and Design
documents.

Signed-off-by: Allen Leigh <allenlsy@gmail.com>
  • Loading branch information
allenlsy committed Feb 10, 2022
1 parent e507ca9 commit 401ca4b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
24 changes: 12 additions & 12 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ OSM ships out-of-the-box with all necessary components to deploy a complete serv


## OSM Components & Interactions
![OSM Components & Interactions](/docs/development_guide/osm-components-and-interactions.png)
![OSM Components & Interactions](/docs/images/osm-components-and-interactions.png)

### Containers
When a new Pod creation is initiated, OSM's
[MutatingWebhookConfiguration](/charts/osm/templates/mutatingwebhook.yaml)
[MutatingWebhookConfiguration](/pkg/injector/webhook.go#L422)
intercepts the
[create](/charts/osm/templates/mutatingwebhook.yaml#L40)
[pod](/pkg/injector/webhook.go#L42)
operations for [namespaces joined to the mesh](/charts/osm/templates/mutatingwebhook.yaml#L22),
[create](/pkg/injector/webhook.go#L462)
[pod](/pkg/injector/webhook.go#L466)
operations for [namespaces joined to the mesh](/pkg/injector/webhook.go#L394),
and forwards these API calls to the
[OSM control plane](/charts/osm/templates/mutatingwebhook.yaml#L12).
OSM control plane augments ([patches](/pkg/injector/webhook.go#L256-L262))
[OSM control plane](/pkg/injector/webhook.go#L431).
OSM control plane augments ([patches](/pkg/injector/webhook.go#L260-264))
the Pod spec with 2 new containers.
One is the [Envoy sidecar](/pkg/injector/patch.go#L67),
the other is an [init container](/pkg/injector/patch.go#L63).
The init container is ephemeral. It executes a [generated `iptables` script](/pkg/injector/iptables.go)
One is the [Envoy sidecar](/pkg/injector/patch.go#L84-85),
the other is an [init container](/pkg/injector/patch.go#L161-162).
The init container is ephemeral. It executes a [generated `iptables` script](/pkg/injector/iptables.go#L64)
and terminates.
The init container requires [NET_ADMIN Kernel capability](/pkg/injector/init-container.go#L21-L25) for
The init container requires [NET_ADMIN Kernel capability](/pkg/injector/init_container.go#L20-L22) for
[iptables](https://en.wikipedia.org/wiki/Iptables) changes to be applied.
OSM uses `iptables` to ensure that all inbound and outbound traffic flows through the Envoy sidecar.
The [init container Docker image](https://hub.docker.com/r/openservicemesh/init)
is passed as a string pointing to a container registry. This is passed via the `spec.sidecar.initContainerImage` field of the `MeshConfig`. The default value is defined in the [chart values](/charts/osm/values.yaml#L20).
is passed as a string pointing to a container registry. This is passed via the `spec.sidecar.initContainerImage` field of the `MeshConfig`. The default value is defined in the [chart values](/charts/osm/values.yaml#L23).

## High-level software architecture

Expand Down
23 changes: 12 additions & 11 deletions docs/development_guide/osm_components_interactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ weight: 1
### Containers

When a new Pod creation is initiated, OSM's
[MutatingWebhookConfiguration](https://github.com/openservicemesh/osm/blob/release-v0.3/charts/osm/templates/mutatingwebhook.yaml)
(MutatingWebhookConfiguration)[https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/webhook.go#L422]
intercepts the
[create](https://github.com/openservicemesh/osm/blob/release-v0.3/pkg/injector/webhook.go#L295)
[pod](https://github.com/openservicemesh/osm/blob/release-v0.3/pkg/injector/webhook.go#L299)
operations for [namespaces joined to the mesh](https://github.com/openservicemesh/osm/blob/release-v0.3/charts/osm/templates/mutatingwebhook.yaml#L19),
[create](https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/webhook.go#L462)
[pod](https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/webhook.go#L466)
operations for [namespaces joined to the mesh](https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/webhook.go#L394),
and forwards these API calls to the
[OSM control plane](https://github.com/openservicemesh/osm/blob/release-v0.3/charts/osm/templates/mutatingwebhook.yaml#L11).
OSM control plane augments ([patches](https://github.com/openservicemesh/osm/blob/release-v0.3/pkg/injector/webhook.go#L202-L208))
[OSM control plane](https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/webhook.go#L431).
OSM control plane augments ([patches](https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/webhook.go#L260-264))
the Pod spec with 2 new containers.
One is the [Envoy sidecar](https://github.com/openservicemesh/osm/blob/release-v0.3/pkg/injector/patch.go#L82-L86),
the other is an [init container](https://github.com/openservicemesh/osm/blob/release-v0.3/pkg/injector/patch.go#L61-L74).
The init container is ephemeral. It executes the [init-iptables.sh bash script](https://github.com/openservicemesh/osm/blob/release-v0.3/init-iptables.sh)
One is the [Envoy sidecar](https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/patch.go#L84-85),
the other is an [init container](https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/patch.go#L161-162) if system requirement meets.
The init container is ephemeral. It executes a [generated `iptables` script](https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/iptables.go#L64)
and terminates.
The init container requires [NET_ADMIN Kernel capability](https://github.com/openservicemesh/osm/blob/release-v0.3/pkg/injector/init-container.go#L21-L25) for
The init container requires [NET_ADMIN Kernel capability](https://github.com/openservicemesh/osm/blob/release-v1.0/pkg/injector/init_container.go#L20-L22) for
[iptables](https://en.wikipedia.org/wiki/Iptables) changes to be applied.
OSM uses `iptables` to ensure that all inbound and outbound traffic flows through the Envoy sidecar.
The [init container Docker image](https://hub.docker.com/r/openservicemesh/init)
is passed as a string pointing to a container registry. This is passed via the `--init-container-image` CLI param to the OSM controller on startup. The default value is defined in the [OSM Deployment chart](https://github.com/openservicemesh/osm/blob/release-v0.3/charts/osm/templates/osm-deployment.yaml#L33).
is passed as a string pointing to a container registry. The [init container Docker image](https://hub.docker.com/r/openservicemesh/init)
is passed as a string pointing to a container registry. This is passed via the `spec.sidecar.initContainerImage` field of the `MeshConfig`. The default value is defined in the [chart values](https://github.com/openservicemesh/osm/blob/release-v1.0/charts/osm/values.yaml#L23).
Binary file added docs/images/osm-components-and-interactions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 401ca4b

Please sign in to comment.