Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add ip_reserved label for vip #4093

Merged
merged 1 commit into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/controller/vip.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,11 @@ func (c *Controller) createOrUpdateVipCR(key, ns, subnet, v4ip, v6ip, mac, pV4ip
vip.Labels[util.SubnetNameLabel] = subnet
needUpdateLabel = true
}
if _, ok := vip.Labels[util.IPReservedLabel]; !ok {
op = "add"
vip.Labels[util.IPReservedLabel] = ""
needUpdateLabel = true
}
if needUpdateLabel {
patchPayloadTemplate := `[{ "op": "%s", "path": "/metadata/labels", "value": %s }]`
raw, _ := json.Marshal(vip.Labels)
Expand Down
Loading