Skip to content

K8SPG-837 switch base image to RHEL 10 for PG K8s Operator #1232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ jobs:
export DOCKER_DEFAULT_PLATFORM='linux/arm64'
make build-docker-image

- name: Run Trivy vulnerability scanner image (linux/arm64)
uses: aquasecurity/trivy-action@0.31.0
- name: Run Snyk vulnerability scanner image (linux/arm64)
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
version: 'v0.57.1'
image: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64'
args: --platform=linux/arm64 --severity-threshold=high --exclude-base-image-vulns --file=./build/postgres-operator/Dockerfile -fail-on=upgradable

- name: Build an image from Dockerfile (linux/amd64)
run: |
Expand All @@ -49,13 +46,11 @@ jobs:
export DOCKER_DEFAULT_PLATFORM='linux/amd64'
make build-docker-image

- name: Run Trivy vulnerability scanner image (linux/amd64)
uses: aquasecurity/trivy-action@0.31.0
- name: Run Snyk vulnerability scanner image (linux/amd64)
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
version: 'v0.57.1'
image: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64'
args: --platform=linux/amd64 --severity-threshold=high --exclude-base-image-vulns --file=./build/postgres-operator/Dockerfile -fail-on=upgradable

2 changes: 1 addition & 1 deletion build/postgres-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN mkdir -p build/_output/bin \
RUN ./bin/license_aggregator.sh ./cmd/...; \
cp -r ./licenses /licenses

FROM registry.access.redhat.com/ubi9/ubi-minimal AS ubi9
FROM registry.access.redhat.com/ubi10/ubi-minimal AS ubi10
RUN microdnf update -y && microdnf clean all -y

LABEL name="Percona Postgres Operator" \
Expand Down
Loading