Skip to content
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
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# start based on a centos image
FROM rhel7
# start based on a rhel image using a specific minor version.
FROM rhel7.4

ENV HOME=/opt/app-root/src \
PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \
RUBY_VERSION=2.0 \
PATH=/opt/rh/rh-ruby22/root/usr/bin:/opt/app-root/src/bin:/opt/app-root/bin${PATH:+:${PATH}} \
LD_LIBRARY_PATH=/opt/rh/rh-ruby22/root/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} \
MANPATH=/opt/rh/rh-ruby22/root/usr/share/man:$MANPATH \
PKG_CONFIG_PATH=/opt/rh/rh-ruby22/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} \
XDG_DATA_DIRS=/opt/rh/rh-ruby22/root/usr/share${XDG_DATA_DIRS:+:${XDG_DATA_DIRS}} \
RUBY_VERSION=2.2 \
FLUENTD_VERSION=0.12.32 \
GEM_HOME=/opt/app-root/src \
DATA_VERSION=1.6.0 \
Expand Down Expand Up @@ -31,8 +35,9 @@ LABEL io.k8s.description="Fluentd container for collecting logs from other fluen
# bc for calculations in run.conf
RUN yum install -y --disablerepo=\* --enablerepo=rhel-7-server-rpms --enablerepo=rhel-server-rhscl-7-rpms --enablerepo=rhel-7-server-optional-rpms --setopt=tsflags=nodocs \
gcc-c++ \
ruby \
ruby-devel \
rh-ruby22 \
rh-ruby22-rubygems \
rh-ruby22-ruby-devel \
libcurl-devel \
make \
bc \
Expand Down
20 changes: 20 additions & 0 deletions fluentd-forwarder-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,20 @@ objects:
port ${TARGET_PORT}
${ADDITIONAL_OPTS}
</match>
- apiVersion: extensions/v1beta1
kind: HorizontalPodAutoscaler
metadata:
name: fluentd-forwarder
spec:
scaleRef:
kind: DeploymentConfig
name: fluentd-forwarder
apiVersion: v1
subresource: scale
minReplicas: 1
maxReplicas: ${P_AUTOSCALE_MAX_PODS}
CPUUtilization:
targetPercentage: ${P_AUTOSCALE_TARGET_CPU}
parameters:
- name: P_NAMESPACE
description: Target namespace for image. Used to reference the ImageStream source for the image.
Expand Down Expand Up @@ -182,3 +196,9 @@ parameters:
- name: P_KEY_PATH
description: Path to the key that should be used for the server PKI. Defaults the the path outlined for secret mount.
value: /secrets/tls.key
- name: P_AUTOSCALE_MAX_PODS
description: Maximum number of pods that fluentd-forwarder should scale up to.
value: "4"
- name: P_AUTOSCALE_TARGET_CPU
description: Target CPU Utilization for the HPA.
value: "80"