From 4382faacc27a960577d6356a2e7409c70cd38425 Mon Sep 17 00:00:00 2001 From: Jason Madigan Date: Tue, 12 Mar 2024 10:54:51 +0000 Subject: [PATCH] Fixes for the CI/CD guide --- doc/kuadrantctl-ci-cd.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/kuadrantctl-ci-cd.md b/doc/kuadrantctl-ci-cd.md index 383af2f..6482f26 100644 --- a/doc/kuadrantctl-ci-cd.md +++ b/doc/kuadrantctl-ci-cd.md @@ -2,14 +2,14 @@ This guide demonstrates setting up a CI/CD pipeline using Tekton to deploy Kubernetes Gateway API and Kuadrant resources generated by `kuadrantctl`, from an OpenAPI specification. In this example, these resources are applied directly to the cluster where Tekton is running. -Prerequisites: +## Prerequisites - Kuadrant, and all of its pre-requisites, is installed onto a cluster -- (Tekton Pipelines[https://tekton.dev/]) installed on your Kubernetes or OpenShift cluster. -- (`kubectl`[https://kubernetes.io/docs/reference/kubectl/]) configured to communicate with your cluster (i.e you have a kubectl config available with access to your cluster) -- (Tekton CLI `tkn`[https://tekton.dev/docs/cli/]) (optional) for easier interaction with Tekton resources. +- [Tekton Pipelines](https://tekton.dev/) installed on your Kubernetes or OpenShift cluster. +- [`kubectl`](https://kubernetes.io/docs/reference/kubectl/) configured to communicate with your cluster (i.e you have a kubectl config available with access to your cluster) +- [Tekton CLI `tkn`](https://tekton.dev/docs/cli/) (optional) for easier interaction with Tekton resources. -Setup: +## Setup First, create a dedicated namespace: @@ -17,7 +17,7 @@ First, create a dedicated namespace: kubectl create namespace petstore ``` -Step 1: Create a Persistent Volume Claim +## Create a Persistent Volume Claim To store Tekton build artifacts, create a PVC in the petstore namespace: @@ -37,7 +37,7 @@ spec: EOF ``` -Step 2: Define the Tekton Task +## Define the Tekton Task Define the task that outlines steps to clone a repository, generate Kuadrant and Kubernetes resources using `kuadrantctl`, and apply them directly to the cluster: @@ -107,13 +107,13 @@ spec: EOF ``` -We're using Tekton here with a kubectl to apply resources to a cluster. We would generally recommend looking at a tool such as (ArgoCD)[https://argo-cd.readthedocs.io/en/stable/] to implement continuous delivery via a GitOps approach. In this scenario, you would: +We're using Tekton here with `kubectl` to apply resources to a cluster. We recommend looking at a tool such as (ArgoCD)[https://argo-cd.readthedocs.io/en/stable/] to implement continuous delivery via a GitOps approach. In this scenario, you would: - Use `kuadrantctl` to generate Kubernetes/Kuadrant resources as part a Tekton pipeline - Commit these new resources in to a git respository - Use ArgoCD to sync these changes via a Git respository to a Kubernetes or OpenShift cluster -Step 3: Create a Kubeconfig Secret +## Create a Kubeconfig Secret Provide Tekton access to your Kubernetes cluster by creating a secret with your kubeconfig in the `petstore` namespace: @@ -149,7 +149,7 @@ roleRef: EOF ``` -Step 4: Trigger the `TaskRun` +## Trigger the `TaskRun` Execute the task within the `petstore` namespace, referencing the kubeconfig secret for cluster access: