生成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

相关文章

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

hdu 1102 uva 10397(最小生成树prim)

hdu 1102: 题意: 给一个邻接矩阵,给一些村庄间已经修的路,问最小生成树。 解析: 把已经修的路的权值改为0,套个prim()。 注意prim 最外层循坏为n-1。 代码: #include <iostream>#include <cstdio>#include <cstdlib>#include <algorithm>#include <cstri

【生成模型系列(初级)】嵌入(Embedding)方程——自然语言处理的数学灵魂【通俗理解】

【通俗理解】嵌入(Embedding)方程——自然语言处理的数学灵魂 关键词提炼 #嵌入方程 #自然语言处理 #词向量 #机器学习 #神经网络 #向量空间模型 #Siri #Google翻译 #AlexNet 第一节:嵌入方程的类比与核心概念【尽可能通俗】 嵌入方程可以被看作是自然语言处理中的“翻译机”,它将文本中的单词或短语转换成计算机能够理解的数学形式,即向量。 正如翻译机将一种语言

poj 3723 kruscal,反边取最大生成树。

题意: 需要征募女兵N人,男兵M人。 每征募一个人需要花费10000美元,但是如果已经招募的人中有一些关系亲密的人,那么可以少花一些钱。 给出若干的男女之间的1~9999之间的亲密关系度,征募某个人的费用是10000 - (已经征募的人中和自己的亲密度的最大值)。 要求通过适当的招募顺序使得征募所有人的费用最小。 解析: 先设想无向图,在征募某个人a时,如果使用了a和b之间的关系

Thymeleaf:生成静态文件及异常处理java.lang.NoClassDefFoundError: ognl/PropertyAccessor

我们需要引入包: <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></dependency><dependency><groupId>org.springframework</groupId><artifactId>sp

前端-06-eslint9大变样后,如何生成旧版本的.eslintrc.cjs配置文件

目录 问题解决办法 问题 最近在写一个vue3+ts的项目,看了尚硅谷的视频,到了配置eslintrc.cjs的时候我犯了难,因为eslint从9.0之后重大更新,跟以前完全不一样,但是我还是想用和老师一样的eslintrc.cjs文件,该怎么做呢? 视频链接:尚硅谷Vue项目实战硅谷甄选,vue3项目+TypeScript前端项目一套通关 解决办法 首先 eslint 要