Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cell = cell.Module( "policy-directory-watcher", "Watches Directory for cilium network policy file updates", cell.Config(defaultConfig), cell.Provide(newDirectoryPolicyResourcesWatcher, func() DirectoryWatcherReadStatus { return make(DirectoryWatcherReadStatus) }), )
Cell provides the Directory policy watcher. The Directory policy watcher watches CiliumNetworkPolicy, CiliumClusterWideNetworkPolicy created/deleted under a directory specified through cilium config. It reads and translates them to Cilium's own policy representation (api.Rules) and updates the policy repository (via PolicyManager) accordingly.
Functions ¶
This section is empty.
Types ¶
type DirectoryWatcherReadStatus ¶
type DirectoryWatcherReadStatus chan struct{}
type PolicyManager ¶
type PolicyManager interface { PolicyAdd(rules api.Rules, opts *policy.AddOptions) (newRev uint64, err error) PolicyDelete(labels labels.LabelArray, opts *policy.DeleteOptions) (newRev uint64, err error) }
type PolicyResourcesWatcher ¶
type PolicyResourcesWatcher struct {
// contains filtered or unexported fields
}
func (*PolicyResourcesWatcher) WatchDirectoryPolicyResources ¶
func (p *PolicyResourcesWatcher) WatchDirectoryPolicyResources(ctx context.Context, policyManager PolicyManager)
WatchDirectoryPolicyResources starts watching Cilium Network policy files created under a directory.
type PolicyWatcherParams ¶
type PolicyWatcherParams struct { cell.In ReadStatus DirectoryWatcherReadStatus Lifecycle cell.Lifecycle Logger logrus.FieldLogger }
Click to show internal directories.
Click to hide internal directories.