Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service, Ingress and readonly customize #8

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

*.tmp
*.tar.gz
*.tgz
#*.tgz
*.lock
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
- --logout-url=
- --pipelines-namespace=tekton-pipelines
- --triggers-namespace=tekton-pipelines
- --read-only=true
- --read-only={{ .Values.readonly }}
- --log-level=info
- --log-format=json
- --namespace=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ metadata:
name: tekton-dashboard
namespace: '{{ .Release.Namespace }}'
annotations:
{{- if .Values.ingress.annotations }}
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- end }}
{{- if .Values.authHost }}
nginx.ingress.kubernetes.io/auth-signin: https://{{ toYaml .Values.authHost }}/oauth2/start?rd=https://$host$uri
nginx.ingress.kubernetes.io/auth-url: https://{{ toYaml .Values.authHost }}/oauth2/auth
{{- end }}
kubernetes.io/ingress.class: nginx

spec:
{{- if .Values.ingress.tls.enabled }}
tls:
Expand Down
33 changes: 33 additions & 0 deletions charts/tekton-dashboard/templates/tekton-dashboard-readwrite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{ if not .Values.readonly }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tekton-dashboard-tutorial
rules:
- apiGroups:
- tekton.dev
resources:
- tasks
- taskruns
- pipelines
- pipelineruns
verbs:
- get
- create
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: tekton-dashboard-permissions
namespace: jx
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tekton-dashboard-tutorial
subjects:
- kind: ServiceAccount
name: tekton-dashboard
namespace: tekton-pipelines
{{ end }}
5 changes: 5 additions & 0 deletions charts/tekton-dashboard/templates/tekton-dashboard-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ metadata:
app.kubernetes.io/version: v0.35.0
dashboard.tekton.dev/release: v0.35.0
version: v0.35.0
annotations:
{{- if .Values.service.annotations }}
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
name: tekton-dashboard
spec:
type: {{ .Values.service.type }}
ports:
- name: http
port: 9097
Expand Down
10 changes: 9 additions & 1 deletion charts/tekton-dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
ingress:
host: tekton-dashboard.acme.com
tls:
enabled: true
enabled: false
secretName: example.com
annotations:
kubernetes.io/ingress.class: nginx
service:
type: ClusterIP
enabled: true
annotations: {}
readonly: true

# this is the auth host for the proxy (tekton-auth.example.com) and used to template ingress annotations for redirection
# only add an authHost if deploying oauth2-proxy
authHost:
Expand Down
20 changes: 20 additions & 0 deletions index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
entries:
tekton-dashboard:
- apiVersion: v2
appVersion: 0.35.0
created: "2024-07-07T12:08:06.064456+03:00"
dependencies:
- condition: oauth2-proxy.enabled
name: oauth2-proxy
repository: https://oauth2-proxy.github.io/manifests
version: 6.13.1
description: A Helm chart for Tekton Pipelines Dashboard
digest: eaabfacf62d91d7f0706b523d1330186dfd03cdaa6734ea4e6153fc54476de1e
home: https://github.com/jenkins-x/tekton-dashboard-helm-chart
icon: https://avatars2.githubusercontent.com/u/47602533
name: tekton-dashboard
urls:
- https://workcanvas.github.io/tekton-dashboard-helm-chart/tekton-dashboard-0.0.5.tgz
version: 0.0.5
generated: "2024-07-07T12:08:06.059602+03:00"
Binary file added tekton-dashboard-0.0.5.tgz
Binary file not shown.