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 68ccf66
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 16 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
12 changes: 6 additions & 6 deletions manifests/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,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 Expand Up @@ -761,8 +761,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 Expand Up @@ -967,8 +967,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 manifests/rule-evaluator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,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

0 comments on commit 68ccf66

Please sign in to comment.