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

feat: Add kubernetes daemonsets for fluentd 1.17 #36618

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
127 changes: 127 additions & 0 deletions ruby3.1-fluentd-kubernetes-daemonset-1.17.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
package:
# fluentd supported versions: https://github.com/fluent/fluentd/blob/master/SECURITY.md
# The kubernetes daemonset trails fluentd releases by a bit
name: ruby3.1-fluentd-kubernetes-daemonset-1.17
version: 1.17.1.1.2
epoch: 0
description: Fluentd ${{vars.fluentdMM}} daemonset for Kubernetes
copyright:
- license: Apache-2.0

environment:
contents:
packages:
- autoconf
- automake
- bash
- build-base
- busybox
- ca-certificates-bundle
- libtool
- m4
- ruby${{vars.rubyMM}}-bundler
- ruby-${{vars.rubyMM}}-dev
- snappy-dev

var-transforms:
- from: ${{package.name}}
match: .*-(\d+\.\d+)
replace: $1
to: fluentdMM
- from: ${{package.name}}
match: ^ruby(\d\.\d+)-.*
replace: $1
to: rubyMM
- from: ${{package.version}}
match: ^(\d+\.\d+\.\d+)\.(\d+\.\d+)
replace: $1-$2
to: mangled-package-version

data:
- name: plugins
items:
kinesis:

pipeline:
- uses: git-checkout
with:
expected-commit: 6183f108748bc4ed980437d6f93cf5f990e33b36
repository: https://github.com/fluent/fluentd-kubernetes-daemonset.git
tag: v${{vars.mangled-package-version}}

subpackages:
- range: plugins
name: ${{package.name}}-${{range.key}}
description: Fluentd kubernetes daemonset for ${{range.key}}
options:
no-depends: true
no-provides: true
dependencies:
runtime:
- ca-certificates
- ruby-${{vars.rubyMM}}
- tini
pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# Install bundle
mkdir -p ${{targets.contextdir}}/fluentd/vendor/bundle
bundle config silence_root_warning true
bundle config set path ${{targets.contextdir}}/fluentd/vendor/bundle
bundle config set clean 'true'
bundle config set deployment 'true'
# --retry doesn't seem to help with network issues, completely rerun the command
if ! bundle install --gemfile ./Gemfile --jobs $(nproc); then
bundle install --gemfile ./Gemfile --jobs $(nproc)
fi
bundle config unset path

# Copy gemfile
mkdir -p ${{targets.contextdir}}/fluentd
cp ./Gemfile ${{targets.contextdir}}/fluentd/Gemfile

# Copy configuration
mkdir -p ${{targets.contextdir}}/fluentd/etc
cp -r ./conf/* ${{targets.contextdir}}/fluentd/etc
touch ${{targets.contextdir}}/fluentd/etc/disable.conf

# Create log directory
mkdir -p ${{targets.contextdir}}/fluentd/log

# Copy plugins
mkdir -p ${{targets.contextdir}}/fluentd/plugins
cp -r ./plugins/* ${{targets.contextdir}}/fluentd/plugins

# Copy entrypoint
cp entrypoint.sh ${{targets.contextdir}}/fluentd/entrypoint.sh
test:
environment:
environment:
FLUENTD_CONF: "fluent.conf"
FLUENTD_DISABLE_BUNDLER_INJECTION: 1
KUBERNETES_SERVICE_HOST: "127.0.0.1"
KUBERNETES_SERVICE_PORT: 32764
pipeline:
- uses: test/kwok/cluster
# Just make sure the config is okay, kwok doesn't get us very far
- uses: test/daemon-check-output
with:
start: |
sh -c "
export GEM_PATH="/fluentd/vendor/bundle/ruby/$(basename $(gem env home))"
export GEM_HOME="/fluentd/vendor/bundle/ruby/$(basename $(gem env home))"
/fluentd/vendor/bundle/ruby/$(basename $(gem env home))/bin/fluentd -c /fluentd/etc/${FLUENTD_CONF} -p /fluentd/plugins --gemfile /fluentd/Gemfile
"
timeout: 10
expected_output: parsing config file is succeeded

update:
enabled: true
version-transform:
- match: '_'
replace: '.'
github:
identifier: fluent/fluentd-kubernetes-daemonset
strip-prefix: v
tag-filter: v1.17.
use-tag: true
127 changes: 127 additions & 0 deletions ruby3.2-fluentd-kubernetes-daemonset-1.17.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
package:
# fluentd supported versions: https://github.com/fluent/fluentd/blob/master/SECURITY.md
# The kubernetes daemonset trails fluentd releases by a bit
name: ruby3.2-fluentd-kubernetes-daemonset-1.17
version: 1.17.1.1.2
epoch: 0
description: Fluentd ${{vars.fluentdMM}} daemonset for Kubernetes
copyright:
- license: Apache-2.0

environment:
contents:
packages:
- autoconf
- automake
- bash
- build-base
- busybox
- ca-certificates-bundle
- libtool
- m4
- ruby${{vars.rubyMM}}-bundler
- ruby-${{vars.rubyMM}}-dev
- snappy-dev

var-transforms:
- from: ${{package.name}}
match: .*-(\d+\.\d+)
replace: $1
to: fluentdMM
- from: ${{package.name}}
match: ^ruby(\d\.\d+)-.*
replace: $1
to: rubyMM
- from: ${{package.version}}
match: ^(\d+\.\d+\.\d+)\.(\d+\.\d+)
replace: $1-$2
to: mangled-package-version

data:
- name: plugins
items:
kinesis:

pipeline:
- uses: git-checkout
with:
expected-commit: 6183f108748bc4ed980437d6f93cf5f990e33b36
repository: https://github.com/fluent/fluentd-kubernetes-daemonset.git
tag: v${{vars.mangled-package-version}}

subpackages:
- range: plugins
name: ${{package.name}}-${{range.key}}
description: Fluentd kubernetes daemonset for ${{range.key}}
options:
no-depends: true
no-provides: true
dependencies:
runtime:
- ca-certificates
- ruby-${{vars.rubyMM}}
- tini
pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# Install bundle
mkdir -p ${{targets.contextdir}}/fluentd/vendor/bundle
bundle config silence_root_warning true
bundle config set path ${{targets.contextdir}}/fluentd/vendor/bundle
bundle config set clean 'true'
bundle config set deployment 'true'
# --retry doesn't seem to help with network issues, completely rerun the command
if ! bundle install --gemfile ./Gemfile --jobs $(nproc); then
bundle install --gemfile ./Gemfile --jobs $(nproc)
fi
bundle config unset path

# Copy gemfile
mkdir -p ${{targets.contextdir}}/fluentd
cp ./Gemfile ${{targets.contextdir}}/fluentd/Gemfile

# Copy configuration
mkdir -p ${{targets.contextdir}}/fluentd/etc
cp -r ./conf/* ${{targets.contextdir}}/fluentd/etc
touch ${{targets.contextdir}}/fluentd/etc/disable.conf

# Create log directory
mkdir -p ${{targets.contextdir}}/fluentd/log

# Copy plugins
mkdir -p ${{targets.contextdir}}/fluentd/plugins
cp -r ./plugins/* ${{targets.contextdir}}/fluentd/plugins

# Copy entrypoint
cp entrypoint.sh ${{targets.contextdir}}/fluentd/entrypoint.sh
test:
environment:
environment:
FLUENTD_CONF: "fluent.conf"
FLUENTD_DISABLE_BUNDLER_INJECTION: 1
KUBERNETES_SERVICE_HOST: "127.0.0.1"
KUBERNETES_SERVICE_PORT: 32764
pipeline:
- uses: test/kwok/cluster
# Just make sure the config is okay, kwok doesn't get us very far
- uses: test/daemon-check-output
with:
start: |
sh -c "
export GEM_PATH="/fluentd/vendor/bundle/ruby/$(basename $(gem env home))"
export GEM_HOME="/fluentd/vendor/bundle/ruby/$(basename $(gem env home))"
/fluentd/vendor/bundle/ruby/$(basename $(gem env home))/bin/fluentd -c /fluentd/etc/${FLUENTD_CONF} -p /fluentd/plugins --gemfile /fluentd/Gemfile
"
timeout: 10
expected_output: parsing config file is succeeded

update:
enabled: true
version-transform:
- match: '_'
replace: '.'
github:
identifier: fluent/fluentd-kubernetes-daemonset
strip-prefix: v
tag-filter: v1.17.
use-tag: true
127 changes: 127 additions & 0 deletions ruby3.3-fluentd-kubernetes-daemonset-1.17.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
package:
# fluentd supported versions: https://github.com/fluent/fluentd/blob/master/SECURITY.md
# The kubernetes daemonset trails fluentd releases by a bit
name: ruby3.3-fluentd-kubernetes-daemonset-1.17
version: 1.17.1.1.2
epoch: 0
description: Fluentd ${{vars.fluentdMM}} daemonset for Kubernetes
copyright:
- license: Apache-2.0

environment:
contents:
packages:
- autoconf
- automake
- bash
- build-base
- busybox
- ca-certificates-bundle
- libtool
- m4
- ruby${{vars.rubyMM}}-bundler
- ruby-${{vars.rubyMM}}-dev
- snappy-dev

var-transforms:
- from: ${{package.name}}
match: .*-(\d+\.\d+)
replace: $1
to: fluentdMM
- from: ${{package.name}}
match: ^ruby(\d\.\d+)-.*
replace: $1
to: rubyMM
- from: ${{package.version}}
match: ^(\d+\.\d+\.\d+)\.(\d+\.\d+)
replace: $1-$2
to: mangled-package-version

data:
- name: plugins
items:
kinesis:

pipeline:
- uses: git-checkout
with:
expected-commit: 6183f108748bc4ed980437d6f93cf5f990e33b36
repository: https://github.com/fluent/fluentd-kubernetes-daemonset.git
tag: v${{vars.mangled-package-version}}

subpackages:
- range: plugins
name: ${{package.name}}-${{range.key}}
description: Fluentd kubernetes daemonset for ${{range.key}}
options:
no-depends: true
no-provides: true
dependencies:
runtime:
- ca-certificates
- ruby-${{vars.rubyMM}}
- tini
pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# Install bundle
mkdir -p ${{targets.contextdir}}/fluentd/vendor/bundle
bundle config silence_root_warning true
bundle config set path ${{targets.contextdir}}/fluentd/vendor/bundle
bundle config set clean 'true'
bundle config set deployment 'true'
# --retry doesn't seem to help with network issues, completely rerun the command
if ! bundle install --gemfile ./Gemfile --jobs $(nproc); then
bundle install --gemfile ./Gemfile --jobs $(nproc)
fi
bundle config unset path

# Copy gemfile
mkdir -p ${{targets.contextdir}}/fluentd
cp ./Gemfile ${{targets.contextdir}}/fluentd/Gemfile

# Copy configuration
mkdir -p ${{targets.contextdir}}/fluentd/etc
cp -r ./conf/* ${{targets.contextdir}}/fluentd/etc
touch ${{targets.contextdir}}/fluentd/etc/disable.conf

# Create log directory
mkdir -p ${{targets.contextdir}}/fluentd/log

# Copy plugins
mkdir -p ${{targets.contextdir}}/fluentd/plugins
cp -r ./plugins/* ${{targets.contextdir}}/fluentd/plugins

# Copy entrypoint
cp entrypoint.sh ${{targets.contextdir}}/fluentd/entrypoint.sh
test:
environment:
environment:
FLUENTD_CONF: "fluent.conf"
FLUENTD_DISABLE_BUNDLER_INJECTION: 1
KUBERNETES_SERVICE_HOST: "127.0.0.1"
KUBERNETES_SERVICE_PORT: 32764
pipeline:
- uses: test/kwok/cluster
# Just make sure the config is okay, kwok doesn't get us very far
- uses: test/daemon-check-output
with:
start: |
sh -c "
export GEM_PATH="/fluentd/vendor/bundle/ruby/$(basename $(gem env home))"
export GEM_HOME="/fluentd/vendor/bundle/ruby/$(basename $(gem env home))"
/fluentd/vendor/bundle/ruby/$(basename $(gem env home))/bin/fluentd -c /fluentd/etc/${FLUENTD_CONF} -p /fluentd/plugins --gemfile /fluentd/Gemfile
"
timeout: 10
expected_output: parsing config file is succeeded

update:
enabled: true
version-transform:
- match: '_'
replace: '.'
github:
identifier: fluent/fluentd-kubernetes-daemonset
strip-prefix: v
tag-filter: v1.17.
use-tag: true
Loading
Loading