1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/ossm-adding-project-using-smm-resource-cli.adoc
2023-10-30 10:13:25 -04:00

50 lines
2.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * service_mesh/v2x/ossm-create-mesh.adoc
:_mod-docs-content-type: PROCEDURE
[id="ossm-adding-project-using-smm-resource-cli_{context}"]
= Adding a project to the mesh using the ServiceMeshMember resource with the CLI
You can add one or more projects to the mesh using the `ServiceMeshMember` resource with the CLI.
.Prerequisites
* You have installed the {SMProductName} Operator.
* You know the name of the `ServiceMeshControlPlane` resource and the name of the project it belongs to.
* You know the 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` `Role` using a `RoleBinding` or `ClusterRoleBinding`. For more information, see _Creating the {SMProductName} members_.
.Procedure
. Log in to the {product-title} CLI.
. Create the YAML file for the `ServiceMeshMember` manifest. The manifest adds the `my-application` project to the service mesh that was created by the `ServiceMeshControlPlane` resource deployed in the `istio-system` namespace:
+
[source,yaml]
----
apiVersion: maistra.io/v1
kind: ServiceMeshMember
metadata:
name: default
namespace: my-application
spec:
controlPlaneRef:
namespace: istio-system
name: basic
----
. Apply the YAML file to create the `ServiceMeshMember` resource:
+
[source,terminal]
----
$ oc apply -f <file-name>
----
. After creating the `ServiceMeshMember` resource, verify that the namespace is part of the mesh. Confirm the that the value `True` appears in the `READY` column when you run the following command:
+
[source,terminal]
----
$ oc get smm default -n my-application
----
+
Alternatively, if you can access the `ServiceMeshMemberRoll` resource, you can also confirm that the `my-application` namespace is displayed in the `status.members` and `status.configuredMembers` fields of the `ServiceMeshMemberRoll` resource.