Updating a Virtual Service Route Table

Update the name, description, or tags of a virtual service route table in Service Mesh.

Important

Before you proceed, you must set up the appropriate OCI policies for the virtual service route table resource. For details, see Required IAM Policy for Virtual Service Route Table.
    1. Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Service Mesh.
    2. Click Service Meshes.
    3. On the Service Mesh page, from the list of compartments on the left side, select a compartment.
    4. From the list of meshes, click the mesh that contains the virtual service for which you want to update the route table.
    5. On the details page of the mesh, click the virtual service that contains the route table.
    6. On the details page of the virtual service, under Resources, select Route Tables, and click the route table that you want to update.
    7. On the details page of the route table, click Edit.
    8. In the Edit Route Table panel, update the required details. You can update the description and priority of the route table.
    9. Click Save changes.
  • To see what operations are available for virtual-service-route-table update use:

    oci service-mesh virtual-service-route-table update -h

    To update a virtual service route table use the oci service-mesh virtual-service-route-table update option:

    oci service-mesh virtual-service-route-table update --virtual-service-route-table-id <virtualServiceRouteTableId> --route-rules <rules> --description <description> --priority <priority>

    where:

    • <virtualServiceRouteTableId>: The OCID of the virtual service route table.
    • <rules>
      • <type>: Choose between the HTTP, TCP, and TLS_PASSTHROUGH protocols. If TLS_PASSTHROUGH is selected, the proxy doesn't manage TLS. The proxy passes encrypted data "as is" to the application that manages TLS on its own.

        HTTP option:

        • <path>: A path to this route, for example, /mypath. Specify no path value to default to root ("/"). When you specify a path without a root value, the rule prepends the root ("/") to the path.
        • <pathType>: The type of path provided. The default PREFIX option treats the path as a prefix to an endpoint and is the only supported option. If pathType is not specified, the default is used.
        • <isGrpc>: If set to true, the rule checks that the content-type header contains application/grpc or one of the various application/grpc+ values.
      • <destinations>: Defines the virtual deployment destinations for this route. A minimum of one destination is required.
        • <virtualDeploymentId> The OCID of the virtual deployment where the request is routed.
        • <weight>: The weight for this destination. If only one destination is created, the value defaults to and must be 100. When multiple destinations are created, you can specify a value from 1-100 for each destination. When summed, the weights for all the destinations must total 100.
        • <port>:
          Select a port in the range of 1-65535. The rule allows only one port. If you don't specify a port, the rule targets all the ports on the virtual deployment.
          Caution

          Don't use the following Service Mesh reserved ports in your mesh resource: 15000, 15003, 15006, and 9901.
    • <description> (optional): The description of the virtual service route table. The field is changeable. Avoid entering confidential information.
    • <priority> (optional): Sets the route table priority from 1 to 1000. The default is 500. Lower numbers are a higher priority. At the same priority, route tables are prioritized based on the time created with the most recent route table taking the highest priority.

    For example:

    oci service-mesh virtual-service-route-table update --virtual-service-route-table-id ocid1.meshvirtualserviceroutetable.oc1..aaa... --route-rules '[{"destinations":[{"port":443,"type":"VIRTUAL_DEPLOYMENT","virtualDeploymentId":"ocid1.meshvirtualdeployment.oc1..aaa...","weight":100}],"isGrpc":true,"path":"/service-path","pathType":"PREFIX","type":"HTTP"}]' --description "my virtual-service-route-table" --priority 10

    The response to the command includes:

    • The virtual service route table's OCID
    • The life cycle state (for example, ACTIVE, FAILED).
    • The ID of the work request to update the virtual service route table (details of work requests are available for seven days after completion, cancellation, or failure).

    If you want the command to wait to return control until the virtual service route table is active or the request has failed, include either or both of the following parameters:

    • --wait-for-state SUCCEEDED
    • --wait-for-state FAILED

    For example:

    oci service-mesh virtual-service-route-table update --virtual-service-route-table-id ocid1.meshvirtualserviceroutetable.oc1..aaa... --route-rules '[{"destinations":[{"port":443,"type":"VIRTUAL_DEPLOYMENT","virtualDeploymentId":"ocid1.meshvirtualdeployment.oc1..aaa...","weight":100}],"isGrpc":true,"path":"/service-path","pathType":"PREFIX","type":"HTTP"}]' --description "my virtual-service-route-table" --priority 10 --wait-for-state SUCCEEDED
    Tip

    You can't use the virtual service route table until the work request has successfully updated it and the virtual service route table is active.

    Checking Virtual Service Route Table Status

    To see the status of the virtual service route table, enter:

    oci service-mesh virtual-service-route-table get --virtual-service-route-table-id <virtualServiceRouteTableId>

    To view the status of the work request creating the virtual service route table, refer to Service Mesh Work Requests.

    Updating a Virtual Service Route Table using JSON File

    Alternatively, update a virtual service route table by supplying a JSON file to the update command.

    1. Generate a sample JSON file for a virtual service route table:

      oci service-mesh virtual-service-route-table update --generate-full-command-json-input
    2. Update the JSON file with the sample-generated output from preceding step and update the fields with appropriate values.
    3. Supply the JSON file to the virtual-service-route-table update command:

      oci service-mesh virtual-service update --from-json file:///<filename>

    For more information about using the CLI, see:

  • Use the UpdateVirtualServiceRouteTable operation to update a virtual service route table.