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

Agent: "spec.PolicyID is empty" warning is raised despite Agent is running in standalone mode #6903

Closed
barkbay opened this issue Jun 14, 2023 · 0 comments · Fixed by #6938
Closed
Assignees
Labels
>bug Something isn't working v2.9.0

Comments

@barkbay
Copy link
Contributor

barkbay commented Jun 14, 2023

The Agent webhook attempts to check if PolicyID is set whether or not the Agent is running in fleet or standalone mode:

func (a *Agent) GetWarnings() []string {
	if a == nil {
		return nil
	}
	if len(a.Spec.PolicyID) == 0 {
		return []string{fmt.Sprintf("%s %s/%s: %s", Kind, a.Namespace, a.Name, MissingPolicyIDMessage)}
	}
	return nil
}

This check should only be done in fleet mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.9.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants