BlueXIII's Blog

热爱技术,持续学习

0%

Tekton离线部署

官方文档

其它参考文档

离线镜像清单

安装时使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/controller:v0.48.0
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/events:v0.48.0
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/resolvers:v0.48.0
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/webhook:v0.48.0
gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/controller:v0.24.0
gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/webhook:v0.24.0
gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/interceptors:v0.24.0
gcr.io/tekton-releases/github.com/tektoncd/dashboard/cmd/dashboard:v0.35.0
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/entrypoint:v0.48.0
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/nop:v0.48.0
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecarlogresults:v0.48.0
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/workingdirinit:v0.48.0
gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/eventlistenersink:v0.24.0
cgr.dev/chainguard/busybox:latest
mcr.microsoft.com/powershell:latest

构建时使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 官方镜像
alpine:latest
busybox:latest
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2
alpine/git:latest
docker:latest
docker:dind
curlimages/curl:latest
gcr.io/kaniko-project/executor:v1.5.1
gcr.io/cloud-builders/mvn:latest
docker.io/library/node:12-alpine
# 自制镜像
harbor.dubhe:30002/dubhe-base/alpine:3.16.3
harbor.dubhe:30002/dubhe-base/dubhe-buildkit:1.2.0
harbor.dubhe:30002/dubhe-base/chart-update:latest

部署

下载常用组件

1
2
3
4
5
6
curl -o operator.yaml https://storage.googleapis.com/tekton-releases/operator/latest/release.yaml
curl -o pipeline.yaml https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
curl -o triggers.yaml https://storage.googleapis.com/tekton-releases/triggers/latest/release.yaml
curl -o interceptors.yaml https://storage.googleapis.com/tekton-releases/triggers/latest/interceptors.yaml
curl -o dashboard.yaml https://storage.googleapis.com/tekton-releases/dashboard/latest/release.yaml
curl -o chains.yaml https://storage.googleapis.com/tekton-releases/chains/latest/release.yaml

部署常用组件

1
2
3
4
5
6
kubectl apply -f ./operator.yaml
kubectl apply -f ./pipeline.yaml
kubectl apply -f ./triggers.yaml
kubectl apply -f ./interceptors.yaml
kubectl apply -f ./dashboard.yaml
kubectl apply -f ./chains.yaml

DashBoard开放访问

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
apiVersion: v1
kind: Service
metadata:
name: tekton-dashboard-exposed
namespace: tekton-pipelines
spec:
selector:
app.kubernetes.io/component: dashboard
app.kubernetes.io/instance: default
app.kubernetes.io/name: dashboard
app.kubernetes.io/part-of: tekton-dashboard
ports:
- protocol: TCP
port: 9097
targetPort: 9097
nodePort: 30014
type: NodePort
1
2
kubectl apply -f nodeport.yaml
open http://10.193.35.21:30014

代理服务器配置(可选)

vi operator.yaml

1
2
3
4
5
6
7
8
containers:
- env:
- name: HTTP_PROXY
value: "socks5://10.193.36.33:7890/"
- name: HTTPS_PROXY
value: "socks5://10.193.36.33:7890/"
- name: NO_PROXY
value: "127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,harbor.dubhe,10.193.36.252"

关闭亲和性助手(可选)

https://github.com/tektoncd/pipeline/blob/main/config/config-feature-flags.yaml

1
2
kubectl edit configmap feature-flags -n tekton-pipelines
disable-affinity-assistant: "true"