Skip to content

Commit

Permalink
feat: Update to kyma-otel-collector 0.104.0-1.20.0 (#1232)
Browse files Browse the repository at this point in the history
  • Loading branch information
k15r authored Jul 16, 2024
1 parent b6e6a59 commit bc82ab1
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 61 deletions.
124 changes: 83 additions & 41 deletions docs/contributor/benchmarks/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hack/load-tests/run-load-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BACKPRESSURE_TEST="false"
TEST_TARGET="traces"
TEST_NAME="No Name"
TEST_DURATION=1200
OTEL_IMAGE="europe-docker.pkg.dev/kyma-project/prod/tpi/otel-collector:0.102.1-fbfb6cdc"
OTEL_IMAGE="europe-docker.pkg.dev/kyma-project/prod/kyma-otel-collector:0.104.0-1.20.0-rc1"

while getopts m:b:n:t:d: flag; do
case "$flag" in
Expand Down
6 changes: 4 additions & 2 deletions hack/make/provision.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ provision-k3d-istio: provision-k3d
GIT_COMMIT_SHA=$(shell git rev-parse --short=8 HEAD)
UNAME=$(shell uname -s)
ifeq ($(UNAME),Linux)
export HIBERNATION_HOUR=$(shell date -d5H +%-H)
export HIBERNATION_HOUR=$(shell date -d"5hours" +%-H)
endif
ifeq ($(UNAME),Darwin)
export HIBERNATION_HOUR=$(shell date -v+5H +%-H)
Expand All @@ -51,7 +51,9 @@ endif
.PHONY: provision-gardener
provision-gardener: ## Provision gardener cluster with latest k8s version
env
envsubst < hack/shoot_gcp.yaml | kubectl --kubeconfig "${GARDENER_SA_PATH}" apply -f -
envsubst < hack/shoot_gcp.yaml > /tmp/shoot.yaml
cat /tmp/shoot.yaml
cat /tmp/shoot.yaml | kubectl --kubeconfig "${GARDENER_SA_PATH}" apply -f -

echo "waiting fo cluster to be ready..."
kubectl wait --kubeconfig "${GARDENER_SA_PATH}" --for=condition=EveryNodeReady shoot/${GARDENER_CLUSTER_NAME} --timeout=17m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
func keepIfRunningOnSameNode(nodeAffiliated NodeAffiliatedResource) RelabelConfig {
return RelabelConfig{
SourceLabels: []string{fmt.Sprintf("__meta_kubernetes_%s_node_name", nodeAffiliated)},
Regex: fmt.Sprintf("$%s", config.EnvVarCurrentNodeName),
Regex: fmt.Sprintf("${%s}", config.EnvVarCurrentNodeName),
Action: Keep,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ receivers:
scrape_interval: 30s
relabel_configs:
- source_labels: [__meta_kubernetes_pod_node_name]
regex: $MY_NODE_NAME
regex: ${MY_NODE_NAME}
action: keep
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
regex: "true"
Expand Down Expand Up @@ -118,7 +118,7 @@ receivers:
scrape_interval: 30s
relabel_configs:
- source_labels: [__meta_kubernetes_pod_node_name]
regex: $MY_NODE_NAME
regex: ${MY_NODE_NAME}
action: keep
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
regex: "true"
Expand Down Expand Up @@ -168,7 +168,7 @@ receivers:
scrape_interval: 30s
relabel_configs:
- source_labels: [__meta_kubernetes_endpoint_node_name]
regex: $MY_NODE_NAME
regex: ${MY_NODE_NAME}
action: keep
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
regex: "true"
Expand Down Expand Up @@ -213,7 +213,7 @@ receivers:
scrape_interval: 30s
relabel_configs:
- source_labels: [__meta_kubernetes_endpoint_node_name]
regex: $MY_NODE_NAME
regex: ${MY_NODE_NAME}
action: keep
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
regex: "true"
Expand Down Expand Up @@ -267,7 +267,7 @@ receivers:
metrics_path: /stats/prometheus
relabel_configs:
- source_labels: [__meta_kubernetes_pod_node_name]
regex: $MY_NODE_NAME
regex: ${MY_NODE_NAME}
action: keep
- source_labels: [__meta_kubernetes_pod_container_name]
regex: istio-proxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ receivers:
scrape_interval: 30s
relabel_configs:
- source_labels: [__meta_kubernetes_pod_node_name]
regex: $MY_NODE_NAME
regex: ${MY_NODE_NAME}
action: keep
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
regex: "true"
Expand Down Expand Up @@ -110,7 +110,7 @@ receivers:
scrape_interval: 30s
relabel_configs:
- source_labels: [__meta_kubernetes_endpoint_node_name]
regex: $MY_NODE_NAME
regex: ${MY_NODE_NAME}
action: keep
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
regex: "true"
Expand Down
5 changes: 4 additions & 1 deletion internal/resources/otelcollector/core_pod_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ func makePodSpec(baseName, image string, opts ...podSpecOption) corev1.PodSpec {
{
Name: collectorContainerName,
Image: image,
Args: []string{"--config=/conf/" + configMapKey},
Args: []string{
"--config=/conf/" + configMapKey,
"--feature-gates=-confmap.unifyEnvVarExpansion",
},
EnvFrom: []corev1.EnvFromSource{
{
SecretRef: &corev1.SecretEnvSource{
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ var (
)

const (
defaultOtelImage = "europe-docker.pkg.dev/kyma-project/prod/tpi/otel-collector:0.102.1-fbfb6cdc"
defaultOtelImage = "europe-docker.pkg.dev/kyma-project/prod/kyma-otel-collector:0.104.0-1.20.0-rc1"
defaultFluentBitImage = "europe-docker.pkg.dev/kyma-project/prod/tpi/fluent-bit:3.0.7-1e5449d3"
defaultFluentBitExporterImage = "europe-docker.pkg.dev/kyma-project/prod/directory-size-exporter:v20240605-7743c77e"
defaultSelfMonitorImage = "europe-docker.pkg.dev/kyma-project/prod/tpi/telemetry-self-monitor:2.53.0-8691013b"
Expand Down
2 changes: 1 addition & 1 deletion sec-scanners-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module-name: telemetry
protecode:
- europe-docker.pkg.dev/kyma-project/prod/telemetry-manager:main
- europe-docker.pkg.dev/kyma-project/prod/tpi/otel-collector:0.102.1-fbfb6cdc
- europe-docker.pkg.dev/kyma-project/prod/kyma-otel-collector:0.104.0-1.20.0-rc1
- europe-docker.pkg.dev/kyma-project/prod/tpi/fluent-bit:3.0.7-1e5449d3
- europe-docker.pkg.dev/kyma-project/prod/directory-size-exporter:v20240605-7743c77e
- europe-docker.pkg.dev/kyma-project/prod/tpi/telemetry-self-monitor:2.53.0-8691013b
Expand Down
4 changes: 2 additions & 2 deletions test/testkit/assert/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func LogPipelineHealthy(ctx context.Context, k8sClient client.Client, pipelineNa
var pipeline telemetryv1alpha1.LogPipeline
key := types.NamespacedName{Name: pipelineName}
g.Expect(k8sClient.Get(ctx, key, &pipeline)).To(Succeed())
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeAgentHealthy)).To(BeTrue())
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeConfigurationGenerated)).To(BeTrue())
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeAgentHealthy)).To(BeTrue(), "Agent not healthy")
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeConfigurationGenerated)).To(BeTrue(), "Configuration not generated")
}, periodic.EventuallyTimeout, periodic.DefaultInterval).Should(Succeed())
}

Expand Down
6 changes: 3 additions & 3 deletions test/testkit/assert/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ func MetricPipelineHealthy(ctx context.Context, k8sClient client.Client, pipelin
var pipeline telemetryv1alpha1.MetricPipeline
key := types.NamespacedName{Name: pipelineName}
g.Expect(k8sClient.Get(ctx, key, &pipeline)).To(Succeed())
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeGatewayHealthy)).To(BeTrue())
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeAgentHealthy)).To(BeTrue())
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeConfigurationGenerated)).To(BeTrue())
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeGatewayHealthy)).To(BeTrueBecause("Gateway was not healthy: %v", meta.FindStatusCondition(pipeline.Status.Conditions, conditions.TypeGatewayHealthy)))
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeAgentHealthy)).To(BeTrueBecause("Agent was not healthy: %v", meta.FindStatusCondition(pipeline.Status.Conditions, conditions.TypeAgentHealthy)))
g.Expect(meta.IsStatusConditionTrue(pipeline.Status.Conditions, conditions.TypeConfigurationGenerated)).To(BeTrueBecause("Configuration was not generated: %v", meta.FindStatusCondition(pipeline.Status.Conditions, conditions.TypeConfigurationGenerated)))
}, periodic.EventuallyTimeout, periodic.DefaultInterval).Should(Succeed())
}

Expand Down
2 changes: 1 addition & 1 deletion test/testkit/mocks/backend/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

const (
otelCollectorImage = "europe-docker.pkg.dev/kyma-project/prod/tpi/otel-collector:0.102.1-fbfb6cdc"
otelCollectorImage = "europe-docker.pkg.dev/kyma-project/prod/kyma-otel-collector:0.104.0-1.20.0-rc1"
nginxImage = "europe-docker.pkg.dev/kyma-project/prod/external/nginx:1.23.3"
fluentDImage = "europe-docker.pkg.dev/kyma-project/prod/external/fluent/fluentd:v1.16-debian-1"
)
Expand Down

0 comments on commit bc82ab1

Please sign in to comment.