Skip to content

Commit

Permalink
Merge pull request #24 from datainfrahq/fix-networkspec
Browse files Browse the repository at this point in the history
fix network spec
  • Loading branch information
AdheipSingh authored Jun 6, 2023
2 parents 1f85c7f + 835a11e commit 2f9a6ba
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 2f9a6ba

Please sign in to comment.