Skip to content

Commit

Permalink
Update Tekton Results to v0.13.0 (#4973)
Browse files Browse the repository at this point in the history
* Update Tekton Results to v0.13.0

This also adds new retention-policy-agent component, currently not used
by Konflux.

* Updated Results to read vector forwarded logs from S3

Results API config is updated to read vector forwarded logs from S3 and also
read legacy logs.

* Add events permissions to watcher CluasterRole

Required to create events for finalizer.
  • Loading branch information
enarha authored Nov 27, 2024
1 parent 58f5911 commit fc765c2
Show file tree
Hide file tree
Showing 5 changed files with 488 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ spec:
aws_region: "{{ .aws_region }}"
bucket: "{{ .bucket }}"
endpoint: "https://{{ .endpoint }}"
s3_url: "s3://{{ .bucket }}"
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,18 @@ rules:
- pods/log
verbs:
- get
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- create
- update
- delete
- patch
- watch
- apiGroups:
- tekton.dev
resources:
Expand Down Expand Up @@ -731,6 +743,18 @@ data:
K8S_BURST=100
PROFILING=true
PROFILING_PORT=6060
CONVERTER_ENABLE=false
CONVERTER_DB_LIMIT=50
LOGGING_PLUGIN_PROXY_PATH=/api/logs/v1/application
LOGGING_PLUGIN_TOKEN_PATH=/var/run/secrets/kubernetes.io/serviceaccount/token
LOGGING_PLUGIN_NAMESPACE_KEY=kubernetes_namespace_name
LOGGING_PLUGIN_STATIC_LABELS='log_type=application'
LOGGING_PLUGIN_CA_CERT=
LOGGING_PLUGIN_QUERY_LIMIT=1700
LOGGING_PLUGIN_TLS_VERIFICATION_DISABLE=
LOGGING_PLUGIN_FORWARDER_DELAY_DURATION=10
LOGGING_PLUGIN_API_URL=s3://tekton-logs
LOGGING_PLUGIN_QUERY_PARAMS='v1alpha2LogType=true&use_path_style=true'
kind: ConfigMap
metadata:
annotations:
Expand Down Expand Up @@ -872,6 +896,19 @@ metadata:
namespace: tekton-results
---
apiVersion: v1
data:
maxRetention: "30"
runAt: 5 5 * * 0
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: tekton-results-retention-policy
app.kubernetes.io/part-of: tekton-results
app.kubernetes.io/version: devel
name: tekton-results-config-results-retention-policy
namespace: tekton-results
---
apiVersion: v1
data:
version: devel
kind: ConfigMap
Expand Down Expand Up @@ -1066,7 +1103,7 @@ spec:
- name: LOGS_API
value: "true"
- name: LOGS_TYPE
value: S3
value: blob
- name: S3_HOSTNAME_IMMUTABLE
value: "true"
- name: S3_ACCESS_KEY_ID
Expand Down Expand Up @@ -1114,7 +1151,7 @@ spec:
secretKeyRef:
key: db.name
name: tekton-results-database
image: quay.io/konflux-ci/tekton-results-api:e35af9274c0df84386b73aae8df0ad496ad175df
image: quay.io/konflux-ci/tekton-results-api:b4017a355cafd589c3ae9a31f3d869e21a4b77fe
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -1207,6 +1244,80 @@ spec:
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: tekton-results-retention-policy-agent
app.kubernetes.io/part-of: tekton-results
app.kubernetes.io/version: devel
name: tekton-results-retention-policy-agent
namespace: tekton-results
spec:
replicas: 0
selector:
matchLabels:
app.kubernetes.io/name: tekton-results-retention-policy-agent
template:
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
labels:
app.kubernetes.io/name: tekton-results-retention-policy-agent
app.kubernetes.io/version: devel
spec:
containers:
- env:
- name: SYSTEM_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CONFIG_LOGGING_NAME
value: tekton-results-config-logging
- name: DB_USER
valueFrom:
secretKeyRef:
key: POSTGRES_USER
name: tekton-results-postgres
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: POSTGRES_PASSWORD
name: tekton-results-postgres
image: quay.io/konflux-ci/tekton-results-retention-policy-agent:b4017a355cafd589c3ae9a31f3d869e21a4b77fe
name: retention-policy-agent
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/tekton/results
name: config
readOnly: true
- mountPath: /etc/tls
name: tls
readOnly: true
serviceAccountName: tekton-results-watcher
volumes:
- configMap:
name: tekton-results-api-config
name: config
- name: tls
secret:
secretName: tekton-results-tls
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
Expand Down Expand Up @@ -1256,6 +1367,7 @@ spec:
- token
- -check_owner=false
- -completed_run_grace_period=2h
- -logs_api=true
env:
- name: SYSTEM_NAMESPACE
valueFrom:
Expand All @@ -1273,7 +1385,7 @@ spec:
value: tekton-results-api-service.tekton-pipelines.svc.cluster.local:8080
- name: AUTH_MODE
value: token
image: quay.io/redhat-appstudio/tekton-results-watcher:bae7851ff584423503af324200f52cd28ca99116
image: quay.io/konflux-ci/tekton-results-watcher:b4017a355cafd589c3ae9a31f3d869e21a4b77fe
name: watcher
ports:
- containerPort: 9090
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,18 @@ rules:
- pods/log
verbs:
- get
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- create
- update
- delete
- patch
- watch
- apiGroups:
- tekton.dev
resources:
Expand Down Expand Up @@ -684,6 +696,18 @@ data:
K8S_BURST=100
PROFILING=true
PROFILING_PORT=6060
CONVERTER_ENABLE=false
CONVERTER_DB_LIMIT=50
LOGGING_PLUGIN_PROXY_PATH=/api/logs/v1/application
LOGGING_PLUGIN_TOKEN_PATH=/var/run/secrets/kubernetes.io/serviceaccount/token
LOGGING_PLUGIN_NAMESPACE_KEY=kubernetes_namespace_name
LOGGING_PLUGIN_STATIC_LABELS='log_type=application'
LOGGING_PLUGIN_CA_CERT=
LOGGING_PLUGIN_QUERY_LIMIT=1700
LOGGING_PLUGIN_TLS_VERIFICATION_DISABLE=
LOGGING_PLUGIN_FORWARDER_DELAY_DURATION=10
LOGGING_PLUGIN_API_URL=s3://tekton-logs
LOGGING_PLUGIN_QUERY_PARAMS='v1alpha2LogType=true&use_path_style=true'
kind: ConfigMap
metadata:
annotations:
Expand Down Expand Up @@ -825,6 +849,19 @@ metadata:
namespace: tekton-results
---
apiVersion: v1
data:
maxRetention: "30"
runAt: 5 5 * * 0
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: tekton-results-retention-policy
app.kubernetes.io/part-of: tekton-results
app.kubernetes.io/version: devel
name: tekton-results-config-results-retention-policy
namespace: tekton-results
---
apiVersion: v1
data:
version: devel
kind: ConfigMap
Expand Down Expand Up @@ -1046,7 +1083,7 @@ spec:
- name: LOGS_API
value: "true"
- name: LOGS_TYPE
value: S3
value: blob
- name: S3_HOSTNAME_IMMUTABLE
value: "true"
- name: S3_ACCESS_KEY_ID
Expand Down Expand Up @@ -1074,6 +1111,11 @@ spec:
secretKeyRef:
key: endpoint
name: tekton-results-s3
- name: LOGGING_PLUGIN_API_URL
valueFrom:
secretKeyRef:
key: s3_url
name: tekton-results-s3
- name: DB_USER
valueFrom:
secretKeyRef:
Expand All @@ -1094,7 +1136,7 @@ spec:
secretKeyRef:
key: db.name
name: tekton-results-database
image: quay.io/konflux-ci/tekton-results-api:e35af9274c0df84386b73aae8df0ad496ad175df
image: quay.io/konflux-ci/tekton-results-api:b4017a355cafd589c3ae9a31f3d869e21a4b77fe
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -1158,6 +1200,80 @@ spec:
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: tekton-results-retention-policy-agent
app.kubernetes.io/part-of: tekton-results
app.kubernetes.io/version: devel
name: tekton-results-retention-policy-agent
namespace: tekton-results
spec:
replicas: 0
selector:
matchLabels:
app.kubernetes.io/name: tekton-results-retention-policy-agent
template:
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
labels:
app.kubernetes.io/name: tekton-results-retention-policy-agent
app.kubernetes.io/version: devel
spec:
containers:
- env:
- name: SYSTEM_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CONFIG_LOGGING_NAME
value: tekton-results-config-logging
- name: DB_USER
valueFrom:
secretKeyRef:
key: POSTGRES_USER
name: tekton-results-postgres
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: POSTGRES_PASSWORD
name: tekton-results-postgres
image: quay.io/konflux-ci/tekton-results-retention-policy-agent:b4017a355cafd589c3ae9a31f3d869e21a4b77fe
name: retention-policy-agent
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/tekton/results
name: config
readOnly: true
- mountPath: /etc/tls
name: tls
readOnly: true
serviceAccountName: tekton-results-watcher
volumes:
- configMap:
name: tekton-results-api-config
name: config
- name: tls
secret:
secretName: tekton-results-tls
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
Expand Down Expand Up @@ -1235,6 +1351,7 @@ spec:
- -check_owner=false
- -completed_run_grace_period
- 10m
- -logs_api=true
env:
- name: SYSTEM_NAMESPACE
valueFrom:
Expand All @@ -1252,7 +1369,7 @@ spec:
value: tekton-results-api-service.tekton-pipelines.svc.cluster.local:8080
- name: AUTH_MODE
value: token
image: quay.io/redhat-appstudio/tekton-results-watcher:bae7851ff584423503af324200f52cd28ca99116
image: quay.io/konflux-ci/tekton-results-watcher:b4017a355cafd589c3ae9a31f3d869e21a4b77fe
name: watcher
ports:
- containerPort: 9090
Expand Down
Loading

0 comments on commit fc765c2

Please sign in to comment.