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 networkpolicies if there are unscheduled pod, log errors (#378) #379

Merged

Conversation

xanonid
Copy link
Contributor

@xanonid xanonid commented Apr 10, 2018

Fixes #378

@murali-reddy
Copy link
Member

murali-reddy commented Apr 10, 2018

@xanonid thanks for your patch. Please apply same fix in the function buildNetworkPoliciesInfo() this is what is relevent. buildBetaNetworkPoliciesInfo is function for supporting old clusters with beta network policy semantics. Perhaps i should remove the support for it.

	if npc.v1NetworkPolicy {
		npc.networkPoliciesInfo, err = buildNetworkPoliciesInfo()
		if err != nil {
			return errors.New("Aborting sync. Failed to build network policies: " + err.Error())
		}
	} else {
		// TODO remove the Beta support
		npc.networkPoliciesInfo, err = buildBetaNetworkPoliciesInfo()
		if err != nil {
			return errors.New("Aborting sync. Failed to build network policies: " + err.Error())
		}
	}

@xanonid xanonid force-pushed the fix_networkpolicy_empty_podip branch from 557422e to d272625 Compare April 10, 2018 15:54
@xanonid
Copy link
Contributor Author

xanonid commented Apr 10, 2018

@murali-reddy thanks for the review. I fixed now buildNetworkPoliciesInfo and updated the patch.

@murali-reddy murali-reddy merged commit e94bf3d into cloudnativelabs:master Apr 10, 2018
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 this pull request may close these issues.

2 participants