edp-tekton
by sergk
A Helm chart for KubeRocketCI Tekton Pipelines
About this chart
edp-tekton
A Helm chart for KubeRocketCI Tekton Pipelines
Additional Information
Tekton Pipelines
Tekton Pipelines supports four VCS: Gerrit, GitHub, GitLab and BitBucket. To check the VCS Import strategy, please refer to the KubeRocketCI Documentation).
Tekton Pipelines are implemented and packaged using the helm-chart approach. The helm-chart contains:
Tasks- basic building block for Tekton. Some of the tasks are forks from Upstream Tekton Catalog.Pipelines, which consist ofTasksand implement logic for the CI flow. KubeRocketCI follows the below approach for pipelines definition:- Each type of VCS has its own Pipelines, e.g. for Gerrit, GitHub, GitLab and BitBucket;
- KubeRocketCI has two types of Pipelines:
CodeReview- triggers on Review,Build- triggers on Merged Event.
Triggers,TriggerBindings,TriggerTemplates- defines the logic for specific VCS Events (Gerrit, GitHub, GitLab, BitBucket) and Pipelines.Resources- Kubernetes resources, that are used from Pipelines, e.g.ServiceAccountwith IRSA Enablement,ConfigMapsfor Maven/Gradle Pipelines, Tekton cache, CodeNarc, CTLint, and PVC to share resources between Tasks.
EDP Interceptor
EDP Interceptor is used as a component that provides KubeRocketCI metadata for Tekton Pipelines. The code is based on Upstream implementation.
EDP Interceptor extracts information from VCS payload, like repository_name. The repository_name has 1-2-1 mapping with Codebase (kind: Codebase; apiVersion:v2.edp.epam.com/v1). Interceptor populates Tekton Pipelines with Codebase SPEC data, see the diagram below:
┌────────────┐ ┌─────────────────┐ ┌─────────────┐
│ │ │ EDP Interceptor │ │ Tekton │
│ VCS(Git) ├──────────────► ├───────► │
│ │ │ │ │ Pipelines │
└──────┬─────┘ └────────┬────────┘ └─────────────┘
│ │
┌──────┴─────┐ │ extract
│ Repo │ │
│ │ │
│ │ ┌────────────────▼───────────────┐
└────────────┘ │ apiVersion: v2.edp.epam.com/v1 │
│ kind: Codebase │
│ │
│ spec: │
└────────────────────────────────┘
The data, retrieved from the Codebase SPEC, is used in Tekton Pipelines logic. The docker images for Interceptor are available on the DockerHub. The helm-chart for interceptor deployment is in the same repository by the charts/interceptor directory. Follows Tekton Interceptor paradigm and enriches payload from different Version Control Systems (VCS) like Gerrit, GitHub, GitLab or BitBucket with KubeRocketCI specific data.
Homepage: https://docs.kuberocketci.io
Maintainers
| Name | Url | |
|---|---|---|
| epmd-edp | [email protected] | https://solutionshub.epam.com/solution/kuberocketci |
| sergk | https://github.com/SergK |
Source Code
Requirements
| Repository | Name | Version |
|---|---|---|
| @epamedp | tekton-cache | 0.4.6 |
| file://../common-library | edp-tekton-common-library | 0.3.23 |
Values
| Key | Type | Default | Description |
|---|---|---|---|
| clusterName | string | "" | Cluster name used to construct the krci-portal pipeline URL (/c//...). Must match krci-portal configEnv.DEFAULT_CLUSTER_NAME. If left empty, falls back to the first segment of global.dnsWildCard. |
| ctLint.chartSchema | string | "name: str()\nhome: str()\nversion: str()\ntype: str()\napiVersion: str()\nappVersion: any(str(), num())\ndescription: str()\nkeywords: list(str(), required=False)\nsources: list(str(), required=True)\nmaintainers: list(include('maintainer'), required=True)\ndependencies: list(include('dependency'), required=False)\nicon: str(required=False)\nengine: str(required=False)\ncondition: str(required=False)\ntags: str(required=False)\ndeprecated: bool(required=False)\nkubeVersion: str(required=False)\nannotations: map(str(), str(), required=False)\n---\nmaintainer:\n name: str(required=True)\n email: str(required=False)\n url: str(required=False)\n---\ndependency:\n name: str()\n version: str()\n repository: str()\n condition: str(required=False)\n tags: list(str(), required=False)\n enabled: bool(required=False)\n import-values: any(list(str()), list(include('import-value')), required=False)\n alias: str(required=False)\n" | |
| ctLint.lintconf | string | "---\nrules:\n braces:\n min-spaces-inside: 0\n max-spaces-inside: 0\n min-spaces-inside-empty: -1\n max-spaces-inside-empty: -1\n brackets:\n min-spaces-inside: 0\n max-spaces-inside: 0\n min-spaces-inside-empty: -1\n max-spaces-inside-empty: -1\n colons:\n max-spaces-before: 0\n max-spaces-after: 1\n commas:\n max-spaces-before: 0\n min-spaces-after: 1\n max-spaces-after: 1\n comments:\n require-starting-space: true\n min-spaces-from-content: 2\n document-end: disable\n document-start: disable # No --- to start a file\n empty-lines:\n max: 2\n max-start: 0\n max-end: 0\n hyphens:\n max-spaces-after: 1\n indentation:\n spaces: consistent\n indent-sequences: whatever # - list indentation will handle both indentation and without\n check-multi-line-strings: false\n key-duplicates: enable\n line-length: disable # Lines can be any length\n new-line-at-end-of-file: enable\n new-lines:\n type: unix\n trailing-spaces: enable\n truthy:\n level: warning\n" | |
| ctLint.validateMaintainers | bool | false | |
| fullnameOverride | string | "" | |
| gitServers | object | {} | |
| githubAcl | object | {"allowedAssociations":["OWNER","MEMBER","COLLABORATOR"],"enabled":true} | Restrict who can trigger GitHub review PipelineRuns, based on the author_association field of the webhook payload: the PR author for pull_request opened/synchronize events, the comment author for /recheck and /ok-to-test issue_comment events (Prow-style: an allowed member can approve an external contributor's PR by commenting /ok-to-test). |
| githubAcl.allowedAssociations | list | ["OWNER","MEMBER","COLLABORATOR"] | GitHub author_association values allowed to trigger review pipelines. Valid values: OWNER, MEMBER, COLLABORATOR, CONTRIBUTOR, FIRST_TIME_CONTRIBUTOR, FIRST_TIMER, NONE. |
| githubOwners | object | {"checkType":"all","enabled":false} | DEPRECATED in favor of githubAcl. Enables the upstream Tekton Triggers owners validation (OWNERS file / public org members / collaborators) on pull_request events. WARNING: when enabled, the /recheck comment command stops working for everyone because the upstream interceptor only lets /ok-to-test comments through. More information: https://tekton.dev/docs/triggers/interceptors/#owners-validation-for-pull-requests |
| global.dnsWildCard | string | "" | a cluster DNS wildcard name |
| global.dockerRegistry.type | string | "ecr" | Define Image Registry that will to be used in Pipelines. Can be ecr (default), harbor, dockerhub |
| global.dockerRegistry.url | string | "<AWS_ACCOUNT_ID>.dkr.ecr.<AWS_REGION>.amazonaws.com/<registry_space>" | Docker Registry endpoint. In dockerhub case the URL must be specified in accordance with the Kaniko name convention (docker.io/<registry_space>) |
| global.gatewayApi | object | {"gatewayName":"main-gateway","gatewayNamespace":"envoy-gateway-system"} | Gateway API parent Gateway that EventListener HTTPRoutes attach to (nginx-ingress -> Envoy Gateway migration). Used only when a gitServer sets eventListener.httproute.enabled=true; ignored otherwise. |
| global.gatewayApi.gatewayName | string | "main-gateway" | Name of the parent Gateway resource |
| global.gatewayApi.gatewayNamespace | string | "envoy-gateway-system" | Namespace of the parent Gateway resource |
| global.gerritHost | string | "gerrit" | Gerrit Host URL, must be specified if gerrit is enabled |
| global.gitProviders | list | ["bitbucket","gerrit","github","gitlab"] | Deploy Kubernetes Resources for the specific Git Provider. Can be gerrit, gitlab, github (default) |
| global.platform | string | "kubernetes" | platform type that can be "kubernetes" or "openshift" |
| image.digest | string | "" | Image digest for an immutable reference, e.g. sha256:abc123. When set, the image is deployed as :tag@digest. |
| image.pullPolicy | string | "IfNotPresent" | Defines the policy with which the pod requests its image. |
| image.repository | string | "epamedp/edp-tekton" | KubeRocketCI edp-tekton Docker image name. The released image can be found on Dockerhub |
| image.tag | string | "" | Overrides the image tag whose default is the chart appVersion. |
| interceptor.affinity | object | {} | Affinity settings for pod assignment |
| interceptor.enabled | bool | true | Deploy KubeRocketCI interceptor as a part of pipeline library when true. Default: true |
| interceptor.extraSecretNames | list | [] | Additional git server secret names the interceptor is allowed to read |
| interceptor.extraVolumeMounts | list | [] | Additional volume mounts, e.g. mount a private CA into /etc/ssl/certs to trust it |
| interceptor.extraVolumes | list | [] | Additional volumes, e.g. a ConfigMap with a private CA certificate for git servers with self-signed TLS (required for pipelines.queue.enabled against such servers) |
| interceptor.imagePullSecrets | list | [] | |
| interceptor.logLevel | string | "info" | Interceptor log level (debug, info, warn, error). debug additionally logs the full webhook request/response payloads. |
| interceptor.nameOverride | string | "tekton-interceptor" | |
| interceptor.nodeSelector | object | {} | Node labels for pod assignment |
| interceptor.podAnnotations | object | {} | |
| interceptor.podSecurityContext | object | {} | |
| interceptor.resources | object | {"limits":{"cpu":"70m","memory":"60Mi"},"requests":{"cpu":"50m","memory":"40Mi"}} | The resource limits and requests for the Tekton Interceptor |
| interceptor.securityContext.allowPrivilegeEscalation | bool | false | |
| interceptor.securityContext.capabilities.drop[0] | string | "ALL" | |
| interceptor.securityContext.readOnlyRootFilesystem | bool | true | |
| interceptor.securityContext.runAsGroup | int | 65532 | |
| interceptor.securityContext.runAsNonRoot | bool | true | |
| interceptor.securityContext.runAsUser | int | 65532 | |
| interceptor.serviceAccount.annotations | object | {} | Annotations to add to the service account |
| interceptor.serviceAccount.name | string | "" | If not set, a name is generated using the fullname template |
| interceptor.tolerations | list | [] | Toleration labels for pod assignment |
| kaniko.customCert | bool | false | Save cert in secret "custom-ca-certificates" with key ca.crt |
| kaniko.image.repository | string | "gcr.io/kaniko-project/executor" | |
| kaniko.image.tag | string | "v1.12.1" | |
| kaniko.roleArn | string | "" | AWS IAM role to be used for kaniko pod service account (IRSA). Format: arn:aws:iam::<AWS_ACCOUNT_ID>:role/<AWS_IAM_ROLE_NAME> |
| nameOverride | string | "" | |
| pipelines.argocdDiffPreview | object | {"commentImage":"python:3.12-alpine","enabled":false,"innerArgocdNamespace":"argocd","kubeconfigSecret":"vc-argocd-diff-preview","namespace":"argocd-diff-preview","renderTimeoutSeconds":"300","toolImage":"dagandersen/argocd-diff-preview:v0.2.11","utilImage":"alpine/k8s:1.33.4"} | Argo CD Diff Preview settings for the GitOps review pipelines (ALPHA, GitLab only). When enabled, the gitops review pipeline renders an MR manifest diff via the standing argocd-diff-preview vcluster (installed by the argocd-diff-preview cluster addon) and posts it as an MR comment; it stays best-effort at runtime and skips silently if the addon is unhealthy. Enabling the feature takes TWO flags - this one and argocd-diff-preview.enable in the edp-cluster-add-ons App-of-Apps values. This chart also owns the addon's namespace, so the App-of-Apps entry must keep createNamespace: false. |
| pipelines.argocdDiffPreview.commentImage | string | "python:3.12-alpine" | Python image for posting the MR comment. |
| pipelines.argocdDiffPreview.enabled | bool | false | Install the diff-preview task and wire it into the gitops review pipeline. Enable this together with the argocd-diff-preview cluster addon; leave disabled otherwise. |
| pipelines.argocdDiffPreview.innerArgocdNamespace | stri |
Deploy edp-tekton with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has edp-tekton on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartedp-tekton is pinned at v0.29.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply