mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 12:06:57 +00:00
fix: case-insensitive webhook label matching (#2302)
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -608,7 +609,7 @@ HRA:
|
|||||||
// TODO labels related to OS and architecture needs to be explicitly declared or the current implementation will not be able to find them.
|
// TODO labels related to OS and architecture needs to be explicitly declared or the current implementation will not be able to find them.
|
||||||
|
|
||||||
for _, l2 := range rs.Spec.Labels {
|
for _, l2 := range rs.Spec.Labels {
|
||||||
if l == l2 {
|
if strings.EqualFold(l, l2) {
|
||||||
matched = true
|
matched = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -639,7 +640,7 @@ HRA:
|
|||||||
// TODO labels related to OS and architecture needs to be explicitly declared or the current implementation will not be able to find them.
|
// TODO labels related to OS and architecture needs to be explicitly declared or the current implementation will not be able to find them.
|
||||||
|
|
||||||
for _, l2 := range rd.Spec.Template.Spec.Labels {
|
for _, l2 := range rd.Spec.Template.Spec.Labels {
|
||||||
if l == l2 {
|
if strings.EqualFold(l, l2) {
|
||||||
matched = true
|
matched = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user