Skip to content

Commit c6f9f0a

Browse files
committed
feat: Config retains the egress ACL file path
Allows smokescreen lib clients to perform logic related to the file (hot-reload changes to rules, alert on modifications, etc.) without having to re-parse the file path from the command-line.
1 parent a3294a6 commit c6f9f0a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/smokescreen/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ type Config struct {
8181
ExitTimeout time.Duration
8282
MetricsClient metrics.MetricsClientInterface
8383
EgressACL acl.Decider
84+
EgressACLFile string
8485
SupportProxyProtocol bool
8586
TlsConfig *tls.Config
8687
CrlByAuthorityKeyId map[string]*pkix.CertificateList
@@ -576,6 +577,7 @@ func (config *Config) SetupPrometheus(endpoint string, port string, listenAddr s
576577
func (config *Config) SetupEgressAcl(aclFile string) error {
577578
if aclFile == "" {
578579
config.EgressACL = nil
580+
config.EgressACLFile = ""
579581
return nil
580582
}
581583

@@ -587,6 +589,7 @@ func (config *Config) SetupEgressAcl(aclFile string) error {
587589
return err
588590
}
589591
config.EgressACL = egressACL
592+
config.EgressACLFile = aclFile
590593

591594
return nil
592595
}

0 commit comments

Comments
 (0)