AWS Rosa HCP
This repository contains Tekton tasks for managing Openshift Rosa with HCP clusters in AWS.
Generate Openshift Rosa Cluster Name
This task generates the name for the Openshift Rosa cluster.
Parameters
This task does not have any parameters.
Results
cluster-name: The generated name for the Openshift cluster.
Steps
generate-cluster-name: Generates a unique cluster name using a prefix and a random hex string. It then outputs the cluster name to the specified result path.
Provision Rosa with HCP Cluster in AWS
This task provisions an Openshift Rosa with HCP cluster in AWS.
Parameters
ocp-version: The version of the OpenShift Container Platform (OCP) to deploy.
cluster-name: The name of the OpenShift cluster to be created.
machine-type: The type of AWS EC2 instance to use for the cluster nodes.
replicas: The number of worker nodes to provision in the cluster (default: 3).
konflux-test-infra-secret: The name of secret where testing infrastructures credentials are stored..
cloud-credential-key: The key secret from konflux-test-infra-secret where all AWS ROSA configurations are stored. You can refer to this link to create AWS resources
Results
ocp-login-command: Command to log in to the newly ephemeral OpenShift cluster.
Steps
provision: Configures AWS credentials and provisions the Openshift Rosa cluster. It sets up necessary environment variables and executes the provisioning commands.
Deprovision Rosa with HCP Cluster in AWS
This task deprovisions an existing Openshift Rosa cluster in AWS. To save time,it won't wait until HCP cluster is fully deprovisioned.
Parameters
test-name: The name of the test being executed.
ocp-login-command: Command to log in to the OpenShift cluster.
oras-container: The ORAS container registry URI to store artifacts.
pull-request-author: The GitHub username of the pull request author.
git-revision: The Git revision (commit SHA) of the current build.
pull-request-number: The number of the GitHub pull request.
git-repo: The name of the GitHub repository.
git-org: The GitHub organization or user that owns the repository.
cluster-name: The name of the OpenShift cluster to be deleted.
konflux-test-infra-secret: The name of secret where testing infrastructures credentials are stored.
cloud-credential-key: The key secret from konflux-test-infra-secret where all AWS ROSA configurations are stored. You can refer to this link to create AWS resources
AWS Credential Secret
You need to create a secret including the following data in Konflux, and pass its name to tasks as parameter aws-credential-secret
Setting Up Infrastructure Credentials
Infrastructure credentials are stored in the vault with the name konflux-test-infra
. If your team is not part of Konflux, create your own Infrastructure credentials in the vault using this structure as a reference:
github-bot-commenter-token: "ey...."
cloud-credential-{aws-region}:
To get all the values from rosa-hcp key please Red Hat documentation.
Steps
collect-artifacts: Collects artifacts from the OpenShift cluster.
inspect-upload-artifacts: Inspects artifacts for secrets and uploads them to the ORAS container registry if safe.
pull-request-comment: Posts a comment on the GitHub pull request with test results and artifact inspection instructions.
deprovision-rosa: Destroys the Openshift Rosa cluster. It logs in to the Red Hat account, configures AWS credentials, and triggers the deletion of the cluster without waiting for it to be completely deleted.
Example
Last updated