生成tekton dashboard

news2024/9/22 7:23:37

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

1. 创建dashboard.yaml

apiVersion: v1
kind: Namespace
metadata:
  labels:
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
  name: tekton-dashboard
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  labels:
    app.kubernetes.io/component: dashboard
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
  name: extensions.dashboard.tekton.dev
spec:
  group: dashboard.tekton.dev
  names:
    categories:
      - tekton
      - tekton-dashboard
    kind: Extension
    plural: extensions
    shortNames:
      - ext
      - exts
  preserveUnknownFields: false
  scope: Namespaced
  versions:
    - additionalPrinterColumns:
        - jsonPath: .spec.apiVersion
          name: API version
          type: string
        - jsonPath: .spec.name
          name: Kind
          type: string
        - jsonPath: .spec.displayname
          name: Display name
          type: string
        - jsonPath: .metadata.creationTimestamp
          name: Age
          type: date
      name: v1alpha1
      schema:
        openAPIV3Schema:
          type: object
          x-kubernetes-preserve-unknown-fields: true
      served: true
      storage: true
      subresources:
        status: {}
---
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    app.kubernetes.io/component: dashboard
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
  name: tekton-dashboard
  namespace: tekton-pipelines
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  labels:
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
  name: tekton-dashboard-info
  namespace: tekton-pipelines
rules:
  - apiGroups:
      - ""
    resourceNames:
      - dashboard-info
    resources:
      - configmaps
    verbs:
      - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    app.kubernetes.io/component: dashboard
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
  name: tekton-dashboard-backend
rules:
  - apiGroups:
      - apiextensions.k8s.io
    resources:
      - customresourcedefinitions
    verbs:
      - get
      - list
  - apiGroups:
      - security.openshift.io
    resources:
      - securitycontextconstraints
    verbs:
      - use
  - apiGroups:
      - tekton.dev
    resources:
      - clustertasks
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - triggers.tekton.dev
    resources:
      - clusterinterceptors
      - clustertriggerbindings
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - serviceaccounts
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - dashboard.tekton.dev
    resources:
      - extensions
    verbs:
      - create
      - update
      - delete
      - patch
  - apiGroups:
      - tekton.dev
    resources:
      - clustertasks
    verbs:
      - create
      - update
      - delete
      - patch
  - apiGroups:
      - triggers.tekton.dev
    resources:
      - clusterinterceptors
      - clustertriggerbindings
    verbs:
      - create
      - update
      - delete
      - patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    app.kubernetes.io/component: dashboard
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
  name: tekton-dashboard-tenant
rules:
  - apiGroups:
      - dashboard.tekton.dev
    resources:
      - extensions
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - events
      - namespaces
      - pods
      - pods/log
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - tekton.dev
    resources:
      - tasks
      - taskruns
      - pipelines
      - pipelineruns
      - customruns
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - triggers.tekton.dev
    resources:
      - eventlisteners
      - interceptors
      - triggerbindings
      - triggers
      - triggertemplates
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - tekton.dev
    resources:
      - tasks
      - taskruns
      - pipelines
      - pipelineruns
      - customruns
    verbs:
      - create
      - update
      - delete
      - patch
  - apiGroups:
      - triggers.tekton.dev
    resources:
      - eventlisteners
      - interceptors
      - triggerbindings
      - triggers
      - triggertemplates
    verbs:
      - create
      - update
      - delete
      - patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
  name: tekton-dashboard-info
  namespace: tekton-pipelines
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: tekton-dashboard-info
subjects:
  - apiGroup: rbac.authorization.k8s.io
    kind: Group
    name: system:authenticated
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    app.kubernetes.io/component: dashboard
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
    rbac.dashboard.tekton.dev/subject: tekton-dashboard
  name: tekton-dashboard-backend
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: tekton-dashboard-backend
subjects:
  - kind: ServiceAccount
    name: tekton-dashboard
    namespace: tekton-pipelines
---
apiVersion: v1
data:
  version: v0.42.0
kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
  name: dashboard-info
  namespace: tekton-pipelines
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: tekton-dashboard
    app.kubernetes.io/component: dashboard
    app.kubernetes.io/instance: default
    app.kubernetes.io/name: dashboard
    app.kubernetes.io/part-of: tekton-dashboard
    app.kubernetes.io/version: v0.42.0
    dashboard.tekton.dev/release: v0.42.0
    version: v0.42.0
  name: tekton-dashboard
  namespace: tekton-pipelines
spec:
  ports:
    - name: http
      port: 9097
      protocol: TCP
      targetPort: 9097
  selector:
    app.kubernetes.io/component: dashboard
    app.kubernetes.io/instance: default
    app.kubernetes.io/name: dashboard
    app.kubernetes.io/part-of: tekton-dashboard
  type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: tekton-dashboard
    app.kubernetes.io/component: dashboard
    app.kubernetes.io/instance: default
    app.kubernetes.io/name: dashboard
    app.kubernetes.io/part-of: tekton-dashboard
    app.kubernetes.io/version: v0.42.0
    dashboard.tekton.dev/release: v0.42.0
    version: v0.42.0
  name: tekton-dashboard
  namespace: tekton-pipelines
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: dashboard
      app.kubernetes.io/instance: default
      app.kubernetes.io/name: dashboard
      app.kubernetes.io/part-of: tekton-dashboard
  template:
    metadata:
      labels:
        app: tekton-dashboard
        app.kubernetes.io/component: dashboard
        app.kubernetes.io/instance: default
        app.kubernetes.io/name: dashboard
        app.kubernetes.io/part-of: tekton-dashboard
        app.kubernetes.io/version: v0.42.0
      name: tekton-dashboard
    spec:
      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_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          image: registry.cn-hangzhou.aliyuncs.com/acs-demo-ns/tekton-dashboard:v0.42.0
          livenessProbe:
            httpGet:
              path: /health
              port: 9097
          name: tekton-dashboard
          ports:
            - containerPort: 9097
          readinessProbe:
            httpGet:
              path: /readiness
              port: 9097
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            runAsGroup: 65532
            runAsNonRoot: true
            runAsUser: 65532
            seccompProfile:
              type: RuntimeDefault
      serviceAccountName: tekton-dashboard
      volumes: []

---
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    app.kubernetes.io/component: dashboard
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-dashboard
    rbac.dashboard.tekton.dev/subject: tekton-dashboard
  name: tekton-dashboard-tenant
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: tekton-dashboard-tenant
subjects:
  - kind: ServiceAccount
    name: tekton-dashboard
    namespace: 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.coloradmin.cn/o/2111361.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

[Deepin] Deepin 安装 MEGA

下载debian包 wget https://mega.nz/linux/repo/Debian_12/amd64/megasync-Debian_12_amd64.deb注意&#xff0c;因文章过时等原因&#xff0c;请去官网下载最新包 https://mega.io/zh-hans/desktop#download 模拟安装 下载后执行命令 udo apt install --simulate ./megasy…

2023 CCPC(秦皇岛)现场(第二届环球杯.第 2 阶段:秦皇岛)部分题解

所有题目链接&#xff1a;Dashboard - The 2023 CCPC (Qinhuangdao) Onsite (The 2nd Universal Cup. Stage 9: Qinhuangdao) - Codeforces 中文题面&#xff1a; contest-37054-zh.pdf (codeforces.com) G. Path 链接&#xff1a; Problem - G - Codeforces 中文题面 测试…

【Hadoop|HDFS篇】NameNode和SecondaryNameNode

1. NN和2NN的工作机制 思考&#xff1a;NameNode中的元数据是存储在哪里的&#xff1f; 首先&#xff0c;我们做个假设&#xff0c;如果存储在NameNode节点的磁盘中&#xff0c;因为经常需要进行随机访 问&#xff0c;还有响应客户请求&#xff0c;必然是效率过低。因此&…

Java面试题——第五篇(Java基础)

1. main方法为什么是静态的&#xff0c;能不能改为非静态的 由于JVM在运行Java应用程序的时候&#xff0c;首先会调用main方法&#xff0c;调用时不实例化这个类的对象&#xff0c;而是通过类名直接调用因此需要限制为public static。 不能改为非静态&#xff0c;main方法必须声…

JavaWeb - Mybatis - 基础操作

删除Delete 接口方法&#xff1a; Mapper public interface EmpMapper { //Delete("delete from emp where id 17") //public void delete(); //以上delete操作的SQL语句中的id值写成固定的17&#xff0c;就表示只能删除id17的用户数据 //SQL语句中的id值不能写成…

美妆行业的画册电子版如何制作?

美妆行业的画册电子版制作&#xff0c;首先要确立画册的主题和内容。针对美妆行业特点&#xff0c;可以展示产品系列、护肤理念、品牌故事、用户评价等内容。同时&#xff0c;为了吸引目标受众&#xff0c;需要注重画面美观和时尚感&#xff0c;突出产品特点和品牌形象。 在选择…

如何快速理解网络编程

目录 前言 一、网络编程的概念 二、TCP/IP架构体系的各层作用 三、网络通信中常用的专业术语 四、IP地址的分类和划分 前言 在一个主机中&#xff0c;我们能进行进程间通信&#xff0c;但是随这时代发展&#xff0c;我们不可能只是在单独的一个主机中传输数据&#xff0c;&…

H3C SR-MPLS通过OSPF通告SID配置

首先在配置前理解几个基本概念 Prefix SID配置 统一分配和配置&#xff08;全局规划&#xff09;loopback和prefix sidPrefix SIDSRGB Base&#xff08;16000&#xff09;index Adj SID自动生成 对应SR节点间的互联链路SR节点本地标识&#xff0c;从设备本地Segment池中动态…

观趋势 谋发展 2024 SSHT上海智能家居展有哪些创新呈现?

引言&#xff1a;大数跨境发布的《2024全球智能家居市场洞察报告》显示&#xff0c;智能家居市场正迎来快速增长&#xff0c;预计从2024年的1215.9亿美元增长至2032年的6332.0亿美元&#xff0c;复合年增长率为22.9%。 近年来&#xff0c;随着物联网、AI等底层技术的飞速进步&…

I/O管理【上】

目录 一. I/O设备的概念与分类二. I/O控制器(考的频率不高&#xff0c;但还是要有印象)三. I/O控制方式&#xff08;重要考点&#xff09;3.1 程序直接控制方式3.2 中断驱动方式3.3 DMA方式3.4 通道控制方式 四. I/O软件层次结构4.1用户层软件4.2 设备独立性软件4.3 设备驱动程…

摩博会前瞻:OneOS智能超高安全性彩屏,百元级价格,高性能骑行新选择!

引言 中国国际摩托车博览会即将启动&#xff01;倒计时7天&#xff0c;OneOS与恒石智能联合打造的十几款智能彩屏仪表首次展出&#xff01;十几款彩屏仪表由国产HMI芯片Model系列驱动&#xff0c;OneOS实时操作系统&#xff0c;100%国产自主设计&#xff0c;实现百元级超高安全…

DP(Display Port)

DP&#xff08;Display Port&#xff09; 一、DP简介 DisplayPort是由美国视频电子协会&#xff08;VESA&#xff1a;Video Electronics Standards Association&#xff09;在2006年5月提出的一种新型数字显示接口规范&#xff0c;主要用于源端和设备端&#xff08;如电脑显示…

虚拟机中使用gparted扩展硬盘容量

步骤1&#xff1a;安装gparted apt-get install gparted 步骤2&#xff1a;关闭虚拟机&#xff0c;扩展硬盘容量 步骤3&#xff1a;开启虚拟机&#xff0c;找到gparted软件&#xff0c;双击 步骤4&#xff1a;扩展&#xff0c;点击原磁盘&#xff0c;点击扩展&#xff0c;点击保…

深度学习(十一)-PaddlePaddle

PaddlePaddle PaddlePaddle&#xff08;Parallel Distributed Deep Learning&#xff0c;中文名飞桨&#xff09; 是百度公司推出的开源、易学习、易使用的分布式深度学习平台 源于产业实践&#xff0c;在实际中有着优异表现 支持多种机器学习经典模型 优点 易用性。语法简…

网页时装购物系统:Spring Boot框架的创新设计

第1章 绪论 1.1背景及意义 随着社会的快速发展&#xff0c;计算机的影响是全面且深入的。人们生活水平的不断提高&#xff0c;日常生活中人们对时装购物系统方面的要求也在不断提高&#xff0c;喜欢购物的人数更是不断增加&#xff0c;使得时装购物系统的开发成为必需而且紧迫的…

搭建线上虚拟展厅,需要哪些技术?

搭建虚拟展厅需要一系列先进的技术支持&#xff0c;以确保能够为用户提供逼真、生动、互动的参观体验。以下是搭建虚拟展厅所需的主要技术&#xff1a; 1. 三维建模与渲染技术 三维建模&#xff1a;利用三维建模软件&#xff08;如Maya、3D MAX、Blender等&#xff09;建造三维…

Python | Leetcode Python题解之第389题找不同

题目&#xff1a; 题解&#xff1a; class Solution:def findTheDifference(self, s: str, t: str) -> str:return chr(sum(map(ord, t)) - sum(map(ord, s)))

基于free5gc模拟5G核心网和UERANSIM模拟5G用户设备的模拟5G网络环境的部署搭建方法总结和解析。

简介&#xff1a;下文介绍了基于free5gc模拟5G核心网和UERANSIM模拟5G用户设备的模拟5G网络环境的部署搭建方法&#xff0c;并且通过完成相关配置&#xff0c; 简单实现测试5G用户设备接入核心网的注册流程、去注册流程&#xff0c;模拟了一个用户设备通过模拟核心网进行实际的…

2024年上海松江启动建筑绿色低碳发展专项检查,共绘城市节能新篇章

2024年9月4日&#xff0c;2024年度松江区建筑工程绿色低碳发展工作专项检查会议正式开展&#xff0c;会议内容主要围绕以下三点&#xff0c; 1、《关于开展 2024年度本市建筑领域绿色低碳发展工作监督检查的通知》宣贯。 2、分项计量、能效测评工作验收要求介绍。 3、专项检…

怎么使用matplotlib绘制一个从-2π到2π的sin(x)的折线图-学习篇

首先&#xff1a;如果你的环境中没有安装matplotlib&#xff0c;使用以下命令可以直接安装 pip install matplotlib如何画一个这样的折线图呢&#xff1f;往下看 想要画一个简单的sin(x)在-2π到2π的折线图&#xff0c;我们要拆分成以下步骤&#xff1a; 先导入相关的库文…