fix(skooner-token): empty whitelist input clears the annotation - #267
Merged
arielr-lt merged 1 commit intoJun 24, 2026
Merged
Conversation
Previously the workflow skipped the whitelist step when the input was empty, leaving whatever annotation a prior run had stamped on the ingress. That produced silent drift: someone passes an IP once, weeks later another run with no input keeps that IP allowlisted, and nobody realises until they get 403s with no obvious cause. Now the step always runs: - empty input → kubectl annotate ... whitelist-source-range- (remove) - non-empty → kubectl annotate ... whitelist-source-range=<v> --overwrite Slack notification reports state=configured or state=cleared so the outcome is visible in the run record.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Skooner token workflow takes an optional
whitelist_source_rangeinput that stamps an nginxwhitelist-source-rangeannotation on theskooner-ingress. Previously the step was guarded byif: inputs.whitelist_source_range != '', so an empty input was a no-op — whatever a previous run had set remained in place.This produced silent drift. A real example surfaced on prod today: a past run had set
whitelist-source-range: 153.67.181.222. On the prod cluster, the ingress-nginx controller svc wasexternalTrafficPolicy: Cluster, so nginx never saw the real client IP (it saw a kube node IP after SNAT). Every request — from any IP, including the one in the allowlist — was rejected with 403 by nginx'saccess forbidden by rule. Skooner was effectively unreachable, with no obvious cause, and the workflow's "unchanged" Slack note hid the fact that the stale allowlist was still in force.What changes
if:guard on the whitelist step so it always runs.kubectl annotate ... whitelist-source-range-(remove the annotation).--overwriteset, unchanged.state=configuredorstate=cleared.Out of scope (already done live)
ingress-nginx-controllersvc toexternalTrafficPolicy: Localso nginx sees real client IPs (sandbox already had this). The whitelist feature will now actually work on prod going forward.153.67.181.222annotation on prod so the dashboard is reachable in the meantime.Test plan
whitelist_source_rangeblank → Slack showsWhitelist: cleared, annotation absent on the ingress.whitelist_source_range=1.2.3.4/32→ Slack showsWhitelist: configured, annotation present.