Creating a release plan admission

A ReleasePlanAdmission (RPA) CR exists within a managed workspace. It defines the specific pipeline to run and a given Enterprise Contract Policy which needs to pass for the Snapshot before that pipeline can proceed.

When an application is ready for release, the Development team contacts the owners of the managed workspace (for example, their organization’s SRE team) and requested access to the managed workspace. A RPA object is then created in the managed workspace to specify the configuration.

Creating a ReleasePlanAdmission object

Prerequisites
  • An existing Development and Managed workspace.

  • An existing ReleasePlan object in the Development workspace.

Procedures
  1. Create a ReleasePlanAdmission.yaml object locally.

    Example ReleasePlanAdmission.yaml object

    apiVersion: appstudio.redhat.com/v1alpha1
    kind: ReleasePlanAdmission
    metadata:
     name: sre-production (1)
     namespace: managed-workspace (2)
    spec:
     applications:
      - demo-app (3)
     data: <key> (4)
     environment: <sre-production> (5)
     origin: <dev-workspace> (6)
     pipelineRef: <pipeline_ref> (7)
     policy: <policy> (8)
     serviceAccount: <service-account> (9)
    1 The name of the release plan admission.
    2 The Managed environment team’s workspace.
    3 A list of applications that you want to enable to be deployed in the managed workspace.
    4 Optional: An unstructured key used for providing data for the managed Pipeline.
    5 Optional: The environment from which the application updates are allowed to be received in the Managed workspace. This environment is created by the Development team.
    6 The development team workspace where the application is defined.
    7 Reference to the Pipeline to be executed by the release service.
    8 The enterprise contract policy against which the system validates an application before releasing it to production.
    9 Optional: The name of the service account to use in the Pipeline to gain elevated privileges. It’s used only if you have defined the pipelineRef value.
    The ReleasePlanAdmission.yaml represents the reciprocal link to the ReleasePlan.yaml objects created by the development team.
  2. In the Managed workspace, apply the ReleasePlanAdmission.yaml file and add the resource to your cluster by running the following command:

    oc apply -f ReleasePlanAdmission.yaml -n managed
Verification
  1. In the Konflux UI, select the Release services > Release plan admission tab.

  2. Review the RPA object that you just added. Using the Release plan admission tab, you can update or delete the selected Release plan object.

  3. When a ReleasePlanAdmission is correctly configured to be paired with a ReleasePlan, its Status will display as being Matched.