Skip to content

Conversation

@alexellis
Copy link
Member

@alexellis alexellis commented Aug 8, 2024

Description

Add UPGRADE_PACKAGES for Debian-based templates

Motivation and Context

The UPGRADE_PACKAGES build_arg will invoke an apt upgrade to help with warnings generated from CVE / image scanners.

How Has This Been Tested?

Example:

version: 1.0
provider:
  name: openfaas
  gateway: https://openfaas.o6s.io
functions:
  updated:
    lang: python3-http-debian
    handler: ./updated
    image: ttl.sh/updated:latest
    build_args:
      UPGRADE_PACKAGES: "1"

Toggling UPGRADE_PACKAGES with 1/0 or true/false results in a rebuild and updated packages for the positive case.

Additionally, the Alpine templates support the same behaviour:

version: 1.0
provider:
  name: openfaas
  gateway: https://openfaas.o6s.io
functions:
  updated-flask:
    lang: python3-flask
    handler: ./updated-flask
    image: ttl.sh/updated-flask:latest

    build_args:
      UPGRADE_PACKAGES: "1"
      ADDITIONAL_PACKAGE: "curl"

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

An update will be needed in the docs

The UPGRADE_PACKAGES build_arg will invoke an apt upgrade to
help with warnings generated from CVE / image scanners.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
@alexellis alexellis merged commit d64ee94 into master Aug 8, 2024
@alexellis alexellis deleted the upgrade_for_debian branch August 8, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants