-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfluent-operator-3.2.0-r4.yaml
125 lines (113 loc) · 3.59 KB
/
fluent-operator-3.2.0-r4.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package:
name: fluent-operator-3.2.0-r4
version: 3.2.0
epoch: 4
description: Operate Fluent Bit and Fluentd in the Kubernetes way - Previously known as FluentBit Operator
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- go
var-transforms:
- from: ${{package.version}}
match: ^(\d)\.(\d)\.(\d)$
replace: $1
to: fluent-major-version
- from: ${{package.version}}
match: ^(\d)\.(\d)\.(\d)$
replace: $2
to: fluent-minor-version
pipeline:
- uses: git-checkout
with:
repository: https://github.com/fluent/fluent-operator
expected-commit: aabb8198c080f55f3e1e575ef8951c5900cb2a6a
tag: v${{package.version}}
- uses: go/build
with:
output: manager
packages: ./cmd/fluent-manager/main.go
subpackages:
- name: fluent-watcher
pipeline:
- uses: go/build
with:
packages: ./cmd/fluent-watcher/fluentbit
output: fluent-watcher
test:
environment:
contents:
packages:
- fluent-bit
- fluent-bit-compat
- fluent-watcher-compat
pipeline:
- runs: |
echo "Testing fluent-watcher"
# Run fluent-watcher in the background and redirect its output to a temporary file
tempfile=$(mktemp)
fluent-watcher > "$tempfile" 2>&1 &
sleep 5
# Use grep to filter the output
cat "$tempfile" | grep -i "fluent-bit started"
fluent-watcher --help
- name: fluent-watcher-config
dependencies:
replaces:
# A "replaces" must match the package origin's full name. Since we use
# a version stream for fluent-bit, we must append fluent-bit-3.1
# exactly.
#
# Our automation has no way of linking fluent-operator to
# fluent-bit updates, so to ensure this doesn't silently fail when
# fluent-bit rolls forward, we have a test stanza below that ensures
# fluent-operator can always be installed alongside fluent-bit.
#
# When this test fails, that likely means fluent-bit rolled forward to
# a new version stream anad must be updated in the "replaces" block
# below
- fluent-bit-${{vars.fluent-major-version}}.${{vars.fluent-minor-version}}
pipeline:
- runs: |
mkdir -p "${{targets.contextdir}}"/fluent-bit/etc
cp conf/fluent-bit.conf conf/fluent-bit.yaml conf/parsers.conf \
conf/fluent-bit.conf "${{targets.contextdir}}"/fluent-bit/etc
test:
environment:
contents:
packages:
- fluent-bit
pipeline:
- runs: |
cat /fluent-bit/etc/parsers.conf
- name: fluent-watcher-compat
pipeline:
- runs: |
mkdir -p "${{targets.contextdir}}"/fluent-bit/bin/
ln -s /usr/bin/fluent-watcher "${{targets.contextdir}}"/fluent-bit/bin/fluent-watcher
update:
enabled: true
github:
identifier: fluent/fluent-operator
strip-prefix: v
use-tag: true
test:
environment:
contents:
packages:
- curl
- kwok
- kwokctl
- kubernetes # has a runtime dependency on kubectl
- etcd
pipeline:
- uses: test/kwok/cluster
runs: |
manager --help
- name: "Test operator"
runs: |
kubectl create ns fluent
kubectl apply --server-side=true -f https://github.com/fluent/fluent-operator/releases/download/v${{package.version}}/setup.yaml
manager -metrics-bind-address 0.0.0.0:8082&
sleep 5; curl localhost:8082/metrics |grep workqueue_retries_total