Skip to content

Commit 4e9fa28

Browse files
authored
Merge branch 'main' into update_config_target
2 parents dc840d2 + 30fbfa6 commit 4e9fa28

File tree

506 files changed

+103568
-342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

506 files changed

+103568
-342
lines changed

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ linters-settings:
2626
- rangeValCopy
2727
- indexAlloc
2828
- deprecatedComment
29+
settings:
30+
ifElseChain:
31+
minThreshold: 3
2932
cyclop:
3033
max-complexity: 20

.tekton/pipeline-ref.yaml

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ spec:
1313
- name: name
1414
value: show-sbom
1515
- name: bundle
16-
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:9bfc6b99ef038800fe131d7b45ff3cd4da3a415dd536f7c657b3527b01c4a13b
16+
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:945a7c9066d3e0a95d3fddb7e8a6992e4d632a2a75d8f3a9bd2ff2fef0ec9aa0
1717
- name: kind
1818
value: task
1919
resolver: bundles
2020
params:
2121
- description: Source Repository URL
2222
name: git-url
2323
type: string
24+
- description: Version to build
25+
name: build-version
26+
type: string
27+
default: "main"
2428
- default: ""
2529
description: Revision of the Source Repository
2630
name: revision
@@ -62,7 +66,7 @@ spec:
6266
description: Image tag expiration time, time values could be something like
6367
1h, 2d, 3w for hours, days, and weeks, respectively.
6468
name: image-expires-after
65-
- default: "false"
69+
- default: "true"
6670
description: Build a source image.
6771
name: build-source-image
6872
type: string
@@ -108,7 +112,7 @@ spec:
108112
- name: name
109113
value: init
110114
- name: bundle
111-
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:092c113b614f6551113f17605ae9cb7e822aa704d07f0e37ed209da23ce392cc
115+
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:0523b51c28375a3f222da91690e22eff11888ebc98a0c73c468af44762265c69
112116
- name: kind
113117
value: task
114118
resolver: bundles
@@ -129,7 +133,7 @@ spec:
129133
- name: name
130134
value: git-clone-oci-ta
131135
- name: bundle
132-
value: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:8e1e861d9564caea3f9ce8d1c62789f5622b5a7051209decc9ecf10b6f54aa71
136+
value: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:8ab0c7a7ac4a4c59740a24304e17cc64fe8745376d19396c4660fc0e1a957a1b
133137
- name: kind
134138
value: task
135139
resolver: bundles
@@ -158,7 +162,7 @@ spec:
158162
- name: name
159163
value: prefetch-dependencies-oci-ta
160164
- name: bundle
161-
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.1@sha256:8e2a8de8e8a55a8e657922d5f8303fefa065f7ec2f8a49a666bf749540d63679
165+
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.1@sha256:3e51d7c477ba00bd0c7de2d8f89269131646d2582e631b9aee91fb4b022d4555
162166
- name: kind
163167
value: task
164168
resolver: bundles
@@ -196,7 +200,9 @@ spec:
196200
- name: BUILD_ARGS
197201
value:
198202
- $(params.build-args[*])
199-
- "COMMIT=tasks.clone-repository.results.commit"
203+
- "COMMIT=$(tasks.clone-repository.results.commit)"
204+
- "BUILDVERSION=$(params.build-version)"
205+
- "DATE=$(tasks.clone-repository.results.commit-timestamp)"
200206
- name: BUILD_ARGS_FILE
201207
value: $(params.build-args-file)
202208
- name: SOURCE_ARTIFACT
@@ -212,7 +218,7 @@ spec:
212218
- name: name
213219
value: buildah-remote-oci-ta
214220
- name: bundle
215-
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.2@sha256:8e8cd24b52a74a75f2cefe67a1047d2c683f84aeb1211862843330bf4653edd3
221+
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.2@sha256:f6c2a95faeafe6e92232aae15398022c7dae512bf2c874b23c73407a920a621b
216222
- name: kind
217223
value: task
218224
resolver: bundles
@@ -241,7 +247,7 @@ spec:
241247
- name: name
242248
value: build-image-index
243249
- name: bundle
244-
value: quay.io/konflux-ci/tekton-catalog/task-build-image-index:0.1@sha256:e4871851566d8b496966b37bcb8c5ce9748a52487f116373d96c6cd28ef684c6
250+
value: quay.io/konflux-ci/tekton-catalog/task-build-image-index:0.1@sha256:a89c141c8d35b2e9d9904c92c9b128f7ccf36681adac7f7422b4537b8bb077e7
245251
- name: kind
246252
value: task
247253
resolver: bundles
@@ -250,56 +256,54 @@ spec:
250256
operator: in
251257
values:
252258
- "true"
253-
- name: rpms-signature-scan
259+
- name: build-source-image
254260
params:
255-
- name: image-url
256-
value: $(tasks.build-image-index.results.IMAGE_URL)
257-
- name: image-digest
258-
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
261+
- name: BINARY_IMAGE
262+
value: $(params.output-image)
263+
- name: SOURCE_ARTIFACT
264+
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
259265
runAfter:
260266
- build-image-index
261267
taskRef:
262268
params:
263269
- name: name
264-
value: rpms-signature-scan
270+
value: source-build-oci-ta
265271
- name: bundle
266-
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:28aaf87d61078a0aeeeabcae455eda7d05c4f9b81d8995bdcf3dde95c1a7a77b
272+
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.1@sha256:26278e5373a726594975a9ec2f177a67e3674bbf905d7d317b9ea60ca7993978
267273
- name: kind
268274
value: task
269275
resolver: bundles
270276
when:
271-
- input: $(params.skip-checks)
277+
- input: $(tasks.init.results.build)
272278
operator: in
273279
values:
274-
- "false"
275-
- name: build-source-image
280+
- "true"
281+
- input: $(params.build-source-image)
282+
operator: in
283+
values:
284+
- "true"
285+
- name: rpms-signature-scan
276286
params:
277-
- name: BINARY_IMAGE
278-
value: $(params.output-image)
279-
- name: SOURCE_ARTIFACT
280-
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
281-
- name: CACHI2_ARTIFACT
282-
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
287+
- name: image-url
288+
value: $(tasks.build-image-index.results.IMAGE_URL)
289+
- name: image-digest
290+
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
283291
runAfter:
284292
- build-image-index
285293
taskRef:
286294
params:
287295
- name: name
288-
value: source-build-oci-ta
296+
value: rpms-signature-scan
289297
- name: bundle
290-
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.1@sha256:d1fd616413d45bb6af0532352bfa8692c5ca409127e5a2dd4f1bc52aef27d1dc
298+
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:8f3b23bf1b0ef55cc79d28604d2397a0101ac9c0c42ae26e26532eb2778c801b
291299
- name: kind
292300
value: task
293301
resolver: bundles
294302
when:
295-
- input: $(tasks.init.results.build)
296-
operator: in
297-
values:
298-
- "true"
299-
- input: $(params.build-source-image)
303+
- input: $(params.skip-checks)
300304
operator: in
301305
values:
302-
- "true"
306+
- "false"
303307
- name: deprecated-base-image-check
304308
params:
305309
- name: IMAGE_URL
@@ -313,7 +317,7 @@ spec:
313317
- name: name
314318
value: deprecated-image-check
315319
- name: bundle
316-
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.4@sha256:b4f9599f5770ea2e6e4d031224ccc932164c1ecde7f85f68e16e99c98d754003
320+
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.4@sha256:5a1a165fa02270f0a947d8a2131ee9d8be0b8e9d34123828c2bef589e504ee84
317321
- name: kind
318322
value: task
319323
resolver: bundles
@@ -335,7 +339,7 @@ spec:
335339
- name: name
336340
value: clair-scan
337341
- name: bundle
338-
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:9f4ddafd599e06b319cece5a4b8ac36b9e7ec46bea378bc6c6af735d3f7f8060
342+
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:0a5421111e7092740398691d5bd7c125cc0896f29531d19414bb5724ae41692a
339343
- name: kind
340344
value: task
341345
resolver: bundles
@@ -355,7 +359,7 @@ spec:
355359
- name: name
356360
value: ecosystem-cert-preflight-checks
357361
- name: bundle
358-
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.1@sha256:5131cce0f93d0b728c7bcc0d6cee4c61d4c9f67c6d619c627e41e3c9775b497d
362+
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.1@sha256:df8a25a3431a70544172ed4844f9d0c6229d39130633960729f825a031a7dea9
359363
- name: kind
360364
value: task
361365
resolver: bundles
@@ -381,7 +385,7 @@ spec:
381385
- name: name
382386
value: sast-snyk-check-oci-ta
383387
- name: bundle
384-
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.2@sha256:ad02dd316d68725490f45f23d2b8acf042bf0a80f7a22c28e0cadc6181fc10f1
388+
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.3@sha256:1119722a2d31b831d1aa336fd8cced0a5016c95466b6b59a58bbf3585735850f
385389
- name: kind
386390
value: task
387391
resolver: bundles
@@ -403,7 +407,7 @@ spec:
403407
- name: name
404408
value: clamav-scan
405409
- name: bundle
406-
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.1@sha256:37a2dcca17429a0e06f36a77c362d2f9b3cb4d0ad9c20393167bd740650a4657
410+
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:6e08cf608240f57442ca5458f3c0dade3558f4f2953be8ea939232f5d5378d58
407411
- name: kind
408412
value: task
409413
resolver: bundles
@@ -423,7 +427,7 @@ spec:
423427
- name: name
424428
value: apply-tags
425429
- name: bundle
426-
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:e6beb161ed59d7be26317da03e172137b31b26648d3e139558e9a457bc56caff
430+
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:87fd7fc0e937aad1a8db9b6e377d7e444f53394dafde512d68adbea6966a4702
427431
- name: kind
428432
value: task
429433
resolver: bundles
@@ -446,7 +450,7 @@ spec:
446450
- name: name
447451
value: push-dockerfile-oci-ta
448452
- name: bundle
449-
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:fc109c347c5355a2a563ea782ff12aa82afc967c456082bf978d99bd378349b4
453+
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:08ef41d6a98608bd5f1de75d77f015f520911a278d1875e174b88b9d04db2441
450454
- name: kind
451455
value: task
452456
resolver: bundles

Dockerfile.downstream

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ RUN npm run build$BUILDSCRIPT
2121

2222
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.22.5-202407301806.g4c8b32d.el9 as go-builder
2323

24-
ARG LDFLAGS
24+
ARG BUILDVERSION
25+
ARG DATE
26+
2527
WORKDIR /opt/app-root
2628

2729
COPY go.mod go.mod
@@ -31,9 +33,9 @@ COPY .mk/ .mk/
3133
COPY cmd/ cmd/
3234
COPY pkg/ pkg/
3335

34-
RUN CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -mod vendor -o plugin-backend cmd/plugin-backend.go
36+
RUN CGO_ENABLED=0 go build -ldflags "-X main.buildVersion=$BUILDVERSION -X main.buildDate=$DATE" -mod vendor -o plugin-backend cmd/plugin-backend.go
3537

36-
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4
38+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5
3739

3840
COPY --from=web-builder /opt/app-root/web/dist ./web/dist
3941
COPY --from=go-builder /opt/app-root/plugin-backend ./

cmd/plugin-backend.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ import (
55
"flag"
66
"fmt"
77
"os"
8+
"slices"
89

910
"github.com/sirupsen/logrus"
1011

1112
"github.com/netobserv/network-observability-console-plugin/pkg/config"
13+
"github.com/netobserv/network-observability-console-plugin/pkg/decoders"
14+
"github.com/netobserv/network-observability-console-plugin/pkg/model"
1215
"github.com/netobserv/network-observability-console-plugin/pkg/server"
1316
)
1417

@@ -54,6 +57,11 @@ func main() {
5457
log.WithError(err).Fatal("auth checker error")
5558
}
5659

60+
if slices.Contains(cfg.Frontend.Features, "networkEvents") {
61+
// Add decoder hook
62+
model.AddFlowLineMapping(decoders.NetworkEventsToString)
63+
}
64+
5765
go server.StartMetrics(&server.MetricsConfig{
5866
Port: cfg.Server.MetricsPort,
5967
CertPath: cfg.Server.CertPath,

config/sample-config.yaml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,21 +1006,9 @@ frontend:
10061006
- id: tcp_flags
10071007
name: TCP flags
10081008
component: autocomplete
1009-
hint: Specify a TCP flags value as integer number.
1009+
hint: Specify a TCP flags value.
10101010
examples: |-
1011-
Logical OR combination of unique TCP flags comprised in the flow, as per RFC-9293, with additional custom flags
1012-
users can specify either numeric value or string representation of the flags as follows :
1013-
- FIN or 1,
1014-
- SYN or 2,
1015-
- RST or 4,
1016-
- PSH or 8,
1017-
- ACK or 16,
1018-
- URG or 32,
1019-
- ECE or 64,
1020-
- CWR or 128,
1021-
- SYN_ACK or 256,
1022-
- FIN_ACK or 512,
1023-
- RST_ACK or 1024,
1011+
Logical OR combination of unique TCP flags comprised in the flow, as per RFC-9293, with additional custom flags (SYN_ACK, FIN_ACK and RST_ACK).
10241012
- id: node_direction
10251013
name: Node Direction
10261014
component: autocomplete
@@ -1122,7 +1110,7 @@ frontend:
11221110
- id: host
11231111
name: Node
11241112
description: Node on which the resources are running
1125-
labels:
1113+
labels:
11261114
- SrcK8S_HostName
11271115
- DstK8S_HostName
11281116
groups:
@@ -1137,7 +1125,7 @@ frontend:
11371125
name: Namespace
11381126
shortName: NS
11391127
description: Resource namespace
1140-
labels:
1128+
labels:
11411129
- SrcK8S_Namespace
11421130
- DstK8S_Namespace
11431131
groups:
@@ -1155,7 +1143,7 @@ frontend:
11551143
name: Owner
11561144
shortName: Own
11571145
description: Controller owner, such as a Deployment
1158-
labels:
1146+
labels:
11591147
- SrcK8S_OwnerName
11601148
- SrcK8S_OwnerType
11611149
- DstK8S_OwnerName
@@ -1181,7 +1169,7 @@ frontend:
11811169
name: Resource
11821170
shortName: Res
11831171
description: Base resource, such as a Pod, a Service or a Node
1184-
labels:
1172+
labels:
11851173
- SrcK8S_Name
11861174
- SrcK8S_Type
11871175
- SrcK8S_OwnerName
@@ -1332,7 +1320,7 @@ frontend:
13321320
type: string
13331321
description: Network interfaces
13341322
- name: Flags
1335-
type: number
1323+
type: string
13361324
description: |
13371325
Logical OR combination of unique TCP flags comprised in the flow, as per RFC-9293, with additional custom flags to represent the following per-packet combinations: +
13381326
- SYN+ACK (0x100) +

0 commit comments

Comments
 (0)