-
Notifications
You must be signed in to change notification settings - Fork 236
/
dataplane_linux.go
39 lines (32 loc) · 1.14 KB
/
dataplane_linux.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package dataplane
import (
"github.com/Azure/azure-container-networking/npm/pkg/dataplane/policies"
"github.com/Azure/azure-container-networking/npm/util"
npmerrors "github.com/Azure/azure-container-networking/npm/util/errors"
)
func (dp *DataPlane) getEndpointsToApplyPolicies(_ []*policies.NPMNetworkPolicy) (map[string]string, error) {
// NOOP in Linux
return nil, nil
}
func (dp *DataPlane) shouldUpdatePod() bool {
return false
}
func (dp *DataPlane) updatePod(pod *updateNPMPod) error {
// NOOP in Linux
return nil
}
func (dp *DataPlane) bootupDataPlane() error {
util.DetectIptablesVersion(dp.ioShim)
// It is important to keep order to clean-up ACLs before ipsets. Otherwise we won't be able to delete ipsets referenced by ACLs
if err := dp.policyMgr.Bootup(nil); err != nil {
return npmerrors.ErrorWrapper(npmerrors.BootupDataplane, false, "failed to reset policy dataplane", err)
}
if err := dp.ipsetMgr.ResetIPSets(); err != nil {
return npmerrors.ErrorWrapper(npmerrors.BootupDataplane, false, "failed to reset ipsets dataplane", err)
}
return nil
}
func (dp *DataPlane) refreshPodEndpoints() error {
// NOOP in Linux
return nil
}