Skip to content
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

dockerfiles: default multiarch containers #4691

Closed
wants to merge 91 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
67de159
dockerfiles: remove arch-specific
patrick-stephens Jan 26, 2022
ae413b9
dockerfiles: rename Linux to default
patrick-stephens Jan 26, 2022
f7427d8
Changes to workflows - not complete
patrick-stephens Jan 26, 2022
181658e
packaging: update Windows build to detain fluent-bit artefacts (#4695)
patrick-stephens Jan 27, 2022
3595d92
build: detect 'libyaml'
edsiper Jan 17, 2022
1669fc4
sds: new flb_sds_trim() function
edsiper Jan 17, 2022
5b76659
config_format: new config reader for Fluent Bit and YAML formats (#4331)
edsiper Jan 17, 2022
81689e6
tests: internal: add 'config_format' for fluentbit and YAML
edsiper Jan 17, 2022
d2ca4d9
config_format: use 'compat' interface
edsiper Jan 17, 2022
01e9a3e
config_format: new wrapper to read from file
edsiper Jan 18, 2022
74be795
bin: read configuration by using new config_format API
edsiper Jan 18, 2022
cca9f26
utils: lowercase text errors
edsiper Jan 20, 2022
507508f
config_format: pass context as reference
edsiper Jan 20, 2022
dd0d86b
bin: use config_format to compose pipeline from the command line
edsiper Jan 20, 2022
40c9a4a
tests: internal: config_format: use new config_format prototype
edsiper Jan 20, 2022
8f266f1
config_format: fluentbit: do not abort on strrchr() failure
edsiper Jan 20, 2022
cd904a6
config_format: allow to reuse 'service' definition
edsiper Jan 20, 2022
9ef53f3
config_format: fluentbit: on exception, continue
edsiper Jan 20, 2022
38ab62e
tests: internal: config_format: allow 'service' section to be set twice
edsiper Jan 20, 2022
4e195de
config: expose new config_format context in main structure
edsiper Jan 21, 2022
c69ff13
bin: release config file optarg and always stop the context
edsiper Jan 21, 2022
f4565e3
lib: on stop, always double-check the child thread
edsiper Jan 21, 2022
4ce50b9
config: intialize config_format for parsers
edsiper Jan 21, 2022
6052bd5
parser: use new config_format api
edsiper Jan 21, 2022
b8ee70f
parser: decoder: use new config_format api
edsiper Jan 21, 2022
aa72707
config_format: new api to get section by name lookup
edsiper Jan 25, 2022
099fe44
upstream: ha: use new config format reader
edsiper Jan 25, 2022
cb343fd
config_format: dump api now handles groups information
edsiper Jan 26, 2022
883d6b4
config_format: fluentbit: expose new 'groups' feature
edsiper Jan 26, 2022
7275610
tests: internal: config_format: fluentbit: check groups handling
edsiper Jan 26, 2022
9a74474
config_format: yaml: add support for 'groups'
edsiper Jan 26, 2022
ab497b7
tests: config_format: yaml: test new 'groups' feature
edsiper Jan 26, 2022
0cf79cb
config_static: use new config_format API
edsiper Jan 26, 2022
a8c1c7c
config_format: fluentit: add support for static configs
edsiper Jan 26, 2022
54c0ae9
bin: add support for static config
edsiper Jan 26, 2022
ae4128a
parser: add support for static config
edsiper Jan 26, 2022
1f51b13
bin: do not overwrite context on static config
edsiper Jan 27, 2022
83c9fe7
config_format: improve handling of service section
edsiper Jan 27, 2022
d9eb54f
config_static: change function handler prototype
edsiper Jan 27, 2022
0748b73
config: change config format reference order
edsiper Jan 27, 2022
d8272e1
parser: fix override of config_format context on static mode
edsiper Jan 27, 2022
c5c3316
plugin: add support for config format
edsiper Jan 27, 2022
93db380
sp: add support for config format
edsiper Jan 27, 2022
bc04835
config_format: add support for environment variables
edsiper Jan 27, 2022
86c5417
bin: register config format env variables
edsiper Jan 27, 2022
f740718
tests: internal: data: config_format: add env var
edsiper Jan 27, 2022
b1098bf
config_format: yaml: add new 'pipeline' level for plugins
edsiper Jan 27, 2022
a42fbf1
config_format: fluentbit: fix cleanup
edsiper Jan 27, 2022
d11f943
tests: internal: config format: yaml: extend test case
edsiper Jan 27, 2022
6b649b6
tests: internal: config format: data: extend test case
edsiper Jan 27, 2022
d264785
tests: internal: fuzzers: add missing header
edsiper Jan 27, 2022
55a2c4e
config_format: fluentbit: fix missing parameters for windows
edsiper Jan 27, 2022
6352058
config_format: fluentbit: validate section before adding props
edsiper Jan 27, 2022
e421885
config_format: fluentbit: invalidate indent
edsiper Jan 27, 2022
541d206
config_format: validate incoming file path is not null
edsiper Jan 27, 2022
9e6f6cd
ra_key: reverse order of map lookup when extracting values
edsiper Jan 27, 2022
5bc1c08
tests: internal: ra: add unit test for lookup order
edsiper Jan 27, 2022
f81cf75
in_storage_backlog: do not abort if chunk cannot be processed
edsiper Jan 27, 2022
814fb6c
lib: chunkio: upgrade to v1.1.6
edsiper Jan 27, 2022
8634da5
pack: enhance memory allocation strategy for large JSON payloads
edsiper Feb 1, 2022
ed6627f
pack: ensure minimum allocation is 256 bytes (unit test)
edsiper Feb 1, 2022
4a42f39
file: add new utility module
tchrono Jan 31, 2022
712bab3
build: add new option -DFLB_NIGHTLY_BUILD=ABC to register custom vers…
edsiper Feb 1, 2022
52be6cd
info: add string helpers
edsiper Feb 1, 2022
c8c588b
bin: report nightly build info if found
edsiper Feb 1, 2022
7854d5f
bin: fix Copyright
edsiper Feb 1, 2022
2abb87b
doc: CONTRIBUTING: adjust copyright
edsiper Feb 1, 2022
7d4bd5d
core: update Copyright banners
edsiper Feb 2, 2022
000b41a
plugins: update Copyright banners
edsiper Feb 2, 2022
efc1b6a
config_format: yaml: move 'customs' lists to top level
edsiper Jan 30, 2022
a002ce4
config_format: yaml: add support for 'includes' and move 'customs'
edsiper Feb 1, 2022
f531111
tests: internal: config_format: extend test cases
edsiper Feb 1, 2022
0f89ee4
tests: internal: config_format: add classic config files
edsiper Feb 2, 2022
4ed71be
config_format: fluentbit: support windows backslash
edsiper Feb 2, 2022
5dd4ec0
config_format: yaml: support windows backslash
edsiper Feb 2, 2022
fae8308
workflows: bump azure/setup-helm from 1 to 2.0 (#4693)
dependabot[bot] Feb 2, 2022
07765bd
workflows: add scorecards analysis (#4721)
patrick-stephens Feb 2, 2022
62afb20
workflows: remove Azure action usage (#4739)
patrick-stephens Feb 2, 2022
f4558c0
dockerfiles: disable exec plugin for distroless containers (#4719)
patrick-stephens Feb 3, 2022
052b0cb
installation: add script to install in one liner (#4740)
patrick-stephens Feb 3, 2022
da69d01
workflows: bump ossf/scorecard-action from 1.0.2 to 1.0.3 (#4745)
dependabot[bot] Feb 4, 2022
995453f
in stdin: Initialize memory to 0
ptsneves Feb 7, 2022
90012aa
tests: runtime: out_file: add test cases
nokute78 Feb 5, 2022
e595d89
out_stackdriver: correct env variable for SAs (#4753)
ridwanmsharif Feb 8, 2022
69e74e8
lib: xxhash: upgrade to v0.8.1
edsiper Feb 7, 2022
0312790
output_thread: fix event loop destroy order
edsiper Feb 7, 2022
56e39a2
hash: add new API to check if hash exists
edsiper Feb 7, 2022
b7d7111
in_tail: performance improvement on management of file list
edsiper Feb 7, 2022
9c45b6e
in_tail: do not use st_dev on Windows
edsiper Feb 8, 2022
5224197
workflows: PR fork permission tweaks and other updates (#4767)
patrick-stephens Feb 9, 2022
4610d2f
packaging: resolve CentOS 8 mirror issues (#4772)
patrick-stephens Feb 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 0 additions & 34 deletions .github/containerscan/allowedlist.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/1.7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
with:
go-version: '1.16' # The Go version to download (if necessary) and use.

- uses: azure/setup-helm@v1
- uses: azure/setup-helm@v2.0
id: install

- run: go mod download
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/1.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
with:
go-version: '1.16' # The Go version to download (if necessary) and use.

- uses: azure/setup-helm@v1
- uses: azure/setup-helm@v2.0
id: install

- run: go mod download
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
| Label name | Description |
| :----------|-------------|
| docs-required| default tag used to request documentation, has to be removed before merge |
| ok-container-test | run all image tests |
| ci/container-test-ok | image tests pass |
| ok-to-test | run all integration tests |
| ok-to-merge | run mergebot and merge (rebase) current PR |
| ci/integration-docker-ok | integration test is able to build docker image |
Expand All @@ -31,6 +33,7 @@
* AWS_S3_BUCKET_STAGING
* AWS_S3_BUCKET_RELEASE
* GPG_PRIVATE_KEY
* GPG_PRIVATE_KEY_PASSPHRASE

These are only required for Cosign of the container images, will be skipped if not present:
* COSIGN_PUBLIC_KEY
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark-run-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
with:
go-version: '1.16' # The Go version to download (if necessary) and use.

- uses: azure/setup-helm@v1
- uses: azure/setup-helm@v2.0
id: install

- run: go mod download
Expand Down
180 changes: 14 additions & 166 deletions .github/workflows/call-build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,109 +35,15 @@ on:
description: If the Cosign key requires a password then specify here, otherwise not required.
required: false
jobs:
call-build-images-matrix:
name: ${{ matrix.arch }} container image stage to GHCR
runs-on: [ ubuntu-latest ]
environment: ${{ inputs.environment }}
strategy:
fail-fast: false
matrix:
arch: [ amd64, arm64, arm/v7 ]
include:
- arch: amd64
suffix: x86_64
- arch: arm/v7
suffix: arm32v7
- arch: arm64
suffix: arm64v8
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
password: ${{ secrets.token }}

- name: Extract metadata from Github
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ inputs.registry }}/${{ inputs.image }}
tags: |
raw,${{ matrix.suffix }}-${{ inputs.version }}
raw,${{ matrix.suffix }}-latest

- name: Build the ${{ matrix.suffix }} staging image
uses: docker/build-push-action@v2
with:
file: ./dockerfiles/Dockerfile.${{ matrix.suffix }}
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/${{ matrix.arch }}
push: true
load: false
build-args: |
FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v${{ inputs.version }}.tar.gz

call-build-images-debug:
name: Build the single-arch debug image
runs-on: [ ubuntu-latest ]
environment: ${{ inputs.environment }}
needs: call-build-images-matrix
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
password: ${{ secrets.token }}

- name: Extract metadata from Github
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ inputs.registry }}/${{ inputs.image }}
tags: |
raw,x86_64-${{ inputs.version }}-debug
raw,${{ inputs.version }}-debug
raw,latest-debug

- name: Build the debug staging image
uses: docker/build-push-action@v2
with:
file: ./dockerfiles/Dockerfile.x86_64-debug
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
push: true
load: false
build-args: |
FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v${{ inputs.version }}.tar.gz

call-build-images-multiarch:
name: Multiarch container images stage to GHCR
call-build-images:
name: Build container images to GHCR
runs-on: [ ubuntu-latest ]
environment: ${{ inputs.environment }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ inputs.version }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand All @@ -156,15 +62,15 @@ jobs:
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ inputs.registry }}/${{ inputs.image }}/multiarch
images: ${{ inputs.registry }}/${{ inputs.image }}
tags: |
raw,${{ inputs.version }}
raw,latest

- name: Build the multi-arch images
- name: Build the production images
uses: docker/build-push-action@v2
with:
file: ./dockerfiles/Dockerfile.multiarch
file: ./dockerfiles/Dockerfile
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -178,12 +84,12 @@ jobs:
- id: debug-meta
uses: docker/metadata-action@v3
with:
images: ${{ inputs.registry }}/${{ inputs.image }}/multiarch
images: ${{ inputs.registry }}/${{ inputs.image }}
tags: |
raw,${{ inputs.version }}-debug
raw,latest-debug

- name: Build the debug multi-arch images
- name: Build the debug images
uses: docker/build-push-action@v2
with:
file: ./dockerfiles/Dockerfile.multiarch
Expand All @@ -197,76 +103,22 @@ jobs:
build-args: |
FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v${{ inputs.version }}.tar.gz

- name: Multi-arch - run Trivy and Dockle scans
uses: azure/container-scan@v0
with:
image-name: ${{ inputs.registry }}/${{ inputs.image }}/multiarch:${{ inputs.version }}
username: ${{ inputs.username }}
password: ${{ secrets.token }}

call-build-images-scan:
name: Trivy + Dockle image scan
runs-on: [ ubuntu-latest ]
environment: ${{ inputs.environment }}
needs: call-build-images-matrix
strategy:
fail-fast: false
matrix:
suffix: [ x86_64, arm32v7, arm64v8 ]
needs: call-build-images
steps:
- name: Checkout code for ignore list
uses: actions/checkout@v2

- name: Single arch - run Trivy and Dockle scans
- name: Trivy and Dockle scans
uses: azure/container-scan@v0
with:
image-name: ${{ inputs.registry }}/${{ inputs.image }}:${{ matrix.suffix }}-${{ inputs.version }}
username: ${{ inputs.username }}
password: ${{ secrets.token }}

call-build-images-push-manifests:
name: Deploy multi-arch container image manifests
permissions:
contents: read
packages: write
runs-on: [ ubuntu-latest ]
environment: ${{ inputs.environment }}
needs: call-build-images-matrix
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
password: ${{ secrets.token }}

- name: Pull all the images
# Use platform to trigger warnings on invalid image metadata
run: |
docker pull --platform=linux/amd64 ${{ inputs.registry }}/${{ inputs.image }}:x86_64-${{ inputs.version }}
docker pull --platform=linux/arm64 ${{ inputs.registry }}/${{ inputs.image }}:arm64v8-${{ inputs.version }}
docker pull --platform=linux/arm/v7 ${{ inputs.registry }}/${{ inputs.image }}:arm32v7-${{ inputs.version }}

- name: Create manifests for images
run: |
docker manifest create ${{ inputs.registry }}/${{ inputs.image }}:${{ inputs.version }} \
--amend ${{ inputs.registry }}/${{ inputs.image }}:x86_64-${{ inputs.version }} \
--amend ${{ inputs.registry }}/${{ inputs.image }}:arm64v8-${{ inputs.version }} \
--amend ${{ inputs.registry }}/${{ inputs.image }}:arm32v7-${{ inputs.version }}

docker manifest create ${{ inputs.registry }}/${{ inputs.image }}:latest \
--amend ${{ inputs.registry }}/${{ inputs.image }}:x86_64-${{ inputs.version }} \
--amend ${{ inputs.registry }}/${{ inputs.image }}:arm64v8-${{ inputs.version }} \
--amend ${{ inputs.registry }}/${{ inputs.image }}:arm32v7-${{ inputs.version }}

docker manifest push --purge ${{ inputs.registry }}/${{ inputs.image }}:${{ inputs.version }}
docker manifest push --purge ${{ inputs.registry }}/${{ inputs.image }}:latest
env:
DOCKER_CLI_EXPERIMENTAL: enabled

call-build-images-sign:
name: Deploy and sign multi-arch container image manifests
permissions:
Expand All @@ -277,7 +129,7 @@ jobs:
id-token: write
runs-on: [ ubuntu-latest ]
environment: ${{ inputs.environment }}
needs: call-build-images-push-manifests
needs: call-build-images
steps:
- name: Install cosign
uses: sigstore/cosign-installer@main
Expand All @@ -295,9 +147,7 @@ jobs:
-a "ref=${{ github.sha }}" \
-a "release=${{ inputs.version }}" \
"${{ inputs.registry }}/${{ inputs.image }}:${{ inputs.version }}" \
"${{ inputs.registry }}/${{ inputs.image }}:latest" \
"${{ inputs.registry }}/${{ inputs.image }}/multiarch:${{ inputs.version }}" \
"${{ inputs.registry }}/${{ inputs.image }}/multiarch:latest"
"${{ inputs.registry }}/${{ inputs.image }}:latest"
shell: bash
# Ensure we move on to key-based signing as well
continue-on-error: true
Expand All @@ -316,9 +166,7 @@ jobs:
-a "ref=${{ github.sha }}" \
-a "release=${{ inputs.version }}" \
"${{ inputs.registry }}/${{ inputs.image }}:${{ inputs.version }}" \
"${{ inputs.registry }}/${{ inputs.image }}:latest" \
"${{ inputs.registry }}/${{ inputs.image }}/multiarch:${{ inputs.version }}" \
"${{ inputs.registry }}/${{ inputs.image }}/multiarch:latest"
"${{ inputs.registry }}/${{ inputs.image }}:latest"
rm -f /tmp/my_cosign.key
shell: bash
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/call-build-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ on:
gpg_private_key:
description: The GPG key to use for signing the packages.
required: false
gpg_private_key_passphrase:
description: The GPG key passphrase to use for signing the packages.
required: false

jobs:
call-build-packages:
Expand Down Expand Up @@ -160,6 +163,7 @@ jobs:
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.gpg_private_key }}
passphrase: ${{ secrets.gpg_private_key_passphrase }}

- name: Create repositories on staging now
# We sync down what we have for the release directories.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-test-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
uses: helm/[email protected]

- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v2.0
with:
version: v3.6.3

Expand Down
Loading