Istio Workspace Tekton Integration

You can use Istio Workspace to prepare special routes from a CI system, e.g. per PR to test/preview the changes before merging.

The Istio Workspace Tekton tasks wraps the Istio Workspace CLI into a Tekton Task for easy usage within the Tekton/Openshift Pipelines CI system.

Tasks

Istio Workspace Create Task

ike-create creates a new session object for istio-workspace and will provide a private route in the cluster for the given target.

ike-create

Parameters
  • namespace(string): Which namespace to target.

    • default value: $(context.taskRun.namespace)

  • target(string): What deployment to target.

  • session(string): What to call the session.

  • route(string): How to route.

    • default value:

  • image(string): The image to use for the route.

Results
  • url: The URL of the new route.

Usage
params:
  - name: target
    value: ratings-v1
  - name: session
    value: $(params.git-pr-head-ref)
  - name: image
    value: quay.io/workspace-demo/$(params.git-repo-name)-ratings:$(params.git-revision)
  - name: route
    value: "header:ike-session-id=$(params.git-pr-head-ref)"
yaml

Istio Workspace Delete Task

ike-delete removes a ref from a session object. If this is the last ref on the session the session will be deleted.

ike-delete

Parameters
  • namespace(string): Which namespace to target.

    • default value: $(context.taskRun.namespace)

  • target(string): What deployment to target.

  • session(string): What to call the session.

Results
The task does not define any results to be consumed further in the pipeline.
Usage
params:
  - name: target
    value: ratings-v1
  - name: session
    value: $(params.git-pr-head-ref)
yaml

Istio Workspace Session Url Task

ike-session-url is a convenient way to get a hold of the exposed URL for the a given session.

ike-session-url

Parameters
  • namespace(string): Which namespace to target.

    • default value: $(context.taskRun.namespace)

  • session(string): What to call the session.

Results
  • url: The URL of the new route.

Usage
params:
  - name: session
    value: $(params.git-pr-head-ref)
yaml