Skip to content

Commit

Permalink
feat(RHTAPWATCH-1179): custom cert in ecosystem-cert-preflight-check
Browse files Browse the repository at this point in the history
Support mounting a custom ca-bundle to allow the
ecosystem-cert-preflight-check task to use a registry with a
self-signed certificate.

Signed-off-by: Yftach Herzog <yherzog@redhat.com>
  • Loading branch information
yftacherzog authored and chmeliik committed Aug 16, 2024
1 parent 16d97aa commit cb8f233
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 3 deletions.
2 changes: 2 additions & 0 deletions pipelines/docker-build-oci-ta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
### ecosystem-cert-preflight-checks:0.1 task parameters
|name|description|default value|already set by|
|---|---|---|---|
|ca-trust-config-map-key| The name of the key in the ConfigMap that contains the CA bundle data.| ca-bundle.crt| |
|ca-trust-config-map-name| The name of the ConfigMap to read CA bundle data from.| trusted-ca| |
|image-url| Image url to scan.| None| '$(tasks.build-container.results.IMAGE_URL)'|
### git-clone-oci-ta:0.1 task parameters
|name|description|default value|already set by|
Expand Down
2 changes: 2 additions & 0 deletions pipelines/docker-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
### ecosystem-cert-preflight-checks:0.1 task parameters
|name|description|default value|already set by|
|---|---|---|---|
|ca-trust-config-map-key| The name of the key in the ConfigMap that contains the CA bundle data.| ca-bundle.crt| |
|ca-trust-config-map-name| The name of the ConfigMap to read CA bundle data from.| trusted-ca| |
|image-url| Image url to scan.| None| '$(tasks.build-container.results.IMAGE_URL)'|
### git-clone:0.1 task parameters
|name|description|default value|already set by|
Expand Down
2 changes: 2 additions & 0 deletions pipelines/java-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
### ecosystem-cert-preflight-checks:0.1 task parameters
|name|description|default value|already set by|
|---|---|---|---|
|ca-trust-config-map-key| The name of the key in the ConfigMap that contains the CA bundle data.| ca-bundle.crt| |
|ca-trust-config-map-name| The name of the ConfigMap to read CA bundle data from.| trusted-ca| |
|image-url| Image url to scan.| None| '$(tasks.build-container.results.IMAGE_URL)'|
### git-clone:0.1 task parameters
|name|description|default value|already set by|
Expand Down
2 changes: 2 additions & 0 deletions pipelines/nodejs-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
### ecosystem-cert-preflight-checks:0.1 task parameters
|name|description|default value|already set by|
|---|---|---|---|
|ca-trust-config-map-key| The name of the key in the ConfigMap that contains the CA bundle data.| ca-bundle.crt| |
|ca-trust-config-map-name| The name of the ConfigMap to read CA bundle data from.| trusted-ca| |
|image-url| Image url to scan.| None| '$(tasks.build-container.results.IMAGE_URL)'|
### git-clone:0.1 task parameters
|name|description|default value|already set by|
Expand Down
2 changes: 2 additions & 0 deletions pipelines/tekton-bundle-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
### ecosystem-cert-preflight-checks:0.1 task parameters
|name|description|default value|already set by|
|---|---|---|---|
|ca-trust-config-map-key| The name of the key in the ConfigMap that contains the CA bundle data.| ca-bundle.crt| |
|ca-trust-config-map-name| The name of the ConfigMap to read CA bundle data from.| trusted-ca| |
|image-url| Image url to scan.| None| '$(tasks.build-container.results.IMAGE_URL)'|
### git-clone:0.1 task parameters
|name|description|default value|already set by|
Expand Down
8 changes: 5 additions & 3 deletions task/ecosystem-cert-preflight-checks/0.1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ The ecosystem-cert-preflight-checks task checks an image for certification readi

## Params:

| name | description |
|--------------|----------------------------------------------------------------|
| image-url | Image URL. |
| name | description | default |
|--------------------------|------------------------------------------------------------------------|---------------|
| image-url | Image URL. | None |
| ca-trust-config-map-name | The name of the ConfigMap to read CA bundle data from. | trusted-ca |
| ca-trust-config-map-key | The name of the key in the ConfigMap that contains the CA bundle data. | ca-bundle.crt |

## Results:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ spec:
params:
- name: image-url
description: Image url to scan.
- name: ca-trust-config-map-name
type: string
description: The name of the ConfigMap to read CA bundle data from.
default: trusted-ca
- name: ca-trust-config-map-key
type: string
description: The name of the key in the ConfigMap that contains the CA bundle data.
default: ca-bundle.crt
results:
- name: TEST_OUTPUT
description: Preflight pass or fail outcome.
Expand All @@ -21,6 +29,10 @@ spec:
volumeMounts:
- name: pfltoutputdir
mountPath: /artifacts
- name: trusted-ca
mountPath: /etc/pki/tls/certs/ca-custom-bundle.crt
subPath: ca-bundle.crt
readOnly: true
- name: gather-pflt-results
image: quay.io/konflux-ci/appstudio-utils:ab6b0b8e40e440158e7288c73aff1cf83a2cc8a9@sha256:24179f0efd06c65d16868c2d7eb82573cce8e43533de6cea14fec3b7446e0b14
volumeMounts:
Expand Down Expand Up @@ -78,3 +90,10 @@ spec:
volumes:
- name: pfltoutputdir
emptyDir: {}
- name: trusted-ca
configMap:
name: $(params.ca-trust-config-map-name)
items:
- key: $(params.ca-trust-config-map-key)
path: ca-bundle.crt
optional: true

0 comments on commit cb8f233

Please sign in to comment.