* 12622609: Dimensions to metrics.
* Modified the constants declaration.
* Made a slight change to make the observeIPPoolState() method inline and remove a whitespace.
* Modified label values to stay consistent with other prometheus labels.
* add placeFirst to pMgr cfg
* add placeFirst=false functionality to v2
* use constant instead of bool values for placeFirst
* fix bug and update cyclonus profiles
* set placefirst config based on configmap
* make code cleaner
* position azure jump first or directly after kube jump
* fix npm encoder ut
* [NPM] Adding support for Goal state processor Hydration event
* Adding logic in GSP to delete old cached objects
* Adding support for ForceDelete IpSet
* Adding missing event type
* Switching order of event type enum
* Addressing comments
* remove early nnc send to pool monitor
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* order service starts better and add logging in initialization
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* wait for reconciler to start
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* update comments and docs
Signed-off-by: GitHub <noreply@github.com>
* intial touches to create sets
* adding initial touches to dpshim
* deprecating initialize DP func
* feat: [NPM] Adding DPShim layer in controller pods
* correcting an import error
* Adding some UTs
* adding a UT
* Addressing some comments
* Moving an UT to linux specifc file
* Fixing some issues with controller pod
* Adding some dns poilices and logs for debugging
* Moving aroudn outchannel to help with hydration of new clients
* removeing pass by ref
* Adding http server in daemon for pprof
* Adding a new grpc option to wait
* Fixing 100% cpu in daemon
* Fixing some logic in list management
* Applying some golints
* adding mutex
* Addressing comments and solving a bug. Cyclonus seems to be good now
* Fixing a bug
* Addressing a comment
* fixing an issue and addressing comments
* fix: panic caused by nil Writer provided to Logger
In the log.(*Logger).Init method, several different strategies are
considered based on the configuration provided by the user. In one
common case, a rotating log file is opened and the log output is tee-ed
into it. If there is any issue with opening that log file, the
`log.(*Log).SetOutput` method is never invoked on the underlying logger.
Since this standard library logger was created with `nil` passed as the
`io.Writer`, this results in a nil pointer deref panic. The error
causing the issue is also not surfaced to the user.
This initializes the standard library logger with the `io.Discard`
writer. This adheres to the original intention here, while also being a
safer alternative to nil (effectively writes are to /dev/null). Also,
the error is written out to stderr, in the hopes that an operator will
be able to diagnose and fix the issue (in the absense of a correct
logger configuration).
Finally, the logger initialization has been moved to a new
function, `log.NewLoggerE` that properly exposes the underlying error.
The original function, `NewLogger`, has been modified to use this
function instead and has been marked Deprecated.
* Remove redundant types in function signatures
The linter correctly pointed out that the types are redundant here.
While ordinarily I tend to leave them if the ellision appears in the
middle of the signature, I respect the linter's decision :)
* Change NewLoggerE test to use TempDir
Rather than trying to pull a non-existant path out of thin air and
hoping that it doesn't exist, this instead uses os.TempDir to create a
guaranteed-empty directory. From within the newly-created tempdir we try
to use a non-existent path. This is better both on a single platform,
but also has the benefit of working well on Windows too.
* Fix test to use os.MkdirTemp instead of os.TempDir
The intention of this test was to create a new temporary directory
rather than use the system's temporary directory. This mistake was
pointed out by @rbtr in a code review (thanks!).
* Fix nil logger under error conditions
When an error is present, we want to return both the error and the
logger to guarantee that a usable logger is always present. This returns
the logger in all circumstances and documents that fact in the godoc for
this function.
* add dataplane health metrics
* change counters to countervecs
* wip
* uncomment metrics.ReinitializeAll()
* add comment about ReinitializeAll
* restructure prometheus-metrics.go, address comments, and finish UTs for v1
* properly record exec times and include error labels
* add error label to add_policy_exec_time
* add v2 UTs, test NoOp, and address comment
* resolve lints
* feat: don't use CNS for CNI DEL command in windows multitenancy
* go fmt
* go fmt take 2
* fix: don't fallback to CNS for getNetwork or deleteHostNCApipaEndpoint, handle errNetworkNotFound
* test: add test for FindNetworkIDFromNetNs
* fix: getNetworkName needs to fallback to CNS when not found in state file for ADD
* fix: simplify the deleteHostNCApipaEndpoint function
* fix: linter
* fix: cnm should compile
* fix: always return retriable error for endpoint deletion failure
* fix: handle npe in cns/hnsclient by not using that package
* fix: logging
* fix: don't try cns if there is no multitenancy client
* fix: don't call CNS twice during ADD cmd
* fix: use hns wrapper, add some logging, don't return error when endpoint is already deleted
* delete v2 chains in v1 and move code around
* leave v1 the same, and add v2 chains to the list to flush/destroy
* update go mod and package name
* Revert "update go mod and package name"
This reverts commit 46b674c440.
* rename folder
* address comments
* remove extra ioutil import statement
* update mod/vendoring
* Revert "update mod/vendoring"
This reverts commit 436897e6cb.
* back to original go.mod
* update build tags for ioutil files used in v1