Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
758e0cb
first version of network policy controller and its unit tests
JungukCho Apr 6, 2021
c7aa535
update reconcile and deleteNetworkPolicy function to correctly instal…
JungukCho Apr 6, 2021
d8a4d2b
To explicitly manage default Azure NPM chain in deleteNetworkPolicy f…
JungukCho Apr 6, 2021
96a5bde
correct comments and delete unused variable
JungukCho Apr 6, 2021
3b6fbc0
fix missed returing errors in codes
JungukCho Apr 6, 2021
0bb785b
Correct to check DeletionTimestamp and DeletionGracePeriodSeconds var…
JungukCho Apr 6, 2021
c3a1969
removed placeholder functions in network policy controoler and added …
JungukCho Apr 6, 2021
928aee6
- applied comments (use explict names, locating lock in a better place)
JungukCho Apr 7, 2021
faad159
add two methods to save and restore iptables in unit test
JungukCho Apr 7, 2021
f5ac80e
comment out unused function
JungukCho Apr 7, 2021
50d1e98
early filter in updateNetworkPolicy function if they are the same net…
JungukCho Apr 7, 2021
7db79d0
- start using klog package instead of log package
JungukCho Apr 7, 2021
b9ea448
remove unneeded defer for lock
JungukCho Apr 7, 2021
2850c34
Locate of adding and deleting network policy object from our network …
JungukCho Apr 8, 2021
761a974
use cached network policy key instead of network policy object as met…
JungukCho Apr 9, 2021
b6fb6a2
remove redundant check
JungukCho Apr 13, 2021
81b8fb1
Remove ns- prefix as key in RawNpMap. Update UT to check prometheus m…
JungukCho Apr 13, 2021
9551acf
minor update for varialbe names
JungukCho Apr 13, 2021
b7eb15c
remove dependency between UT by re-initializing metrics. Correct mess…
JungukCho Apr 13, 2021
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
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ require (
k8s.io/api v0.18.2
k8s.io/apimachinery v0.18.2
k8s.io/client-go v0.18.2
k8s.io/klog v1.0.0
sigs.k8s.io/controller-runtime v0.6.0
software.sslmate.com/src/go-pkcs12 v0.0.0-20201102150903-66718f75db0e // indirect
)
5 changes: 5 additions & 0 deletions npm/metrics/prometheus_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ var nodeLevelRegistry = prometheus.NewRegistry()
var clusterLevelRegistry = prometheus.NewRegistry()
var haveInitialized = false

func ReInitializeAllMetrics() {
haveInitialized = false
InitializeAll()
}

// InitializeAll creates all the Prometheus Metrics. The metrics will be nil before this method is called.
func InitializeAll() {
if !haveInitialized {
Expand Down
Loading