Skip to content

Commit a0b45e2

Browse files
authored
Resolve an issue where the AllowExternalTraffic configuration was not set to its default value (#558)
1 parent 406ad1b commit a0b45e2

File tree

1 file changed

+2
-2
lines changed
  • src/shared/operatorconfig/enforcement

1 file changed

+2
-2
lines changed

src/shared/operatorconfig/enforcement/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (c Config) GetActualExternalTrafficPolicy() allowexternaltraffic.Enum {
4343
const (
4444
ActiveEnforcementNamespacesKey = "active-enforcement-namespaces" // When using the "shadow enforcement" mode, namespaces in this list will be treated as if the enforcement were active
4545
AllowExternalTrafficKey = "allow-external-traffic" // Whether to automatically create network policies for external traffic
46-
AllowExternalTrafficDefault = allowexternaltraffic.IfBlockedByOtterize
46+
AllowExternalTrafficDefault = string(allowexternaltraffic.IfBlockedByOtterize)
4747
EnforcementDefaultStateKey = "enforcement-default-state" // Sets the default state of the If true, always enforces. If false, can be overridden using ProtectedService.
4848
EnforcementDefaultStateDefault = true
4949
EnableNetworkPolicyKey = "enable-network-policy-creation" // Whether to enable Intents network policy creation
@@ -91,7 +91,7 @@ func InitCLIFlags() {
9191
pflag.Bool(EnableEgressNetworkPolicyReconcilersKey, EnableEgressNetworkPolicyReconcilersDefault, "Experimental - enable the generation of egress network policies alongside ingress network policies")
9292
pflag.Bool(EnableAWSPolicyKey, EnableAWSPolicyDefault, "Enable the AWS IAM reconciler")
9393
allowExternalTrafficDefault := AllowExternalTrafficDefault
94-
pflag.Var(&allowExternalTrafficDefault, AllowExternalTrafficKey, "Whether to automatically create network policies for external traffic")
94+
pflag.String(allowExternalTrafficDefault, AllowExternalTrafficKey, "Whether to automatically create network policies for external traffic")
9595
}
9696

9797
func GetConfig() Config {

0 commit comments

Comments
 (0)