Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ base_images:
name: rosa-aws-cli
namespace: ci
tag: release
tls-scanner-tool:
name: "4.22"
namespace: ocp
tag: tls-scanner-tool
build_root:
image_stream_tag:
name: builder
Expand Down Expand Up @@ -180,6 +184,60 @@ tests:
requests:
cpu: 100m
workflow: ipi-aws
- always_run: false
as: e2e-aws-tls-scanner
optional: true
steps:
cluster_profile: openshift-org-aws
env:
PQC_CHECK: "true"
SCAN_NAMESPACE: openshift-file-integrity
SCANNER_CPU_REQUEST: 500m
SCANNER_MEM_REQUEST: 1Gi
SCANNER_NAMESPACE: openshift-file-integrity
test:
- as: deploy
cli: latest
commands: |
# The Makefile's install/deploy targets shell out to "kubectl" directly
# (kubebuilder-scaffolded boilerplate); the CI cli image only has "oc".
mkdir -p /tmp/bin
ln -sf "$(command -v oc)" /tmp/bin/kubectl
export PATH="/tmp/bin:$PATH"
# NOTE: do not chain "e2e-set-image deploy" -- deploy's own recipe
# unconditionally re-runs "kustomize edit set image ...=${IMG}",
# clobbering whatever e2e-set-image just set back to IMG's default
# (the public quay.io release image). Pass IMG directly instead.
make deploy IMG="${IMAGE_FROM_CI}"
oc wait --timeout=5m --for=condition=Available -n openshift-file-integrity deployment/file-integrity-operator
# deployment.yaml has no readiness/liveness probe, so "Available" above
# only means the container process started -- it says nothing about the
# metrics HTTPS listener on :8585, which pkg/controller/metrics/metrics.go
# deliberately brings up later, after blocking (up to 5m) for the
# service-ca-issued serving cert to be mounted. Wait for that same file
# to actually appear in the running container before scanning, otherwise
# tls-scanner's /proc/net/tcp-based port discovery (this Deployment
# declares no containerPorts) races it and only ever sees the two plain
# HTTP ports (8081 health, 8383 controller-runtime metrics) that are up
# immediately -- silently skipping the one HTTPS endpoint under test.
for i in $(seq 1 36); do
if oc exec -n openshift-file-integrity deploy/file-integrity-operator -- test -f /var/run/secrets/serving-cert/tls.crt 2>/dev/null; then
echo "metrics serving cert is mounted, endpoint should be listening"
sleep 5
break
fi
echo "waiting for metrics serving cert to be mounted (attempt $i/36)..."
sleep 5
done
dependencies:
- env: IMAGE_FROM_CI
name: file-integrity-operator
from: src
resources:
requests:
cpu: 100m
- ref: tls-scanner-run
workflow: ipi-aws
zz_generated_metadata:
branch: master
org: openshift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,109 @@ presubmits:
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )e2e-aws,?($|\s.*)
- agent: kubernetes
always_run: false
branches:
- ^master$
- ^master-
cluster: build05
context: ci/prow/e2e-aws-tls-scanner
decorate: true
decoration_config:
sparse_checkout_files:
- Dockerfile.ci
labels:
ci-operator.openshift.io/cloud: aws
ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-file-integrity-operator-master-e2e-aws-tls-scanner
optional: true
rerun_command: /test e2e-aws-tls-scanner
spec:
containers:
- args:
- --enable-secrets-store-csi-driver=true
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --gsm-config=/etc/gsm-config/gsm-config.yaml
- --gsm-credentials-file=/etc/gsm-credentials/key.json
- --gsm-project-config=/etc/gsm-config/gsm-project-config.yaml
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --target=e2e-aws-tls-scanner
command:
- ci-operator
env:
- name: HTTP_SERVER_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest
imagePullPolicy: Always
name: ""
ports:
- containerPort: 8080
name: http
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /etc/gsm-config
name: gsm-config
readOnly: true
- mountPath: /etc/gsm-credentials
name: gsm-sa-key
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- configMap:
name: gsm-config
name: gsm-config
- csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: ci-operator-sa-key-spc
name: gsm-sa-key
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )e2e-aws-tls-scanner,?($|\s.*)
- agent: kubernetes
always_run: false
annotations:
Expand Down