Skip to content

Commit 3002395

Browse files
committed
feat: integrate into e2e tests
Signed-off-by: Bence Csati <[email protected]>
1 parent ae9d1c4 commit 3002395

File tree

9 files changed

+53
-7
lines changed

9 files changed

+53
-7
lines changed

.github/workflows/e2e.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
context: images/syslog-ng-reloader
3838
tags: syslog-ng-reloader:local
3939
output: syslog-ng-reloader.tar
40+
- image: fluentd-drain-watch
41+
context: images/fluentd-drain-watch
42+
tags: fluentd-drain-watch:local
43+
output: fluentd-drain-watch.tar
4044

4145
steps:
4246
- name: Checkout
@@ -91,6 +95,7 @@ jobs:
9195
docker load --input /tmp/fluentd-full.tar
9296
docker load --input /tmp/config-reloader.tar
9397
docker load --input /tmp/syslog-ng-reloader.tar
98+
docker load --input /tmp/fluentd-drain-watch.tar
9499
docker load --input /tmp/controller.tar
95100
docker image ls -a
96101
@@ -149,6 +154,7 @@ jobs:
149154
docker load --input /tmp/fluentd-full.tar
150155
docker load --input /tmp/config-reloader.tar
151156
docker load --input /tmp/syslog-ng-reloader.tar
157+
docker load --input /tmp/fluentd-drain-watch.tar
152158
docker load --input /tmp/controller.tar
153159
docker image ls -a
154160

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ test-e2e-nodeps:
232232
LOGGING_OPERATOR_IMAGE="${OPERATOR_IMG}" \
233233
CONFIG_RELOADER_IMAGE="${CONFIG_RELOADER_IMG}" \
234234
SYSLOG_NG_RELOADER_IMAGE="${SYSLOG_NG_RELOADER_IMG}" \
235+
FLUENTD_DRAIN_WATCH_IMAGE="${FLUENTD_DRAIN_WATCH_IMG}" \
235236
FLUENTD_IMAGE="${FLUENTD_IMG}" \
236237
KIND_PATH="$(KIND)" \
237238
KIND_IMAGE="$(KIND_IMAGE)" \

e2e/common/helpers.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ import (
3434
)
3535

3636
const (
37-
FluentdImageRepo = "fluentd-full"
38-
FluentdImageTag = "local"
39-
ConfigReloaderRepo = "config-reloader"
40-
ConfigReloaderTag = "local"
41-
SyslogNGReloaderRepo = "syslog-ng-reloader"
42-
SyslogNGReloaderTag = "local"
37+
FluentdImageRepo = "fluentd-full"
38+
FluentdImageTag = "local"
39+
ConfigReloaderRepo = "config-reloader"
40+
ConfigReloaderTag = "local"
41+
SyslogNGReloaderRepo = "syslog-ng-reloader"
42+
SyslogNGReloaderTag = "local"
43+
FluentdDrainWatchRepo = "fluentd-drain-watch"
44+
FluentdDrainWatchTag = "local"
4345
)
4446

4547
var sequence uint32

e2e/common/setup/loggingoperator.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ var (
4646
repository: "syslogng-reload",
4747
tag: "local",
4848
},
49+
{
50+
lookupEnv: "FLUENTD_DRAIN_WATCH_IMAGE",
51+
repository: "fluentd-drain-watch",
52+
tag: "local",
53+
},
4954
{
5055
lookupEnv: "FLUENTD_IMAGE",
5156
repository: "fluentd-full",

e2e/fluentd-aggregator-detached-multiple-failures/fluentd_aggregator_detached_multiple_failures_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ func TestFluentdAggregator_detached_multiple_failure(t *testing.T) {
124124
Replicas: 1,
125125
Drain: v1beta1.FluentdDrainConfig{
126126
Enabled: true,
127+
Image: v1beta1.ImageSpec{
128+
Repository: common.FluentdDrainWatchRepo,
129+
Tag: common.FluentdDrainWatchTag,
130+
},
127131
},
128132
},
129133
Workers: 2,
@@ -160,6 +164,10 @@ func TestFluentdAggregator_detached_multiple_failure(t *testing.T) {
160164
Replicas: 1,
161165
Drain: v1beta1.FluentdDrainConfig{
162166
Enabled: true,
167+
Image: v1beta1.ImageSpec{
168+
Repository: common.FluentdDrainWatchRepo,
169+
Tag: common.FluentdDrainWatchTag,
170+
},
163171
},
164172
},
165173
Workers: 2,

e2e/fluentd-aggregator-detached/fluentd_aggregator_detached_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ func TestFluentdAggregator_detached_MultiWorker(t *testing.T) {
127127
Replicas: 1,
128128
Drain: v1beta1.FluentdDrainConfig{
129129
Enabled: true,
130+
Image: v1beta1.ImageSpec{
131+
Repository: common.FluentdDrainWatchRepo,
132+
Tag: common.FluentdDrainWatchTag,
133+
},
130134
},
131135
},
132136
Workers: 2,
@@ -165,6 +169,10 @@ func TestFluentdAggregator_detached_MultiWorker(t *testing.T) {
165169
Replicas: 1,
166170
Drain: v1beta1.FluentdDrainConfig{
167171
Enabled: true,
172+
Image: v1beta1.ImageSpec{
173+
Repository: common.FluentdDrainWatchRepo,
174+
Tag: common.FluentdDrainWatchTag,
175+
},
168176
},
169177
},
170178
},

e2e/fluentd-aggregator/fluentd_aggregator_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ func TestFluentdAggregator_MultiWorker(t *testing.T) {
119119
Replicas: 1,
120120
Drain: v1beta1.FluentdDrainConfig{
121121
Enabled: true,
122+
Image: v1beta1.ImageSpec{
123+
Repository: common.FluentdDrainWatchRepo,
124+
Tag: common.FluentdDrainWatchTag,
125+
},
122126
},
123127
},
124128
Workers: 2,
@@ -298,6 +302,10 @@ func TestFluentdAggregator_ConfigChecks(t *testing.T) {
298302
Replicas: 1,
299303
Drain: v1beta1.FluentdDrainConfig{
300304
Enabled: true,
305+
Image: v1beta1.ImageSpec{
306+
Repository: common.FluentdDrainWatchRepo,
307+
Tag: common.FluentdDrainWatchTag,
308+
},
301309
},
302310
},
303311
Workers: 1,

e2e/volumedrain/volumedrain_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ func TestVolumeDrain_Downscale(t *testing.T) {
117117
Replicas: 2,
118118
Drain: v1beta1.FluentdDrainConfig{
119119
Enabled: true,
120+
Image: v1beta1.ImageSpec{
121+
Repository: common.FluentdDrainWatchRepo,
122+
Tag: common.FluentdDrainWatchTag,
123+
},
120124
},
121125
},
122126
},
@@ -351,6 +355,10 @@ func TestVolumeDrain_Downscale_DeleteVolume(t *testing.T) {
351355
Drain: v1beta1.FluentdDrainConfig{
352356
Enabled: true,
353357
DeleteVolume: true,
358+
Image: v1beta1.ImageSpec{
359+
Repository: common.FluentdDrainWatchRepo,
360+
Tag: common.FluentdDrainWatchTag,
361+
},
354362
},
355363
},
356364
},

hack/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function main()
2020

2121
function load_images()
2222
{
23-
local images=( "controller:local" "fluentd-full:local" "config-reloader:local" )
23+
local images=( "controller:local" "fluentd-full:local" "config-reloader:local" "syslog-ng-reloader:local" "fluentd-drain-watch:local" )
2424
for image in ${images[@]}; do
2525
kind load docker-image "${image}"
2626
done

0 commit comments

Comments
 (0)