Skip to content

Commit

Permalink
Merge pull request #710 from sayan-biswas/tekton-results-restructure
Browse files Browse the repository at this point in the history
Fix tekton results structure
  • Loading branch information
gabemontero authored Jul 12, 2023
2 parents 5bfee7e + 45ddf6e commit fe53355
Show file tree
Hide file tree
Showing 22 changed files with 81 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../operator/gitops/argocd/pipeline-service/tekton-results/base
- ../../../../../../operator/gitops/argocd/pipeline-service/tekton-results

patches:
- path: minio-create-bucket.yaml
Expand Down
2 changes: 1 addition & 1 deletion developer/openshift/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ uninstall_operators_and_controllers(){
fi

printf "\n Uninstalling tekton-results:\n"
kubectl delete -k "$GITOPS_DIR/tekton-results/base" --ignore-not-found=true
kubectl delete -k "$GITOPS_DIR/tekton-results" --ignore-not-found=true
tkn_results_ns=$(kubectl get ns | grep -ie "tekton-results" | cut -d " " -f 1)
if [[ -n "$pac_ns" ]]; then
kubectl delete ns "$tkn_results_ns"
Expand Down
2 changes: 1 addition & 1 deletion operator/gitops/argocd/pipeline-service/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Kustomization
resources:
- openshift-pipelines
- tekton-chains
- tekton-results/base
- tekton-results
- metrics-exporter

# Skip applying the Tekton operands while the Tekton operator is being installed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resources:
- namespace.yaml
- api-route.yaml
- watcher-logging-rbac.yaml
- service-monitor.yaml

images:
- name: ko://github.com/tektoncd/results/cmd/api
Expand All @@ -23,7 +24,7 @@ images:
configMapGenerator:
- behavior: replace
files:
- env/config
- config.env
name: api-config
namespace: tekton-pipelines
options:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: metrics-reader
namespace: tekton-results
---
apiVersion: v1
kind: Secret
metadata:
name: metrics-reader
namespace: tekton-results
annotations:
kubernetes.io/service-account.name: metrics-reader
type: kubernetes.io/service-account-token
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tekton-results-service-metrics-reader
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus-tekton-results-service-metrics-reader
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tekton-results-service-metrics-reader
subjects:
- kind: ServiceAccount
name: metrics-reader
namespace: tekton-results
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: tekton-results-api
namespace: tekton-results
spec:
endpoints:
- path: /metrics
port: prometheus
scheme: http
bearerTokenSecret:
name: "metrics-reader"
key: token
tlsConfig:
insecureSkipVerify: true
selector:
matchLabels:
app.kubernetes.io/name: tekton-results-api
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: tekton-results-watcher
namespace: tekton-results
spec:
endpoints:
- path: /metrics
port: metrics
scheme: http
bearerTokenSecret:
name: "metrics-reader"
key: token
tlsConfig:
insecureSkipVerify: true
selector:
matchLabels:
app.kubernetes.io/name: tekton-results-watcher

0 comments on commit fe53355

Please sign in to comment.