Skip to content

Commit

Permalink
Allow Prometheus to run GitHub Actions in e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSpiritXIII committed Oct 6, 2023
1 parent e1b516e commit 32975ca
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cmd/operator/deploy/operator/10-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ spec:
args:
- --config-file=/prometheus/config/config.yaml
- --config-file-output=/prometheus/config_out/config.yaml
- --reload-url=http://localhost:19090/-/reload
- --ready-url=http://localhost:19090/-/ready
- --reload-url=http://127.0.0.1:19090/-/reload
- --ready-url=http://127.0.0.1:19090/-/ready
- --listen-address=:19091
ports:
- name: cfg-rel-metrics
Expand Down
4 changes: 2 additions & 2 deletions cmd/operator/deploy/operator/11-rule-evaluator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ spec:
- --config-file-output=/prometheus/config_out/config.yaml
- --watched-dir=/etc/rules
- --watched-dir=/etc/secrets
- --reload-url=http://localhost:19092/-/reload
- --ready-url=http://localhost:19092/-/ready
- --reload-url=http://127.0.0.1:19092/-/reload
- --ready-url=http://127.0.0.1:19092/-/ready
- --listen-address=:19093
ports:
- name: cfg-rel-metrics
Expand Down
4 changes: 2 additions & 2 deletions cmd/operator/deploy/operator/12-alertmanager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ spec:
args:
- --config-file=/alertmanager/config.yaml
- --config-file-output=/alertmanager/config_out/config.yaml
- --reload-url=http://localhost:9093/-/reload
- --ready-url=http://localhost:9093/-/ready
- --reload-url=http://127.0.0.1:9093/-/reload
- --ready-url=http://127.0.0.1:9093/-/ready
- --listen-address=:19091
ports:
- name: cfg-rel-metrics
Expand Down
4 changes: 2 additions & 2 deletions cmd/operator/deploy/rule-evaluator/01-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ spec:
- --config-file=/prometheus/config/config.yaml
- --config-file-output=/prometheus/config_out/config.yaml
- --watched-dir=/etc/rules
- --reload-url=http://localhost:9092/-/reload
- --ready-url=http://localhost:9092/-/ready
- --reload-url=http://127.0.0.1:9092/-/reload
- --ready-url=http://127.0.0.1:9092/-/ready
- --listen-address=:9093
ports:
- name: cfg-rel-metrics
Expand Down
9 changes: 9 additions & 0 deletions e2e/operator_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,15 @@ func createCollectorResources(ctx context.Context, kubeClient client.Client, nam
}
collector := obj.(*appsv1.DaemonSet)
collector.Namespace = namespace
if skipGCM {
for i := range collector.Spec.Template.Spec.Containers {
container := &collector.Spec.Template.Spec.Containers[i]
if container.Name == "prometheus" {
container.Args = append(container.Args, "--export.debug.disable-auth")
break
}
}
}

if err = kubeClient.Create(ctx, collector); err != nil {
return fmt.Errorf("create collector DaemonSet: %w", err)
Expand Down

0 comments on commit 32975ca

Please sign in to comment.