Skip to content

Commit

Permalink
fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
AdheipSingh committed Jun 6, 2023
1 parent e4c5961 commit 835a11e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builder/builder_network_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

type BuilderNetworkPolicy struct {
NetworkPolicy *networkingv1.NetworkPolicy
NetworkPolicySpec *networkingv1.NetworkPolicySpec
CommonBuilder
}

Expand All @@ -25,7 +25,7 @@ func (s *Builder) ReconcileNetworkPolicy() (controllerutil.OperationResult, erro

for _, np := range s.NetworkPolicy {

if np.NetworkPolicy != nil {
if np.NetworkPolicySpec != nil {

makeNp := np.makeNetworkPolicy()

Expand All @@ -48,7 +48,7 @@ func (b *BuilderNetworkPolicy) makeNetworkPolicy() *networkingv1.NetworkPolicy {
Kind: "NetworkPolicy",
},
ObjectMeta: b.ObjectMeta,
Spec: *&b.NetworkPolicy.Spec,
Spec: *b.NetworkPolicySpec,
}

return networkPolicy
Expand Down

0 comments on commit 835a11e

Please sign in to comment.