continuous-integration/drone/push Build is passing
The previous logic stripped dashes from both the lookup name and container/selector names, performing an exact match after removal. This failed for cases like "wireguardproxy-client" matching "wireguardproxyclient" or "app-1"/"app-2" matching "app-x", because the dash removal produced different strings. Change to extract the prefix before the first dash in the lookup name, then match it against the beginning of container/selector names. This preserves the intended relationship while allowing matching of dashed variants with prefix-based patterns.