edp-tekton

by sergk

Helm chartv0.29.0App 0.29.0Apache-2.0Verified publisher

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 of Tasks and 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. ServiceAccount with IRSA Enablement, ConfigMaps for 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

NameEmailUrl
epmd-edp[email protected]https://solutionshub.epam.com/solution/kuberocketci
sergkhttps://github.com/SergK

Source Code

Requirements

RepositoryNameVersion
@epamedptekton-cache0.4.6
file://../common-libraryedp-tekton-common-library0.3.23

Values

KeyTypeDefaultDescription
clusterNamestring""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.chartSchemastring"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.lintconfstring"---\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.validateMaintainersboolfalse
fullnameOverridestring""
gitServersobject{}
githubAclobject{"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.allowedAssociationslist["OWNER","MEMBER","COLLABORATOR"]GitHub author_association values allowed to trigger review pipelines. Valid values: OWNER, MEMBER, COLLABORATOR, CONTRIBUTOR, FIRST_TIME_CONTRIBUTOR, FIRST_TIMER, NONE.
githubOwnersobject{"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.dnsWildCardstring""a cluster DNS wildcard name
global.dockerRegistry.typestring"ecr"Define Image Registry that will to be used in Pipelines. Can be ecr (default), harbor, dockerhub
global.dockerRegistry.urlstring"<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.gatewayApiobject{"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.gatewayNamestring"main-gateway"Name of the parent Gateway resource
global.gatewayApi.gatewayNamespacestring"envoy-gateway-system"Namespace of the parent Gateway resource
global.gerritHoststring"gerrit"Gerrit Host URL, must be specified if gerrit is enabled
global.gitProviderslist["bitbucket","gerrit","github","gitlab"]Deploy Kubernetes Resources for the specific Git Provider. Can be gerrit, gitlab, github (default)
global.platformstring"kubernetes"platform type that can be "kubernetes" or "openshift"
image.digeststring""Image digest for an immutable reference, e.g. sha256:abc123. When set, the image is deployed as :tag@digest.
image.pullPolicystring"IfNotPresent"Defines the policy with which the pod requests its image.
image.repositorystring"epamedp/edp-tekton"KubeRocketCI edp-tekton Docker image name. The released image can be found on Dockerhub
image.tagstring""Overrides the image tag whose default is the chart appVersion.
interceptor.affinityobject{}Affinity settings for pod assignment
interceptor.enabledbooltrueDeploy KubeRocketCI interceptor as a part of pipeline library when true. Default: true
interceptor.extraSecretNameslist[]Additional git server secret names the interceptor is allowed to read
interceptor.extraVolumeMountslist[]Additional volume mounts, e.g. mount a private CA into /etc/ssl/certs to trust it
interceptor.extraVolumeslist[]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.imagePullSecretslist[]
interceptor.logLevelstring"info"Interceptor log level (debug, info, warn, error). debug additionally logs the full webhook request/response payloads.
interceptor.nameOverridestring"tekton-interceptor"
interceptor.nodeSelectorobject{}Node labels for pod assignment
interceptor.podAnnotationsobject{}
interceptor.podSecurityContextobject{}
interceptor.resourcesobject{"limits":{"cpu":"70m","memory":"60Mi"},"requests":{"cpu":"50m","memory":"40Mi"}}The resource limits and requests for the Tekton Interceptor
interceptor.securityContext.allowPrivilegeEscalationboolfalse
interceptor.securityContext.capabilities.drop[0]string"ALL"
interceptor.securityContext.readOnlyRootFilesystembooltrue
interceptor.securityContext.runAsGroupint65532
interceptor.securityContext.runAsNonRootbooltrue
interceptor.securityContext.runAsUserint65532
interceptor.serviceAccount.annotationsobject{}Annotations to add to the service account
interceptor.serviceAccount.namestring""If not set, a name is generated using the fullname template
interceptor.tolerationslist[]Toleration labels for pod assignment
kaniko.customCertboolfalseSave cert in secret "custom-ca-certificates" with key ca.crt
kaniko.image.repositorystring"gcr.io/kaniko-project/executor"
kaniko.image.tagstring"v1.12.1"
kaniko.roleArnstring""AWS IAM role to be used for kaniko pod service account (IRSA). Format: arn:aws:iam::<AWS_ACCOUNT_ID>:role/<AWS_IAM_ROLE_NAME>
nameOverridestring""
pipelines.argocdDiffPreviewobject{"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.commentImagestring"python:3.12-alpine"Python image for posting the MR comment.
pipelines.argocdDiffPreview.enabledboolfalseInstall 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.innerArgocdNamespacestri

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartedp-tekton is pinned at v0.29.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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