生成tekton dashboard

2024-09-06 18:36
文章标签 生成 dashboard tekton

本文主要是介绍生成tekton dashboard,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

我们在之前的(安装和构建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等

可以看到界面很友好。

这篇关于生成tekton dashboard的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1142798

相关文章

MybatisGenerator文件生成不出对应文件的问题

《MybatisGenerator文件生成不出对应文件的问题》本文介绍了使用MybatisGenerator生成文件时遇到的问题及解决方法,主要步骤包括检查目标表是否存在、是否能连接到数据库、配置生成... 目录MyBATisGenerator 文件生成不出对应文件先在项目结构里引入“targetProje

Python使用qrcode库实现生成二维码的操作指南

《Python使用qrcode库实现生成二维码的操作指南》二维码是一种广泛使用的二维条码,因其高效的数据存储能力和易于扫描的特点,广泛应用于支付、身份验证、营销推广等领域,Pythonqrcode库是... 目录一、安装 python qrcode 库二、基本使用方法1. 生成简单二维码2. 生成带 Log

Python使用Pandas库将Excel数据叠加生成新DataFrame的操作指南

《Python使用Pandas库将Excel数据叠加生成新DataFrame的操作指南》在日常数据处理工作中,我们经常需要将不同Excel文档中的数据整合到一个新的DataFrame中,以便进行进一步... 目录一、准备工作二、读取Excel文件三、数据叠加四、处理重复数据(可选)五、保存新DataFram

SpringBoot生成和操作PDF的代码详解

《SpringBoot生成和操作PDF的代码详解》本文主要介绍了在SpringBoot项目下,通过代码和操作步骤,详细的介绍了如何操作PDF,希望可以帮助到准备通过JAVA操作PDF的你,项目框架用的... 目录本文简介PDF文件简介代码实现PDF操作基于PDF模板生成,并下载完全基于代码生成,并保存合并P

详解Java中如何使用JFreeChart生成甘特图

《详解Java中如何使用JFreeChart生成甘特图》甘特图是一种流行的项目管理工具,用于显示项目的进度和任务分配,在Java开发中,JFreeChart是一个强大的开源图表库,能够生成各种类型的图... 目录引言一、JFreeChart简介二、准备工作三、创建甘特图1. 定义数据集2. 创建甘特图3.

AI一键生成 PPT

AI一键生成 PPT 操作步骤 作为一名打工人,是不是经常需要制作各种PPT来分享我的生活和想法。但是,你们知道,有时候灵感来了,时间却不够用了!😩直到我发现了Kimi AI——一个能够自动生成PPT的神奇助手!🌟 什么是Kimi? 一款月之暗面科技有限公司开发的AI办公工具,帮助用户快速生成高质量的演示文稿。 无论你是职场人士、学生还是教师,Kimi都能够为你的办公文

pdfmake生成pdf的使用

实际项目中有时会有根据填写的表单数据或者其他格式的数据,将数据自动填充到pdf文件中根据固定模板生成pdf文件的需求 文章目录 利用pdfmake生成pdf文件1.下载安装pdfmake第三方包2.封装生成pdf文件的共用配置3.生成pdf文件的文件模板内容4.调用方法生成pdf 利用pdfmake生成pdf文件 1.下载安装pdfmake第三方包 npm i pdfma

poj 1258 Agri-Net(最小生成树模板代码)

感觉用这题来当模板更适合。 题意就是给你邻接矩阵求最小生成树啦。~ prim代码:效率很高。172k...0ms。 #include<stdio.h>#include<algorithm>using namespace std;const int MaxN = 101;const int INF = 0x3f3f3f3f;int g[MaxN][MaxN];int n

poj 1287 Networking(prim or kruscal最小生成树)

题意给你点与点间距离,求最小生成树。 注意点是,两点之间可能有不同的路,输入的时候选择最小的,和之前有道最短路WA的题目类似。 prim代码: #include<stdio.h>const int MaxN = 51;const int INF = 0x3f3f3f3f;int g[MaxN][MaxN];int P;int prim(){bool vis[MaxN];

poj 2349 Arctic Network uva 10369(prim or kruscal最小生成树)

题目很麻烦,因为不熟悉最小生成树的算法调试了好久。 感觉网上的题目解释都没说得很清楚,不适合新手。自己写一个。 题意:给你点的坐标,然后两点间可以有两种方式来通信:第一种是卫星通信,第二种是无线电通信。 卫星通信:任何两个有卫星频道的点间都可以直接建立连接,与点间的距离无关; 无线电通信:两个点之间的距离不能超过D,无线电收发器的功率越大,D越大,越昂贵。 计算无线电收发器D