Skip to content

Commit

Permalink
OSSM-3796: revising instructions (squash)
Browse files Browse the repository at this point in the history
  • Loading branch information
rh-tokeefe committed May 4, 2023
1 parent 579074c commit fe37d32
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
10 changes: 5 additions & 5 deletions modules/ossm-about-adding-namespace.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
[id="ossm-about-adding-namespace_{context}"]
= About adding projects to a service mesh

A Kubernetes namespace provides a mechanism to scope resources in a cluster. In {product-title}, a project is essentially a Kubernetes namespace with additional annotations. You can add or remove projects from an existing {SMProductShortName} resource using the web console or the CLI.
A Kubernetes namespace provides a mechanism to scope resources in a cluster. In {product-title}, a project is essentially a Kubernetes namespace with additional annotations. You can add projects to an existing {SMProductShortName} resource using the web console or the CLI.

There are two methods to add a project to a service mesh:

* Specify a project in the `ServiceMeshMemberRoll` resource.
* Specify the project in the `ServiceMeshMemberRoll` resource.
* Create a `ServiceMeshMember` project in a namespace.
* Create a `ServiceMeshMember` resource in the project.
== ServiceMeshMemberRoll method

This is the simplest method to add a project to a service mesh. To add a project this way, specify the project in the `spec.members` field of the `ServiceMeshMemberRoll` resource.
This is the simplest method to add a project to a service mesh. Specify the project in the `spec.members` field of the `ServiceMeshMemberRoll` resource.

Adding projects using this methods requires a user to have mesh admin privileges.

== ServiceMeshMember method

`ServiceMeshMember` resources provide a way to add a project to a service mesh without modifying the `ServiceMeshMemberRoll` resource. To add projects this way, you create a `ServiceMeshMember` resource and the resource automatically adds the project in which it resides to the service mesh.
`ServiceMeshMember` resources provide a way to add a project to a service mesh without modifying the `ServiceMeshMemberRoll` resource. Create the `ServiceMeshMember` resource in the project that you want to add to the mesh.

This method of adding projects to a mesh can be used even when the users performing the task do not have direct access to the service mesh project or the `ServiceMeshMemberRoll` resource.
27 changes: 13 additions & 14 deletions modules/ossm-adding-project-using-smm-resource-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,24 @@

:_content-type: PROCEDURE
[id="ossm-adding-project-using-smm-resource-cli_{context}"]
= Adding a project to the service mesh using the ServiceMeshMember resource
= Adding a project to the service mesh using the `ServiceMeshMember` resource with the CLI

.Prerequisites
* An installed, verified {SMProductName} Operator.
* An existing `ServiceMeshMemberRoll` resource.
* Name of the project with the `ServiceMeshMemberRoll` resource.
* Names of the projects you want to add or remove from the mesh.
* Name of the `ServiceMeshControlPlane` resource and the name of the project that the resource resides in.
* Name of the project you want to add to the mesh.
* A service mesh administrator must explicitly grant access to the service mesh. Administrators can grant users permissions to access the mesh by assigning them the `mesh-user` user role.
.Procedure

. Log in to the {product-title} CLI.

. Edit the `ServiceMeshMemberRoll` resource.
+
[source,terminal]
----
$ oc edit smmr -n <controlplane-namespace>
----

. Modify the YAML file for the `ServiceMeshMember` manifest so it adds the `my-application` project namespace to the service mesh that was created by the SMCP resource deployed in the `istio-system` namespace.
. Create the YAML file for the `ServiceMeshMember` manifest. The manifest adds the `my-application` project namespace to the service mesh that was created by the SMCP resource deployed in the `istio-system` namespace:
+
[source,yaml]
----
apiVersion: maistra.io/v1
kind: ServiceMeshMemberRoll
kind: ServiceMeshMember
metadata:
name: default
namespace: my application
Expand All @@ -39,4 +31,11 @@ spec:
name: basic
----

After the `ServiceMeshMemberRoll` resource is created, you can verify the project namespace is part of the mesh by confirming the `my-application` namespace is displayed in the `status.members` and `status.configuredMembers` fields of the `ServiceMeshMemberRoll` resource.
. Apply the YAML file to create the `ServiceMeshMember` resource:
+
[source,terminal]
----
oc apply -f <file-name>
----

After the `ServiceMeshMember` resource is created, you can verify the project namespace is part of the mesh by confirming the `my-application` namespace is displayed in the `status.members` and `status.configuredMembers` fields of the `ServiceMeshMember` resource.
16 changes: 13 additions & 3 deletions modules/ossm-adding-project-using-smm-resource-console.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

.Prerequisites
* An installed, verified {SMProductName} Operator.
* An existing `ServiceMeshMemberRoll` resource.
* Name of the project with the `ServiceMeshMemberRoll` resource.
* Names of the projects you want to add or remove from the mesh.
* Name of the `ServiceMeshControlPlane` resource and the name of the project that the resource resides in.
* Name of the project you want to add to the mesh.
* A service mesh administrator must explicitly grant access to the service mesh. Administrators can grant users permissions to access the mesh by assigning them the `mesh-user` user role.
.Procedure
Expand All @@ -29,3 +28,14 @@

. Accept the default name for the `ServiceMeshMember`.

. Select the project you want to add to the mesh.

. Click to expand *ControlPlaneRef*.

. In the *Namespace* field, enter the project namespace that the `ServiceMeshControlPlane` resource belongs to. For example, `Default`.

. In the *Name* field, enter the name of the `ServiceMeshControlPlane` resource that this namespace belongs to. For example, `basic`.

. Click *Create*.

. To confirm the `ServiceMeshMember` resource was created, click the name of the resource, for example `default`, and view the details.

0 comments on commit fe37d32

Please sign in to comment.