File tree 4 files changed +17
-6
lines changed
4 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 93
93
- uses : ./.github/actions/install-nix
94
94
- name : Run e2e tests
95
95
shell : bash
96
- run : nix develop --command bash -x ./scripts/tests.e2e.kube.sh
96
+ run : nix develop --impure -- command bash -x ./scripts/tests.e2e.kube.sh
97
97
env :
98
98
TMPNET_START_COLLECTORS : ${{ secrets.PROMETHEUS_ID != '' }}
99
99
TMPNET_CHECK_MONITORING : ${{ secrets.PROMETHEUS_ID != '' }}
Original file line number Diff line number Diff line change @@ -74,13 +74,21 @@ func NewNodeStatefulSet(
74
74
podLabels := map [string ]string {
75
75
"app" : name ,
76
76
}
77
- ghRepo := ""
77
+ var (
78
+ ghRepo string
79
+ ghWorkflow string
80
+ )
78
81
for label , value := range labels {
79
82
// gh_repo contains a slash so it is not a valid label. Set it as an annotation instead.
80
83
if label == "gh_repo" {
81
84
ghRepo = value
82
85
continue
83
86
}
87
+ // gh_workflow can contain spaces which is not valid in labels. Set it as an annotation instead.
88
+ if label == "gh_workflow" {
89
+ ghWorkflow = value
90
+ continue
91
+ }
84
92
podLabels [label ] = value
85
93
}
86
94
podAnnotations := map [string ]string {
@@ -89,6 +97,7 @@ func NewNodeStatefulSet(
89
97
"prometheus.io/path" : "/ext/metrics" ,
90
98
"promtail/collect" : "true" ,
91
99
"gh_repo" : ghRepo ,
100
+ "gh_workflow" : ghWorkflow ,
92
101
}
93
102
94
103
return & appsv1.StatefulSet {
Original file line number Diff line number Diff line change @@ -90,10 +90,11 @@ data:
90
90
target_label: network_uuid
91
91
- source_labels: [__meta_kubernetes_pod_label_node_id]
92
92
target_label: node_id
93
- # gh_repo is an annotation because labels can't contain `/`
93
+ # gh_repo is an annotation because labels can't contain `/` and a repo is typically `[org]/[repo]`
94
94
- source_labels: [__meta_kubernetes_pod_annotation_gh_repo]
95
95
target_label: gh_repo
96
- - source_labels: [__meta_kubernetes_pod_label_gh_workflow]
96
+ # gh_workflow is an annotation because workflows can contain spaces
97
+ - source_labels: [__meta_kubernetes_pod_annotation_gh_workflow]
97
98
target_label: gh_workflow
98
99
- source_labels: [__meta_kubernetes_pod_label_gh_run_id]
99
100
target_label: gh_run_id
Original file line number Diff line number Diff line change @@ -111,10 +111,11 @@ data:
111
111
target_label: network_uuid
112
112
- source_labels: [__meta_kubernetes_pod_label_node_id]
113
113
target_label: node_id
114
- # gh_repo is an annotation because labels can't contain `/`
114
+ # gh_repo is an annotation because labels can't contain `/` and a repo is typically `[org]/[repo]`
115
115
- source_labels: [__meta_kubernetes_pod_annotation_gh_repo]
116
116
target_label: gh_repo
117
- - source_labels: [__meta_kubernetes_pod_label_gh_workflow]
117
+ # gh_workflow is an annotation because workflows can contain spaces
118
+ - source_labels: [__meta_kubernetes_pod_annotation_gh_workflow]
118
119
target_label: gh_workflow
119
120
- source_labels: [__meta_kubernetes_pod_label_gh_run_id]
120
121
target_label: gh_run_id
You can’t perform that action at this time.
0 commit comments