OSH-Images: Add fluentd image with systemd plugin

This adds a custom fluentd-kubernetes-daemonset image with the
systemd plugin for consuming logs for things like the kubelet
and docker directly from systemd.  This uses version 1.4.2 of the
image as the base

Change-Id: Icfad220fa7c243eab45cf5ece4244f75200a0812
This commit is contained in:
Steve Wilkerson 2019-05-22 10:36:00 -05:00
parent 872514b93f
commit add885b9a8
3 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,3 @@
FROM docker.io/fluent/fluentd-kubernetes-daemonset:v1.4.2-debian-elasticsearch-1.0
RUN gem install fluent-plugin-systemd -v 1.0.1

14
fluentd/build.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
SCRIPT=`realpath $0`
SCRIPT_DIR=`dirname ${SCRIPT}`
## Only build from main folder
cd ${SCRIPT_DIR}/..
IMAGE="fluentd"
VERSION=${VERSION:-latest}
DISTRO=${DISTRO:-debian}
REGISTRY_URI=${REGISTRY_URI:-"openstackhelm/"}
EXTRA_TAG_INFO=${EXTRA_TAG_INFO:-""}
docker build -f ${IMAGE}/Dockerfile.${DISTRO} --network=host -t ${REGISTRY_URI}${IMAGE}:${VERSION}-${DISTRO}${EXTRA_TAG_INFO} ${extra_build_args} ${IMAGE}
cd -

57
zuul.d/fluentd.yaml Normal file
View File

@ -0,0 +1,57 @@
---
# Copyright 2019 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- project:
check:
jobs:
- openstack-helm-images-build-fluentd
gate:
jobs:
- openstack-helm-images-upload-fluentd
promote:
jobs:
- openstack-helm-images-promote-fluentd
periodic:
jobs:
- openstack-helm-images-build-fluentd
- job:
name: openstack-helm-images-build-fluentd
parent: openstack-helm-images-build
description: Build fluentd image with custom plugins
vars: &fluentd_vars
docker_images:
- context: fluentd
repository: openstackhelm/fluentd
dockerfile: Dockerfile.debian
tags:
- latest-debian
files: &fluentd_files
- fluentd/.*
- zuul.d/fluentd.yaml
- job:
name: openstack-helm-images-upload-fluentd
parent: openstack-helm-images-upload
description: Build and upload fluentd image with additional plugins
vars: *fluentd_vars
files: *fluentd_files
- job:
name: openstack-helm-images-promote-fluentd
parent: openstack-helm-images-promote
description: Promote a previously published fluentd image to latest.
vars: *fluentd_vars
files: *fluentd_files