Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions npm/pkg/controlplane/translation/translatePolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,5 @@ func TranslatePolicy(npObj *networkingv1.NetworkPolicy) (*policies.NPMNetworkPol
}
}
}
klog.Infof("JUST-TRANSLATED-THIS-POLICY:\n%s", npmNetPol.String())
klog.Infof("THIS-NPOBJ:\n%+v", npObj)
return npmNetPol, nil
}
4 changes: 1 addition & 3 deletions npm/pkg/dataplane/ioutil/restore_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,14 @@ func (creator *FileCreator) ToString() string {

func (creator *FileCreator) RunCommandWithFile(cmd string, args ...string) error {
fileString := creator.ToString()
klog.Infof("beginning to run command for restorer:\nBEGIN-CREATOR-FILE-FOR-COMMAND-%s\n%s\nEND-CREATOR-FILE-FOR-COMMAND-%s", cmd, fileString, cmd) // TODO remove
wasFileAltered, err := creator.runCommandOnceWithFile(fileString, cmd, args...)
if err == nil {
return nil
}
commandString := cmd + " " + strings.Join(args, " ")
for !creator.hasNoMoreRetries() {
if wasFileAltered {
fileString = creator.ToString()
klog.Infof("rerunning command [%s] with new file:\n%s", commandString, fileString)
klog.Infof("rerunning command [%s] with new file", commandString)
} else {
klog.Infof("rerunning command [%s] with the same file", commandString)
}
Expand Down
2 changes: 1 addition & 1 deletion npm/pkg/dataplane/ipsets/ipsetmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func (iMgr *IPSetManager) ApplyIPSets() error {
return nil
}

klog.Infof("[IPSetManager] toAddUpdateCahe %+v \n ", iMgr.toAddOrUpdateCache)
klog.Infof("[IPSetManager] toAddUpdateCache %+v \n ", iMgr.toAddOrUpdateCache)
klog.Infof("[IPSetManager] toDeleteCache %+v \n ", iMgr.toDeleteCache)
iMgr.sanitizeDirtyCache()

Expand Down
2 changes: 0 additions & 2 deletions npm/pkg/dataplane/ipsets/ipsetmanager_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,6 @@ func (iMgr *IPSetManager) updateDirtyKernelSets(saveFile []byte, creator *ioutil
toAddOrUpdateHashedNames[hashedName] = prefixedName
}

klog.Infof("beginning to parse ipset save file:\nBEGIN-IPSET-SAVE-FILE-FOR-APPLY-IPSETS\n%s\nEND-IPSET-SAVE-FILE-FOR-APPLY-IPSETS", string(saveFile)) // TODO remove eventually

// in each iteration, read a create line and any ensuing add lines
readIndex := 0
var line []byte
Expand Down
4 changes: 0 additions & 4 deletions npm/pkg/dataplane/policies/policymanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func (pMgr *PolicyManager) AddPolicy(policy *NPMNetworkPolicy, endpointList map[
if err := validatePolicy(policy); err != nil {
return npmerrors.Errorf(npmerrors.AddPolicy, false, fmt.Sprintf("couldn't add malformed policy: %s", err.Error()))
}
klog.Infof("PRINTING-CONTENTS-FOR-ADDING-POLICY:\n%s", policy.String())

// Call actual dataplane function to apply changes
err := pMgr.addPolicy(policy, endpointList)
Expand All @@ -115,11 +114,8 @@ func (pMgr *PolicyManager) isFirstPolicy() bool {

func (pMgr *PolicyManager) RemovePolicy(policyKey string, endpointList map[string]string) error {
policy, ok := pMgr.GetPolicy(policyKey)
klog.Infof("PRINTING-CONTENTS-FOR-REMOVING-POLICY:\n%s", policy.String())

if !ok {
klog.Infof("DEBUGME-POLICY-DOESN'T-EXIST-WHEN-DELETING")
klog.Infof("POLICY-CACHE: %+v", pMgr.policyMap.cache)
return nil
}

Expand Down