Skip to content

Commit 75e5a7f

Browse files
committed
tekton module
1 parent 4e6d6fd commit 75e5a7f

7 files changed

Lines changed: 580 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
.DS_store
1111
zips/*
1212
.aider*
13+
**/.terraform.lock.hcl

modules/tekton/k8s/1.0/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Tekton Pipeline
2+
3+
Deploy Tekton Pipelines on Kubernetes using the official Helm chart from the Continuous Delivery Foundation.
4+
5+
## Overview
6+
7+
This module installs Tekton Pipelines, a Kubernetes-native framework for creating continuous integration and continuous deployment (CI/CD) systems. Tekton provides building blocks to standardize and automate deployments across multiple environments and cloud providers.
8+
9+
## Environment as Dimension
10+
11+
This module is environment-aware through the unique naming and tagging of resources. The Tekton installation will be uniquely named per environment using `var.instance_name` and tagged with environment-specific cloud tags via `var.environment.cloud_tags`.
12+
13+
## Resources Created
14+
15+
- **Helm Release**: Deploys the tekton-pipeline chart from the CDF repository
16+
- **Kubernetes Namespace**: Creates the `tekton-pipelines` namespace if it doesn't exist
17+
- **Tekton Pipeline Components**: All core Tekton Pipeline resources including controllers and webhooks
18+
19+
## Security Considerations
20+
21+
Tekton Pipelines requires cluster-level permissions to manage Kubernetes resources during pipeline execution. The installation includes appropriate RBAC configurations for secure operation within the Kubernetes cluster.
22+
23+
## Requirements
24+
25+
- Kubernetes cluster with sufficient resources for Tekton components
26+
- Helm provider (version ~> 2.8.0)
27+
- Appropriate cluster permissions for creating namespaces and cluster-scoped resources

modules/tekton/k8s/1.0/facets.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
intent: tekton
2+
flavor: k8s
3+
version: "1.0"
4+
clouds:
5+
- kubernetes
6+
- aws
7+
- azure
8+
- gcp
9+
title: Tekton Pipeline
10+
description: Deploy Tekton Pipelines Chart on Kubernetes using Helm chart
11+
spec:
12+
title: Tekton Pipeline Configuration
13+
description: Configuration for Tekton Pipeline deployment
14+
type: object
15+
properties:
16+
namespace:
17+
type: string
18+
default: "tekton-pipelines"
19+
description: "Namespace for Tekton Pipelines deployment"
20+
displayName: "Namespace"
21+
inputs:
22+
kubernetes_details:
23+
optional: false
24+
type: "@outputs/kubernetes"
25+
title: Kubernetes Details
26+
default:
27+
resource_type: kubernetes_cluster
28+
resource_name: default
29+
outputs:
30+
default:
31+
type: "@outputs/tekton-pipeline"
32+
title: "Tekton Pipeline"
33+
sample:
34+
kind: tekton
35+
flavor: k8s
36+
version: "1.0"
37+
disabled: true
38+
spec:
39+
namespace: "tekton-pipelines"

modules/tekton/k8s/1.0/main.tf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
locals {
2+
tekton_dashboard = file("${path.module}/tekton_dashboard.yaml")
3+
spec = lookup(var.instance, "spec", {})
4+
namespace = lookup(var.instance, "namespace", "tekton-pipelines" )
5+
}
6+
7+
module "name" {
8+
source = "github.com/Facets-cloud/facets-utility-modules//name"
9+
is_k8s = true
10+
globally_unique = false
11+
resource_type = "tekton"
12+
resource_name = var.instance_name
13+
environment = var.environment
14+
limit = 50
15+
}
16+
17+
resource "helm_release" "tekton" {
18+
name = module.name.name
19+
repository = "https://cdfoundation.github.io/tekton-helm-chart"
20+
chart = "cdf/tekton-pipeline"
21+
namespace = local.namespace
22+
version = "2.8.0"
23+
create_namespace = true
24+
}
25+
26+
module "tekton_dashboard" {
27+
depends_on = [ helm_release.tekton ]
28+
source = "github.com/Facets-cloud/facets-utility-modules//any-k8s-resources"
29+
namespace = local.namespace
30+
advanced_config = {}
31+
name = "${module.name.name}-dashboard"
32+
resources_data = [
33+
yamlencode(local.tekton_dashboard)
34+
]
35+
}

modules/tekton/k8s/1.0/outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
locals {
2+
output_attributes = {
3+
release_name = helm_release.tekton.name
4+
release_namespace = helm_release.tekton.namespace
5+
resource_name = module.name.name
6+
resource_type = "tekton"
7+
}
8+
9+
output_interfaces = {}
10+
}

0 commit comments

Comments
 (0)