Skip to content

Commit

Permalink
daemon: remove deprecated force-local-policy-eval-at-source option
Browse files Browse the repository at this point in the history
Following its deprecation in commit 0ded29b ("daemon: Deprecate
force-local-policy-eval-at-source") for Cilium v1.13, remove it for
Cilium v1.14.

Keep the FORCE_LOCAL_POLICY_EVAL_AT_SOURCE macro defined in bpf code
only, as this will still be needed by upcoming changes.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
  • Loading branch information
tklauser committed Apr 13, 2023
1 parent 702cc00 commit 70059b3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 24 deletions.
3 changes: 2 additions & 1 deletion Documentation/operations/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ Annotations:
Removed Options
~~~~~~~~~~~~~~~

The ``sockops-enable`` option is removed
* The ``sockops-enable`` and ``force-local-policy-eval-at-source`` options deprecated in version
1.13 are removed.

Added Metrics
~~~~~~~~~~~~~
Expand Down
4 changes: 0 additions & 4 deletions daemon/cmd/daemon_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,6 @@ func initializeFlags() {
flags.String(option.NodeEncryptionOptOutLabels, defaults.NodeEncryptionOptOutLabels, "Label selector for nodes which will opt-out of node-to-node encryption")
option.BindEnv(Vp, option.NodeEncryptionOptOutLabels)

flags.Bool(option.ForceLocalPolicyEvalAtSource, defaults.ForceLocalPolicyEvalAtSource, "Force policy evaluation of all local communication at the source endpoint")
option.BindEnv(Vp, option.ForceLocalPolicyEvalAtSource)
flags.MarkDeprecated(option.ForceLocalPolicyEvalAtSource, "This option will be removed in v1.14")

flags.Bool(option.HTTPNormalizePath, true, "Use Envoy HTTP path normalization options, which currently includes RFC 3986 path normalization, Envoy merge slashes option, and unescaping and redirecting for paths that contain escaped slashes. These are necessary to keep path based access control functional, and should not interfere with normal operation. Set this to false only with caution.")
option.BindEnv(Vp, option.HTTPNormalizePath)

Expand Down
4 changes: 0 additions & 4 deletions pkg/datapath/linux/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,6 @@ func (h *HeaderfileWriter) writeTemplateConfig(fw *bufio.Writer, e datapath.Endp
fmt.Fprintf(fw, "#define USE_BPF_PROG_FOR_INGRESS_POLICY 1\n")
}

if option.Config.ForceLocalPolicyEvalAtSource {
fmt.Fprintf(fw, "#define FORCE_LOCAL_POLICY_EVAL_AT_SOURCE 1\n")
}

if e.RequireRouting() {
fmt.Fprintf(fw, "#define ENABLE_ROUTING 1\n")
}
Expand Down
5 changes: 0 additions & 5 deletions pkg/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,6 @@ const (
// LoopbackIPv4 is the default address for service loopback
LoopbackIPv4 = "169.254.42.1"

// ForceLocalPolicyEvalAtSource is the default value for
// option.ForceLocalPolicyEvalAtSource. It can be enabled to provide
// backwards compatibility.
ForceLocalPolicyEvalAtSource = false

// EnableEndpointRoutes is the value for option.EnableEndpointRoutes.
// It is disabled by default for backwards compatibility.
EnableEndpointRoutes = false
Expand Down
10 changes: 0 additions & 10 deletions pkg/option/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,10 +800,6 @@ const (
// LocalRouterIPv6 is the link-local IPv6 address to use for Cilium router device
LocalRouterIPv6 = "local-router-ipv6"

// ForceLocalPolicyEvalAtSource forces a policy decision at the source
// endpoint for all local communication
ForceLocalPolicyEvalAtSource = "force-local-policy-eval-at-source"

// EnableEndpointRoutes enables use of per endpoint routes
EnableEndpointRoutes = "enable-endpoint-routes"

Expand Down Expand Up @@ -1859,10 +1855,6 @@ type DaemonConfig struct {
// LocalRouterIPv6 is the link-local IPv6 address used for Cilium's router device
LocalRouterIPv6 string

// ForceLocalPolicyEvalAtSource forces a policy decision at the source
// endpoint for all local communication
ForceLocalPolicyEvalAtSource bool

// EnableEndpointRoutes enables use of per endpoint routes
EnableEndpointRoutes bool

Expand Down Expand Up @@ -2331,7 +2323,6 @@ var (
KVStoreOpt: make(map[string]string),
LogOpt: make(map[string]string),
LoopbackIPv4: defaults.LoopbackIPv4,
ForceLocalPolicyEvalAtSource: defaults.ForceLocalPolicyEvalAtSource,
EnableEndpointRoutes: defaults.EnableEndpointRoutes,
AnnotateK8sNode: defaults.AnnotateK8sNode,
K8sServiceCacheSize: defaults.K8sServiceCacheSize,
Expand Down Expand Up @@ -2915,7 +2906,6 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) {
c.EncryptInterface = vp.GetStringSlice(EncryptInterface)
c.EncryptNode = vp.GetBool(EncryptNode)
c.EnvoyLogPath = vp.GetString(EnvoyLog)
c.ForceLocalPolicyEvalAtSource = vp.GetBool(ForceLocalPolicyEvalAtSource)
c.HTTPNormalizePath = vp.GetBool(HTTPNormalizePath)
c.HTTPIdleTimeout = vp.GetInt(HTTPIdleTimeout)
c.HTTPMaxGRPCTimeout = vp.GetInt(HTTPMaxGRPCTimeout)
Expand Down

0 comments on commit 70059b3

Please sign in to comment.