生成tekton dashboard

server/2024/9/23 10:14:04/

我们在之前的(安装和构建ci)实践中,用到都是tekton cli,查看ci执行情况都是通过logs,不是很友好。 tekton dashboard提供了很多的ui界面。这里我们来安装并使用。

1. 创建dashboard.yaml

apiVersion: v1
kind: Namespace
metadata:labels:app.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: extensions.dashboard.tekton.dev
spec:group: dashboard.tekton.devnames:categories:- tekton- tekton-dashboardkind: Extensionplural: extensionsshortNames:- ext- extspreserveUnknownFields: falsescope: Namespacedversions:- additionalPrinterColumns:- jsonPath: .spec.apiVersionname: API versiontype: string- jsonPath: .spec.namename: Kindtype: string- jsonPath: .spec.displaynamename: Display nametype: string- jsonPath: .metadata.creationTimestampname: Agetype: datename: v1alpha1schema:openAPIV3Schema:type: objectx-kubernetes-preserve-unknown-fields: trueserved: truestorage: truesubresources:status: {}
---
apiVersion: v1
kind: ServiceAccount
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboardnamespace: tekton-pipelines
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:labels:app.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard-infonamespace: tekton-pipelines
rules:- apiGroups:- ""resourceNames:- dashboard-inforesources:- configmapsverbs:- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard-backend
rules:- apiGroups:- apiextensions.k8s.ioresources:- customresourcedefinitionsverbs:- get- list- apiGroups:- security.openshift.ioresources:- securitycontextconstraintsverbs:- use- apiGroups:- tekton.devresources:- clustertasksverbs:- get- list- watch- apiGroups:- triggers.tekton.devresources:- clusterinterceptors- clustertriggerbindingsverbs:- get- list- watch- apiGroups:- ""resources:- serviceaccountsverbs:- get- list- watch- apiGroups:- dashboard.tekton.devresources:- extensionsverbs:- create- update- delete- patch- apiGroups:- tekton.devresources:- clustertasksverbs:- create- update- delete- patch- apiGroups:- triggers.tekton.devresources:- clusterinterceptors- clustertriggerbindingsverbs:- create- update- delete- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard-tenant
rules:- apiGroups:- dashboard.tekton.devresources:- extensionsverbs:- get- list- watch- apiGroups:- ""resources:- events- namespaces- pods- pods/logverbs:- get- list- watch- apiGroups:- tekton.devresources:- tasks- taskruns- pipelines- pipelineruns- customrunsverbs:- get- list- watch- apiGroups:- triggers.tekton.devresources:- eventlisteners- interceptors- triggerbindings- triggers- triggertemplatesverbs:- get- list- watch- apiGroups:- tekton.devresources:- tasks- taskruns- pipelines- pipelineruns- customrunsverbs:- create- update- delete- patch- apiGroups:- triggers.tekton.devresources:- eventlisteners- interceptors- triggerbindings- triggers- triggertemplatesverbs:- create- update- delete- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:labels:app.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard-infonamespace: tekton-pipelines
roleRef:apiGroup: rbac.authorization.k8s.iokind: Rolename: tekton-dashboard-info
subjects:- apiGroup: rbac.authorization.k8s.iokind: Groupname: system:authenticated
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardrbac.dashboard.tekton.dev/subject: tekton-dashboardname: tekton-dashboard-backend
roleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: tekton-dashboard-backend
subjects:- kind: ServiceAccountname: tekton-dashboardnamespace: tekton-pipelines
---
apiVersion: v1
data:version: v0.42.0
kind: ConfigMap
metadata:labels:app.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: dashboard-infonamespace: tekton-pipelines
---
apiVersion: v1
kind: Service
metadata:labels:app: tekton-dashboardapp.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardapp.kubernetes.io/version: v0.42.0dashboard.tekton.dev/release: v0.42.0version: v0.42.0name: tekton-dashboardnamespace: tekton-pipelines
spec:ports:- name: httpport: 9097protocol: TCPtargetPort: 9097selector:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardtype: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:labels:app: tekton-dashboardapp.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardapp.kubernetes.io/version: v0.42.0dashboard.tekton.dev/release: v0.42.0version: v0.42.0name: tekton-dashboardnamespace: tekton-pipelines
spec:replicas: 1selector:matchLabels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardtemplate:metadata:labels:app: tekton-dashboardapp.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardapp.kubernetes.io/version: v0.42.0name: tekton-dashboardspec:containers:- args:- --port=9097- --logout-url=- --pipelines-namespace=tekton-pipelines- --triggers-namespace=tekton-pipelines- --read-only=false- --log-level=info- --log-format=json- --namespace=- --namespaces=- --stream-logs=true- --external-logs=env:- name: INSTALLED_NAMESPACEvalueFrom:fieldRef:fieldPath: metadata.namespaceimage: registry.cn-hangzhou.aliyuncs.com/acs-demo-ns/tekton-dashboard:v0.42.0livenessProbe:httpGet:path: /healthport: 9097name: tekton-dashboardports:- containerPort: 9097readinessProbe:httpGet:path: /readinessport: 9097securityContext:allowPrivilegeEscalation: falsecapabilities:drop:- ALLrunAsGroup: 65532runAsNonRoot: truerunAsUser: 65532seccompProfile:type: RuntimeDefaultserviceAccountName: tekton-dashboardvolumes: []---
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardrbac.dashboard.tekton.dev/subject: tekton-dashboardname: tekton-dashboard-tenant
roleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: tekton-dashboard-tenant
subjects:- kind: ServiceAccountname: tekton-dashboardnamespace: tekton-pipelines

2. 安装dashboard

kubectl apply -f dashboard.yaml 

3. 查看dashboard

kubectl get deploy -n tekton-pipelines | grep dashboard
kubectl get svc -n tekton-pipelines | grep dashboard

我的输出为:

carawang@ci %kubectl get svc -n tekton-pipelines | grep dashboard
tekton-dashboard                    LoadBalancer   10.103.207.156   <pending>     9097:30755/TCP                       4m52s

因为我用的是minikube,没有endpoint可以供访问,需要forward一下。

4. forward dashboard

kubectl port-forward -n tekton-pipelines service/tekton-dashboard 9097:9097

不报错的话,就可以访问http://localhost:9097

5. 查看pipelineruns等

可以看到界面很友好。


http://www.ppmy.cn/server/114599.html

相关文章

浅谈C#之进程

一、基本介绍 处理进程通常涉及到启动、监控和管理操作系统级别的进程。C#提供了System.Diagnostics命名空间&#xff0c;其中包含用于创建和管理进程的类。 二、主要类和方法 Process类&#xff1a;这是System.Diagnostics命名空间中的核心类&#xff0c;用于表示一个正在运行…

LINUX下载编译zlog

下载 Tags HardySimpson/zlog GitHub 解压编译 make 检查 $ ll src/libzlog.a -rw-rw-r-- 1 weiyu weiyu 745782 9月 9 19:17 src/libzlog.a

小琳AI课堂:Unilm模型——统一预训练目标下的自然语言处理革新

Unilm模型简介 大家好&#xff0c;这里是小琳AI课堂&#xff01;今天我们来聊聊一个很酷的话题——Unilm模型&#xff0c;全称为Unified Language Model。这是一种由微软亚洲研究院在2019年提出的先进自然语言处理模型。它的核心魅力在于利用统一的预训练目标&#xff0c;让模…

OceanBase 基于企业版本OAT安装与OMS安装与InfluxDB的集成

一、前言与环境准备 说明&#xff1a;OceanBase V3 的OMS手动安装与V4的OMS手动安装是存在区别的&#xff0c;建议V4版本的OMS通过OAT进行安装。 前言&#xff1a; OAT 是 OceanBase V4是企业版本安装Web界面的简易安装工具。 InfluxDB 是OMS 的监控时序数据库。 OMS 是Ocea…

HTTP 响应状态码详解

HTTP状态码详解&#xff1a;HTTP状态码,是用以表示WEB服务器 HTTP响应状态的3位数字代码 小技巧&#xff1a; CtrlF 快速查找 Http状态码状态码含义100客户端应当继续发送请求。这个临时响应是用来通知客户端它的部分请求已经被服务器接收&#xff0c;且仍未被拒绝。客户端应当…

单例模式对比:静态内部类 vs. 饿汉式

单例模式是一种设计模式&#xff0c;旨在确保一个类只有一个实例&#xff0c;并提供全局访问点。Java 中有多种实现单例模式的方式&#xff0c;其中静态内部类实现和饿汉式实现是两种常见的方法。本文将对这两种单例模式进行详细对比&#xff0c;说明它们在延迟加载方面的区别&…

【有啥问啥】HashHop在LTM-2-mini中的应用:解锁长期记忆模型的新纪元

HashHop在LTM-2-mini中的应用&#xff1a;解锁长期记忆模型的新纪元 引言 随着AI技术的飞速发展&#xff0c;模型在处理复杂任务和数据时所需的上下文窗口大小也在不断扩展。深度学习模型在处理超长上下文时&#xff0c;往往面临着计算资源消耗高、上下文丢失等问题。近期&am…

Cannot Locate Document 原理图导入pcb出现报错

将原理图update到pcb时报错Cannot Locate Document&#xff1a; 记得保存pcb到你的项目就可以了