Skip to content

Commit 860c58e

Browse files
authored
fix: update ubi, fix cve, update ruby (#282)
* fix: update ubi, fix cve, update ruby
1 parent 8f94144 commit 860c58e

File tree

8 files changed

+57
-52
lines changed

8 files changed

+57
-52
lines changed

.github/workflows/ci_build_test.yaml

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

2222
- name: Install dependencies
2323
run: |
@@ -63,12 +63,12 @@ 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
71+
MINIKUBE_VERSION: latest
7272
MINIKUBE_NODE_COUNTS: 2
7373
GITHUB_ACTIONS: true
7474

@@ -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

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.4
1+
3.1.3

Gemfile.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ PATH
1313
GEM
1414
remote: https://rubygems.org/
1515
specs:
16-
activemodel (7.0.4.3)
17-
activesupport (= 7.0.4.3)
18-
activesupport (7.0.4.3)
16+
activemodel (7.0.7.2)
17+
activesupport (= 7.0.7.2)
18+
activesupport (7.0.7.2)
1919
concurrent-ruby (~> 1.0, >= 1.0.2)
2020
i18n (>= 1.6, < 2)
2121
minitest (>= 5.1)
@@ -89,15 +89,15 @@ GEM
8989
power_assert (2.0.1)
9090
prometheus-client (4.0.0)
9191
public_suffix (4.0.6)
92-
rack (3.0.6.1)
92+
rack (3.0.8)
9393
rack-oauth2 (1.21.2)
9494
activesupport
9595
attr_required
9696
httpclient
9797
json-jwt (>= 1.11.0)
9898
rack (>= 2.1.0)
9999
rake (13.0.6)
100-
rexml (3.2.5)
100+
rexml (3.2.6)
101101
ruby2_keywords (0.0.5)
102102
serverengine (2.3.0)
103103
sigdump (~> 0.2.2)

ci_scripts/deploy_connector.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ helm install ci-sck --set global.splunk.hec.token=$CI_SPLUNK_HEC_TOKEN \
2323
--set splunk-kubernetes-logging.image.tag=recent \
2424
--set splunk-kubernetes-logging.image.pullPolicy=IfNotPresent \
2525
-f ci_scripts/sck_values.yml helm-chart/splunk-connect-for-kubernetes
26-
26+
# kubectl get pod | grep "ci-sck-splunk-kubernetes-logging" | awk 'NR==1{print $1}
2727
kubectl get pod
2828
# wait for deployment to finish
2929
# metric and logging deamon set for each node + aggr + object + splunk
3030
PODS=$((MINIKUBE_NODE_COUNTS*2+2+1))
3131
until kubectl get pod | grep Running | [[ $(wc -l) == $PODS ]]; do
32-
sleep 1;
32+
kubectl get pod
33+
sleep 2;
3334
done

ci_scripts/k8s-splunk.yml

+1-1
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
3131
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

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
33
# This is separate gemfile for building docker image that has all plugins
44
# for kubernetes log collection agent
55
# List all required gems here and install via bundler to resolve dependencies
6-
gem "fluentd", ">=1.15"
6+
gem "fluentd", "=1.15.3"
77
gem "fluent-plugin-systemd", "=1.0.2"
88
gem "fluent-plugin-concat", "=2.4.0"
99
gem "fluent-plugin-prometheus", "=2.0.2"
@@ -14,13 +14,14 @@ gem "oj", ">=3.11.2"
1414
gem 'multi_json', '~> 1.13'
1515
gem 'net-http-persistent', '~> 4.0'
1616
gem 'openid_connect', '~> 1.1.8'
17-
gem 'prometheus-client', '>= 2.1.0'
18-
gem 'activesupport', '~> 5.2.4.3'
17+
gem 'prometheus-client', '=2.1.0'
1918
gem 'http_parser.rb', '=0.8.0'
2019
gem "rack", ">=3.0.0"
2120
gem "fluent-plugin-record-modifier", ">=2.1"
2221
gem 'json-jwt', '~> 1.15.0'
2322
gem 'rack-oauth2', '~> 1.19'
23+
gem 'cgi', '~> 0.3.6'
24+
gem 'date', '~> 3.3.3'
2425

2526

2627
gem 'fluent-plugin-splunk-hec', path: 'gem/'

docker/Gemfile.lock

+36-33
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,23 @@ PATH
2424
GEM
2525
remote: https://rubygems.org/
2626
specs:
27-
activemodel (5.2.4.6)
28-
activesupport (= 5.2.4.6)
29-
activesupport (5.2.4.6)
27+
activemodel (7.0.7.2)
28+
activesupport (= 7.0.7.2)
29+
activesupport (7.0.7.2)
3030
concurrent-ruby (~> 1.0, >= 1.0.2)
31-
i18n (>= 0.7, < 2)
32-
minitest (~> 5.1)
33-
tzinfo (~> 1.1)
34-
addressable (2.8.0)
35-
public_suffix (>= 2.0.2, < 5.0)
31+
i18n (>= 1.6, < 2)
32+
minitest (>= 5.1)
33+
tzinfo (~> 2.0)
34+
addressable (2.8.5)
35+
public_suffix (>= 2.0.2, < 6.0)
3636
aes_key_wrap (1.1.0)
3737
attr_required (1.0.1)
38-
bindata (2.4.14)
39-
concurrent-ruby (1.1.9)
40-
connection_pool (2.2.5)
41-
cool.io (1.7.1)
38+
bindata (2.4.15)
39+
cgi (0.3.6)
40+
concurrent-ruby (1.2.2)
41+
connection_pool (2.4.1)
42+
cool.io (1.8.0)
43+
date (3.3.3)
4244
domain_name (0.5.20190701)
4345
unf (>= 0.0.5, < 1.0.0)
4446
ffi (1.15.5)
@@ -80,36 +82,36 @@ GEM
8082
http-form_data (~> 2.2)
8183
http-parser (~> 1.2.0)
8284
http-accept (1.7.0)
83-
http-cookie (1.0.4)
85+
http-cookie (1.0.5)
8486
domain_name (~> 0.5)
8587
http-form_data (2.3.0)
8688
http-parser (1.2.3)
8789
ffi-compiler (>= 1.0, < 2.0)
8890
http_parser.rb (0.8.0)
8991
httpclient (2.8.3)
90-
i18n (1.9.1)
92+
i18n (1.14.1)
9193
concurrent-ruby (~> 1.0)
9294
json-jwt (1.15.3)
9395
activesupport (>= 4.2)
9496
aes_key_wrap
9597
bindata
9698
httpclient
97-
jsonpath (1.1.0)
99+
jsonpath (1.1.3)
98100
multi_json
99101
lru_redux (1.1.0)
100102
mail (2.7.1)
101103
mini_mime (>= 0.1.1)
102104
mime-types (3.4.1)
103105
mime-types-data (~> 3.2015)
104-
mime-types-data (3.2022.0105)
105-
mini_mime (1.1.2)
106-
minitest (5.15.0)
107-
msgpack (1.6.0)
106+
mime-types-data (3.2023.0808)
107+
mini_mime (1.1.5)
108+
minitest (5.19.0)
109+
msgpack (1.7.2)
108110
multi_json (1.15.0)
109-
net-http-persistent (4.0.0)
111+
net-http-persistent (4.0.2)
110112
connection_pool (~> 2.2)
111113
netrc (0.11.0)
112-
oj (3.11.2)
114+
oj (3.16.0)
113115
openid_connect (1.1.8)
114116
activemodel
115117
attr_required (>= 1.0.0)
@@ -121,9 +123,9 @@ GEM
121123
validate_url
122124
webfinger (>= 1.0.1)
123125
prometheus-client (2.1.0)
124-
public_suffix (4.0.6)
125-
rack (3.0.1)
126-
rack-oauth2 (1.19.0)
126+
public_suffix (5.0.3)
127+
rack (3.0.8)
128+
rack-oauth2 (1.21.3)
127129
activesupport
128130
attr_required
129131
httpclient
@@ -146,18 +148,18 @@ GEM
146148
httpclient (>= 2.4)
147149
systemd-journal (1.3.3)
148150
ffi (~> 1.9)
149-
thread_safe (0.3.6)
150-
tzinfo (1.2.10)
151-
thread_safe (~> 0.1)
152-
tzinfo-data (1.2022.6)
151+
timeout (0.4.0)
152+
tzinfo (2.0.6)
153+
concurrent-ruby (~> 1.0)
154+
tzinfo-data (1.2023.3)
153155
tzinfo (>= 1.0.0)
154156
unf (0.1.4)
155157
unf_ext
156-
unf_ext (0.0.8)
158+
unf_ext (0.0.8.2)
157159
validate_email (0.1.6)
158160
activemodel (>= 3.0)
159161
mail (>= 2.2.5)
160-
validate_url (1.0.13)
162+
validate_url (1.0.15)
161163
activemodel (>= 3.0.0)
162164
public_suffix
163165
webfinger (1.2.0)
@@ -170,23 +172,24 @@ PLATFORMS
170172
ruby
171173

172174
DEPENDENCIES
173-
activesupport (~> 5.2.4.3)
175+
cgi (~> 0.3.6)
176+
date (~> 3.3.3)
174177
fluent-plugin-concat (= 2.4.0)
175178
fluent-plugin-jq (= 0.5.1)
176179
fluent-plugin-kubernetes_metadata_filter (~> 3.1)
177180
fluent-plugin-prometheus (= 2.0.2)
178181
fluent-plugin-record-modifier (>= 2.1)
179182
fluent-plugin-splunk-hec!
180183
fluent-plugin-systemd (= 1.0.2)
181-
fluentd (>= 1.15)
184+
fluentd (= 1.15.3)
182185
http_parser.rb (= 0.8.0)
183186
json-jwt (~> 1.15.0)
184187
kubeclient!
185188
multi_json (~> 1.13)
186189
net-http-persistent (~> 4.0)
187190
oj (>= 3.11.2)
188191
openid_connect (~> 1.1.8)
189-
prometheus-client (>= 2.1.0)
192+
prometheus-client (= 2.1.0)
190193
rack (>= 3.0.0)
191194
rack-oauth2 (~> 1.19)
192195

0 commit comments

Comments
 (0)