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

Trailing whitespace in VirtualServer status message #2766

Closed
jsoref opened this issue Jun 16, 2022 · 1 comment · Fixed by #2767
Closed

Trailing whitespace in VirtualServer status message #2766

jsoref opened this issue Jun 16, 2022 · 1 comment · Fixed by #2767

Comments

@jsoref
Copy link
Contributor

jsoref commented Jun 16, 2022

{
  "message": "Configuration for test/vs-test was added or updated ",
  "reason": "AddedOrUpdated",
  "state": "Valid"
}

for _, vsr := range vsConfig.VirtualServerRoutes {
vsrEventType := api_v1.EventTypeNormal
vsrEventTitle := "AddedOrUpdated"
vsrEventWarningMessage := ""
vsrState := conf_v1.StateValid
if messages, ok := warnings[vsr]; ok {
vsrEventType = api_v1.EventTypeWarning
vsrEventTitle = "AddedOrUpdatedWithWarning"
vsrEventWarningMessage = fmt.Sprintf("with warning(s): %v", formatWarningMessages(messages))
vsrState = conf_v1.StateWarning
}
if operationErr != nil {
vsrEventType = api_v1.EventTypeWarning
vsrEventTitle = "AddedOrUpdatedWithError"
vsrEventWarningMessage = fmt.Sprintf("%s; but was not applied: %v", vsrEventWarningMessage, operationErr)
vsrState = conf_v1.StateInvalid
}
msg := fmt.Sprintf("Configuration for %v/%v was added or updated %s", vsr.Namespace, vsr.Name, vsrEventWarningMessage)
lbc.recorder.Eventf(vsr, vsrEventType, vsrEventTitle, msg)

@github-actions
Copy link

Hi @jsoref thanks for reporting!

Be sure to check out the docs while you wait for a human to take a look at this 🙂

Cheers!

jsoref added a commit to jsoref/kubernetes-ingress that referenced this issue Jun 17, 2022
@lucacome lucacome linked a pull request Jun 30, 2022 that will close this issue
6 tasks
jsoref added a commit to jsoref/kubernetes-ingress that referenced this issue Jun 30, 2022
ciarams87 added a commit that referenced this issue Jul 15, 2022
Co-authored-by: Luca Comellini <luca.com@gmail.com>
Co-authored-by: Ciara Stacke <18287516+ciarams87@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant