Skip to content

Commit

Permalink
Delete unncessary lines
Browse files Browse the repository at this point in the history
Delete unncessary lines

Signed-off-by: Yuki Tsuboi <[email protected]>
  • Loading branch information
Yuki Tsuboi committed Jun 4, 2020
1 parent 8847c4f commit 35651c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
32 changes: 12 additions & 20 deletions pkg/agent/metrics/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.


package metrics

import (
Expand All @@ -25,18 +24,20 @@ import (

var (

EgressNetworkPolicyCount = metrics.NewGauge(&metrics.GaugeOpts{
Name: "antrea_agent_egress_networkpolicy_rule",
Help: "Number of egress networkpolicy rules on local node which are managed by the Antrea Agent.",
StabilityLevel: metrics.STABLE,
},
EgressNetworkPolicyCount = metrics.NewGauge(
&metrics.GaugeOpts{
Name: "antrea_agent_egress_networkpolicy_rule",
Help: "Number of egress networkpolicy rules on local node which are managed by the Antrea Agent.",
StabilityLevel: metrics.STABLE,
},
)

IngressNetworkPolicyCount = metrics.NewGauge(&metrics.GaugeOpts{
Name: "antrea_agent_ingress_networkpolicy_rule",
Help: "Number of ingress networkpolicy rules on local node which are managed by the Antrea Agent.",
StabilityLevel: metrics.STABLE,
},
IngressNetworkPolicyCount = metrics.NewGauge(
&metrics.GaugeOpts{
Name: "antrea_agent_ingress_networkpolicy_rule",
Help: "Number of ingress networkpolicy rules on local node which are managed by the Antrea Agent.",
StabilityLevel: metrics.STABLE,
},
)

PodCount = metrics.NewGauge(
Expand All @@ -61,15 +62,6 @@ var (
}, []string{"table_id"})
)

func InitializePrometheusMetrics() {
klog.Info("Initializing prometheus metrics")

if err := legacyregistry.Register(PodCount); err != nil {
klog.Error("Failed to register antrea_agent_local_pod_count with Prometheus")
}

)

func InitializePrometheusMetrics() {
klog.Info("Initializing prometheus metrics")

Expand Down
1 change: 0 additions & 1 deletion pkg/agent/openflow/network_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,6 @@ func (c *client) InstallPolicyRuleFlows(ruleID uint32, rule *types.PolicyRule, n
if err := c.applyConjunctiveMatchFlows(ctxChanges); err != nil {
return err
}

// Add the policyRuleConjunction into policyCache.
c.policyCache.Store(ruleID, conj)
return nil
Expand Down
1 change: 0 additions & 1 deletion test/e2e/prometheus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)


const monitoringNamespace string = "monitoring"

// Agent metrics to validate
Expand Down

0 comments on commit 35651c8

Please sign in to comment.