Skip to content

Commit

Permalink
Resolve an issue where the AllowExternalTraffic configuration was not…
Browse files Browse the repository at this point in the history
… set to its default value (#558)
  • Loading branch information
zohar7ch authored Feb 11, 2025
1 parent 406ad1b commit a0b45e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/operatorconfig/enforcement/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (c Config) GetActualExternalTrafficPolicy() allowexternaltraffic.Enum {
const (
ActiveEnforcementNamespacesKey = "active-enforcement-namespaces" // When using the "shadow enforcement" mode, namespaces in this list will be treated as if the enforcement were active
AllowExternalTrafficKey = "allow-external-traffic" // Whether to automatically create network policies for external traffic
AllowExternalTrafficDefault = allowexternaltraffic.IfBlockedByOtterize
AllowExternalTrafficDefault = string(allowexternaltraffic.IfBlockedByOtterize)
EnforcementDefaultStateKey = "enforcement-default-state" // Sets the default state of the If true, always enforces. If false, can be overridden using ProtectedService.
EnforcementDefaultStateDefault = true
EnableNetworkPolicyKey = "enable-network-policy-creation" // Whether to enable Intents network policy creation
Expand Down Expand Up @@ -91,7 +91,7 @@ func InitCLIFlags() {
pflag.Bool(EnableEgressNetworkPolicyReconcilersKey, EnableEgressNetworkPolicyReconcilersDefault, "Experimental - enable the generation of egress network policies alongside ingress network policies")
pflag.Bool(EnableAWSPolicyKey, EnableAWSPolicyDefault, "Enable the AWS IAM reconciler")
allowExternalTrafficDefault := AllowExternalTrafficDefault
pflag.Var(&allowExternalTrafficDefault, AllowExternalTrafficKey, "Whether to automatically create network policies for external traffic")
pflag.String(allowExternalTrafficDefault, AllowExternalTrafficKey, "Whether to automatically create network policies for external traffic")
}

func GetConfig() Config {
Expand Down

0 comments on commit a0b45e2

Please sign in to comment.