Skip to content

Commit 0f4c699

Browse files
Satyam Bhardwajgabemontero
authored andcommitted
results metrics exposed over https using kube-rbac-proxy
Signed-off-by: Satyam Bhardwaj <[email protected]>
1 parent c265f3a commit 0f4c699

File tree

9 files changed

+43
-48
lines changed

9 files changed

+43
-48
lines changed

developer/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
cluster_type: openshift
77

88
# git_url refers to a git repo to be considered as the source of truth for Argo CD applications.
9-
git_url: https://github.com/ramessesii2/pipeline-service.git
9+
git_url: https://github.com/openshift-pipelines/pipeline-service.git
1010

1111
# git_ref refers to the git repo's ref to be considered as the source of truth for Argo CD applications.
12-
git_ref: RAMESSESII2/results-kube-rbac-proxy-test
12+
git_ref: main
1313

1414
# Applications to be deployed on the cluster
1515
apps:

developer/openshift/gitops/argocd/pipeline-service-o11y.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ spec:
1212
server: https://kubernetes.default.svc
1313
source:
1414
path: developer/openshift/gitops/argocd/pipeline-service-o11y
15-
repoURL: https://github.com/ramessesii2/pipeline-service.git
16-
targetRevision: RAMESSESII2/results-kube-rbac-proxy-test
15+
repoURL: https://github.com/openshift-pipelines/pipeline-service.git
16+
targetRevision: main
1717
project: default
1818
syncPolicy:
1919
# Comment this out if you want to manually trigger deployments (using the

developer/openshift/gitops/argocd/pipeline-service-storage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ spec:
1212
server: https://kubernetes.default.svc
1313
source:
1414
path: developer/openshift/gitops/argocd/pipeline-service-storage
15-
repoURL: https://github.com/ramessesii2/pipeline-service.git
16-
targetRevision: RAMESSESII2/results-kube-rbac-proxy-test
15+
repoURL: https://github.com/openshift-pipelines/pipeline-service.git
16+
targetRevision: main
1717
project: default
1818
syncPolicy:
1919
# Comment this out if you want to manually trigger deployments (using the

developer/openshift/gitops/argocd/pipeline-service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ spec:
1212
server: https://kubernetes.default.svc
1313
source:
1414
path: developer/openshift/gitops/argocd/pipeline-service
15-
repoURL: https://github.com/ramessesii2/pipeline-service.git
16-
targetRevision: RAMESSESII2/results-kube-rbac-proxy-test
15+
repoURL: https://github.com/openshift-pipelines/pipeline-service.git
16+
targetRevision: main
1717
project: default
1818
syncPolicy:
1919
# Comment this out if you want to manually trigger deployments (using the

operator/gitops/argocd/pipeline-service/tekton-results/api-kube-rbac-proxy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ spec:
1414
- "--secure-listen-address=0.0.0.0:9443"
1515
- "--upstream=http://127.0.0.1:9090/"
1616
- "--logtostderr=true"
17-
- "--v=10"
17+
- "--v=6"
1818
securityContext:
1919
allowPrivilegeEscalation: false
2020
seccompProfile:

operator/gitops/argocd/pipeline-service/tekton-results/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ resources:
88
- api-route.yaml
99
- watcher-logging-rbac.yaml
1010
- service-monitor.yaml
11+
- watcher-rbac.yaml
1112

1213
images:
1314
- name: ko://github.com/tektoncd/results/cmd/api
@@ -43,7 +44,6 @@ patches:
4344
- path: watcher-service-sync.yaml
4445
- path: api-kube-rbac-proxy.yaml
4546
- path: watcher-kube-rbac-proxy.yaml
46-
- path: watcher-cr-patch.yaml
4747
- path: watcher-service-patch.yaml
4848
target:
4949
version: v1

operator/gitops/argocd/pipeline-service/tekton-results/watcher-cr-patch.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

operator/gitops/argocd/pipeline-service/tekton-results/watcher-kube-rbac-proxy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ spec:
1414
- "--secure-listen-address=0.0.0.0:8443"
1515
- "--upstream=http://127.0.0.1:9090/"
1616
- "--logtostderr=true"
17-
- "--v=10"
17+
- "--v=6"
1818
securityContext:
1919
allowPrivilegeEscalation: false
2020
seccompProfile:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: tekton-results-watcher-rbac
6+
annotations:
7+
argocd.argoproj.io/sync-wave: "0"
8+
rules:
9+
# Watcher needs to be able to verify incoming auth tokens.
10+
- apiGroups: ["authentication.k8s.io"]
11+
resources: ["tokenreviews"]
12+
verbs: ["create"]
13+
# Watcher needs to be able to use RBAC to verify user authorization.
14+
- apiGroups: ["authorization.k8s.io"]
15+
resources: ["subjectaccessreviews"]
16+
verbs: ["create"]
17+
18+
---
19+
apiVersion: rbac.authorization.k8s.io/v1
20+
kind: ClusterRoleBinding
21+
metadata:
22+
name: tekton-results-watcher-rbac
23+
annotations:
24+
argocd.argoproj.io/sync-wave: "0"
25+
subjects:
26+
- kind: ServiceAccount
27+
name: watcher
28+
namespace: tekton-pipelines
29+
roleRef:
30+
apiGroup: rbac.authorization.k8s.io
31+
kind: ClusterRole
32+
name: tekton-results-watcher-rbac

0 commit comments

Comments
 (0)