Skip to content

Commit 6c62cae

Browse files
authored
fix: update ubi, fix cve, update ruby (#106)
* chore: add manual workflow trigger * chore: add manual workflow trigger * Add message limit
1 parent b1c3f87 commit 6c62cae

File tree

8 files changed

+26
-19
lines changed

8 files changed

+26
-19
lines changed

.github/workflows/ci_build_test.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
uses: ruby/setup-ruby@v1
1818
with:
1919
bundler-cache: true
20-
ruby-version: 2.6
20+
ruby-version: 3.1
2121

2222
- name: Install dependencies
2323
run: |
2424
sudo ci_scripts/install_dep.sh
2525
2626
- name: Builder
2727
run: |
28-
rake build -t -v
28+
bundle exec rake build -t -v
2929
cp -R pkg /tmp
3030
3131
- name: Cache pkg
@@ -63,13 +63,13 @@ jobs:
6363
CI_SPLUNK_PORT: 8089
6464
CI_SPLUNK_USERNAME: admin
6565
CI_SPLUNK_HEC_TOKEN: a6b5e77f-d5f6-415a-bd43-930cecb12959
66-
CI_SPLUNK_PASSWORD: helloworld
66+
CI_SPLUNK_PASSWORD: changeme2
6767
CI_INDEX_EVENTS: ci_events
6868
CI_INDEX_OBJECTS: ci_objects
6969
CI_INDEX_METRICS: ci_metrics
7070
KUBERNETES_VERSION: v1.23.2
71-
MINIKUBE_VERSION: v1.24.0
72-
MINIKUBE_NODE_COUNTS: 2
71+
MINIKUBE_VERSION: latest
72+
MINIKUBE_NODE_COUNTS: 1
7373
GITHUB_ACTIONS: true
7474

7575
steps:
@@ -158,6 +158,8 @@ jobs:
158158
curl -X POST -u $CI_SPLUNK_USERNAME:$CI_SPLUNK_PASSWORD -k https://$CI_SPLUNK_HOST:$CI_SPLUNK_PORT/servicesNS/nobody/splunk_httpinput/data/inputs/http/http/enable
159159
# Create new HEC token
160160
curl -X POST -u $CI_SPLUNK_USERNAME:$CI_SPLUNK_PASSWORD -k -d "name=splunk_hec_token&token=a6b5e77f-d5f6-415a-bd43-930cecb12959&disabled=0&index=default-events&indexes=default-events,$CI_INDEX_METRICS,$CI_INDEX_OBJECTS,$CI_INDEX_EVENTS,ns-anno,pod-anno" https://$CI_SPLUNK_HOST:$CI_SPLUNK_PORT/servicesNS/nobody/splunk_httpinput/data/inputs/http
161+
# lower the limit to 50MiB. Higher limits throws error 'Search not executed XXXX'
162+
kubectl exec -it splunk -- bash -c 'echo -e "\n[diskUsage]\nminFreeSpace = 50" >> /opt/splunk/etc/system/local/server.conf'
161163
# Restart Splunk
162164
curl -k -u $CI_SPLUNK_USERNAME:$CI_SPLUNK_PASSWORD https://$CI_SPLUNK_HOST:$CI_SPLUNK_PORT/services/server/control/restart -X POST
163165

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ GEM
7676
http-cookie (>= 1.0.2, < 2.0)
7777
mime-types (>= 1.16, < 4.0)
7878
netrc (~> 0.8)
79-
rexml (3.2.5)
79+
rexml (3.2.6)
8080
serverengine (2.3.0)
8181
sigdump (~> 0.2.2)
8282
sigdump (0.2.4)

ci_scripts/deploy_connector.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ kubectl get pod
3131
# metric and logging deamon set for each node + aggr + object + splunk
3232
PODS=$((MINIKUBE_NODE_COUNTS*2+2+1))
3333
until kubectl get pod | grep Running | [[ $(wc -l) == $PODS ]]; do
34-
sleep 1;
34+
kubectl get pod
35+
sleep 2;
3536
done

ci_scripts/install_dep.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
set -e
2+
sudo gem update --system
33
gem install bundler
44
bundle update --bundler
55
bundle install

ci_scripts/k8s-splunk.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ spec:
2626
- name: SPLUNK_USER
2727
value: root
2828
- name: SPLUNK_PASSWORD
29-
value: helloworld
29+
value: changeme2
3030
- name: SPLUNK_LAUNCH_CONF
31-
value: OPTIMISTIC_ABOUT_FILE_LOCKING=1
31+
value: OPTIMISTIC_ABOUT_FILE_LOCKING=1

docker/Dockerfile

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.7.4-buster as builder
1+
FROM ruby:3.1.4-buster as builder
22

33
ADD ./ /app/
44
WORKDIR /app
@@ -8,7 +8,7 @@ RUN bundle install
88

99
RUN bundle exec rake build -t -v
1010

11-
FROM registry.access.redhat.com/ubi8/ruby-27
11+
FROM registry.access.redhat.com/ubi9/ruby-31
1212

1313
ARG VERSION
1414

@@ -33,8 +33,6 @@ COPY --from=builder /app/LICENSE /licenses/LICENSE
3333
RUN dnf install -y jq
3434

3535
COPY --from=builder /app/docker/Gemfile* ./
36-
RUN gem update date cgi
37-
RUN rm -f /usr/share/gems/specifications/default/cgi-0.1.0.gemspec /usr/share/gems/specifications/default/date-3.0.0.gemspec
3836
RUN yum update -y \
3937
&& yum remove -y nodejs npm \
4038
&& gem install bundler \

docker/Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ gem 'bigdecimal', '>= 2.0.0'
1313
gem 'kubeclient', git: 'https://github.com/splunk/kubeclient.git', ref: '955ec5b'
1414
gem 'http_parser.rb', '>= 0.5.3'
1515
gem 'rack', '>= 3.0.0'
16+
gem 'cgi', '~> 0.3.6'
17+
gem 'date', '~> 3.3.3'
1618

1719
gem "fluent-plugin-splunk-hec", "= 1.3.2"
1820

docker/Gemfile.lock

+9-5
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ PATH
2020
GEM
2121
remote: https://rubygems.org/
2222
specs:
23-
activemodel (7.0.4.3)
24-
activesupport (= 7.0.4.3)
25-
activesupport (7.0.4.3)
23+
activemodel (7.0.7.2)
24+
activesupport (= 7.0.7.2)
25+
activesupport (7.0.7.2)
2626
concurrent-ruby (~> 1.0, >= 1.0.2)
2727
i18n (>= 1.6, < 2)
2828
minitest (>= 5.1)
@@ -33,9 +33,11 @@ GEM
3333
attr_required (1.0.1)
3434
bigdecimal (3.0.2)
3535
bindata (2.4.14)
36+
cgi (0.3.6)
3637
concurrent-ruby (1.1.10)
3738
connection_pool (2.3.0)
3839
cool.io (1.7.1)
40+
date (3.3.3)
3941
domain_name (0.5.20190701)
4042
unf (>= 0.0.5, < 1.0.0)
4143
faraday (2.7.1)
@@ -123,7 +125,7 @@ GEM
123125
webfinger (>= 1.0.1)
124126
prometheus-client (4.0.0)
125127
public_suffix (4.0.7)
126-
rack (3.0.6.1)
128+
rack (3.0.8)
127129
rack-oauth2 (1.21.3)
128130
activesupport
129131
attr_required
@@ -172,6 +174,8 @@ PLATFORMS
172174

173175
DEPENDENCIES
174176
bigdecimal (>= 2.0.0)
177+
cgi (~> 0.3.6)
178+
date (~> 3.3.3)
175179
fluent-plugin-jq (= 0.5.1)
176180
fluent-plugin-kubernetes-objects!
177181
fluent-plugin-prometheus (>= 2.0)
@@ -185,4 +189,4 @@ DEPENDENCIES
185189
rack (>= 3.0.0)
186190

187191
BUNDLED WITH
188-
2.1.4
192+
2.3.11

0 commit comments

Comments
 (0)