-
Notifications
You must be signed in to change notification settings - Fork 3
/
skaffold.yaml
227 lines (226 loc) · 7.16 KB
/
skaffold.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
apiVersion: skaffold/v3
kind: Config
metadata:
name: swi-k8s-opentelemetry-collector
build:
artifacts:
- image: swi-k8s-opentelemetry-collector
docker:
dockerfile: build/docker/Dockerfile
- image: integration-test
docker:
dockerfile: build/docker/IntegrationTest.Dockerfile
buildArgs:
CI: "{{ .CI }}"
local:
push: false
manifests:
kustomize:
paths:
- tests/deploy/base
- tests/deploy/tests
buildArgs:
- --load-restrictor LoadRestrictionsNone
deploy:
kubectl:
defaultNamespace: test-namespace
helm:
releases:
- name: swi-k8s-opentelemetry-collector
chartPath: deploy/helm
namespace: test-namespace
createNamespace: true
setValues:
kube-state-metrics:
enabled: true
cluster:
name: "cluster name"
uid: "cluster-uid-123456789"
otel:
endpoint: timeseries-mock-service:9082
tls_insecure: true
# OTEL collector requires the SOLARWINDS_API_TOKEN env variable to be set to some not empty string
api_token: "not_set"
image:
repository: "swi-k8s-opentelemetry-collector"
tag: ""
node_collector:
sending_queue:
persistent_storage:
enabled: true
metrics:
prometheus_check: false
sending_queue:
offload_to_disk: true
prometheus:
scrape_interval: "15s"
kube-state-metrics:
scrape_interval: "15s"
control_plane:
controller_manager:
enabled: false
etcd:
enabled: false
k8s_instrumentation:
annotations:
# excluded annotations:
# * kubectl.kubernetes.io/last-applied-configuration - deployed by kubectl, contains full config for each resource
# * cni.projectcalico.org/ - deployed in CI system (k3s)
excludePattern: "(kubectl\\.kubernetes\\.io/last-applied-configuration)|(cni\\.projectcalico\\.org/.*)|(deployment\\.kubernetes\\.io/revision)|(deprecated\\.daemonset\\.template\\.generation)"
labels:
# excluded labels:
# * skaffold.dev/ - deployed by skaffold, contains unique ids so it must be excluded
excludePattern: "skaffold\\.dev/.*"
autodiscovery:
prometheusEndpoints:
customTransformations:
counterToRate:
- k8s.otelcol_exporter_sent_metric_points
- k8s.otelcol_exporter_sent_log_records
filter:
exclude:
match_type: regexp
metric_names:
- k8s.otelcol_processor.*
podMonitors:
rules:
- rule: labels["app"] == "test-deployment"
metrics_path: "/custom_metrics"
endpoint_port: 8081
prefix: ""
events:
enabled: true
sending_queue:
offload_to_disk: true
manifests:
enabled: true
pull_every: 1m
logs:
# journal on Docker Desktop is not supported
journal: false
filter:
log_record:
- resource.attributes["k8s.namespace.name"] == "test-namespace"
swi_endpoint_check:
enabled: false
certmanager:
enabled: false
operator:
enabled: false
upgradeOnChange: true
# Deploy prometheus for development purposes. Metrics prefixed with `output_` contains metrics produced by the agent
- name: monitoring
remoteChart: prometheus
namespace: test-namespace
createNamespace: true
repo: https://prometheus-community.github.io/helm-charts
version: 19.7.2
setValues:
alertmanager.enabled: false
prometheus-node-exporter.enabled: false
prometheus-pushgateway.enabled: false
kube-state-metrics.enabled: false
server:
nodeSelector:
"kubernetes\\.io\\/os": linux
kubeContext: docker-desktop
portForward:
- resourceType: service
resourceName: timeseries-mock-service
namespace: test-namespace
port: 8088
- resourceType: service
resourceName: monitoring-prometheus-server
namespace: test-namespace
port: 80
localPort: 8080
profiles:
- name: test-cluster
build:
artifacts:
- image: swi-k8s-opentelemetry-collector
docker:
dockerfile: build/docker/Dockerfile
local:
push: true
patches:
- op: replace
path: /deploy/helm/releases/0/namespace
value: "{{.TEST_CLUSTER_NAMESPACE}}"
- op: replace
path: /deploy/helm/releases/0/name
value: "{{.TEST_CLUSTER_RELEASE_NAME}}"
- op: replace
path: /portForward/0/namespace
value: "{{.TEST_CLUSTER_NAMESPACE}}"
- op: replace
path: /portForward/1/namespace
value: "{{.TEST_CLUSTER_NAMESPACE}}"
- op: replace
path: /portForward/1/resourceName
value: "{{.TEST_CLUSTER_RELEASE_NAME}}-prometheus-server"
- op: replace
path: /deploy/kubectl/defaultNamespace
value: "{{.TEST_CLUSTER_NAMESPACE}}"
- op: remove
path: /manifests/kustomize/paths/1
- op: remove
path: /manifests/kustomize/paths/0
- op: replace
path: /deploy/helm/releases/1/namespace
value: "{{.TEST_CLUSTER_NAMESPACE}}"
- op: replace
path: /deploy/helm/releases/1/name
value: "{{.TEST_CLUSTER_RELEASE_NAME}}-prometheus"
- op: replace
path: /deploy/kubeContext
value: "<your kube context here>"
- name: ci
activation:
- env: CI=true
build:
local:
push: false
useBuildkit: true
concurrency: 0
test:
- image: swi-k8s-opentelemetry-collector
structureTests:
- './build/docker/structure-test.yaml'
- image: swi-k8s-opentelemetry-collector-tests
custom:
- command: docker run --rm $IMAGE
timeoutSeconds: 300
dependencies:
paths:
- ./src/**
patches:
- op: remove
path: /deploy/helm/releases/1
- op: remove
path: /portForward/1
- op: add
path: /build/artifacts/-
value:
image: swi-k8s-opentelemetry-collector-tests
docker:
dockerfile: build/docker/Dockerfile
target: tests
deploy:
kubeContext: default
- name: ci-helm-e2e
patches:
- op: remove
path: /build/artifacts/0
- op: remove
path: /deploy/helm/releases/0/setValues/otel.image.repository
- op: remove
path: /deploy/helm/releases/0/setValues/otel.image.tag
build:
local:
push: false
useBuildkit: true
concurrency: 0
deploy:
# `default` is k3s default context name
kubeContext: default