Skip to content

Commit 441934e

Browse files
committed
Merge remote-tracking branch 'upstream-istio/master' into sync-upstream-master
2 parents 17574c9 + 166562a commit 441934e

File tree

415 files changed

+6274
-2154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

415 files changed

+6274
-2154
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "istio build-tools",
3-
"image": "gcr.io/istio-testing/build-tools:master-6ac9cdb3d1ad09092398ab15574ce88cf2ac31ff",
3+
"image": "gcr.io/istio-testing/build-tools:master-4d8a6668b6d46b3becc35f9b24467f841bbb020a",
44
"privileged": true,
55
"remoteEnv": {
66
"USE_GKE_GCLOUD_AUTH_PLUGIN": "True",

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Istio is an open source service mesh that layers transparently onto existing distributed applications. Istio’s powerful features provide a uniform and more efficient way to secure, connect, and monitor services. Istio is the path to load balancing, service-to-service authentication, and monitoring – with few or no service code changes.
1818

1919
- For in-depth information about how to use Istio, visit [istio.io](https://istio.io)
20-
- To ask questions and get assistance from our community, visit [Github Discussions](https://github.com/istio/istio/discussions)
20+
- To ask questions and get assistance from our community, visit [GitHub Discussions](https://github.com/istio/istio/discussions)
2121
- To learn how to participate in our overall community, visit [our community page](https://istio.io/about/community)
2222

2323
In this README:
@@ -55,15 +55,10 @@ Istio is composed of these components:
5555
> simplifies and enhances how microservices in an application talk to each
5656
> other over the network provided by the underlying platform.
5757
58-
- **Istiod** - The Istio control plane. It provides service discovery, configuration and certificate management. It consists of the following sub-components:
58+
* **Ztunnel** - A lightweight data plane proxy written in Rust,
59+
used in Ambient mesh mode to provide secure connectivity and observability for workloads without sidecar proxies.
5960

60-
- **Pilot** - Responsible for configuring the proxies at runtime.
61-
62-
- **Citadel** - Responsible for certificate issuance and rotation.
63-
64-
- **Galley** - Responsible for validating, ingesting, aggregating, transforming and distributing config within Istio.
65-
66-
- **Operator** - The component provides user friendly options to operate the Istio service mesh.
61+
- **Istiod** - The Istio control plane. It provides service discovery, configuration and certificate management.
6762

6863
## Repositories
6964

@@ -88,8 +83,7 @@ contains platform-specific code to populate the
8883
when the application topology changes, as well as translate
8984
[routing rules](https://istio.io/latest/docs/reference/config/networking/) into proxy specific configuration.
9085

91-
- [security](security/). This directory contains [security](https://istio.io/latest/docs/concepts/security/) related code,
92-
including Citadel (acting as Certificate Authority), citadel agent, etc.
86+
- [security](security/). This directory contains [security](https://istio.io/latest/docs/concepts/security/) related code.
9387

9488
- [istio/proxy](https://github.com/istio/proxy). The Istio proxy contains
9589
extensions to the [Envoy proxy](https://github.com/envoyproxy/envoy) (in the form of

RELEASE_BRANCHES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ for including it in the “.0” release. Otherwise, the PRs will not be merged
5555
* Behavioral changes should be highly scrutinized, while typo fixes don't require that level of scrutiny.
5656
* It is preferable that cherry-picks are done by the istio-testing bot.
5757
* Automated cherry-picks do not need subject-matter experts to approve if discussed in the original PR.
58-
* To trigger the bot cherry pick, either;
58+
* To trigger the bot cherry pick, either:
5959
* Apply the correct `cherrypick/release-X.XX` label to the PR, and the bot should pick it up.
6060
* Use an explicit PR comment command: `/cherry-pick release-X.XX`
6161
* It is strongly preferred to always apply the correct `cherrypick/` label manually to aid search and tracking, even if you use the comment command method.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.28
1+
1.29

architecture/ambient/ztunnel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Additionally, `splice` will be used to make this proxying more efficient when po
186186

187187
For traffic in the mesh, things are a bit more complex:
188188

189-
1. If the destination has a waypoint proxy, we must send to it to the waypoint (using HBONE).
189+
1. If the destination has a waypoint proxy, we must send it to the waypoint (using HBONE).
190190
When we do this, we will want to preserve the original destination Service IP, as the waypoint can do a better job picking a backend pod than we can.
191191
Note: the application itself may have already resolved the Service IP to a specific pod if it has Kubernetes native routing built in; since we don't have the Service information in this case we will use the destination IP we received (a pod). Most notably, sidecar proxies behave this way.
192192
1. If the destination is on our node, we "fast path" the request and convert this into an inbound request.

architecture/networking/controllers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Aside from this, there are a few conveniences and workarounds built-in to the cl
3131
*All Istio Kubernetes usage should use this library and not operate on Kubernetes clients directly.*
3232

3333
**`kclient.Client`** is a higher level wrapper around a Kubernetes resource, and is built up of sub-parts `kclient.Reader`, `kclient.Writer`, and `kclient.Informer`.
34-
Typically, the whole `kclient.Client` is used,though.
34+
Typically, the whole `kclient.Client` is used, though.
3535

3636
Functionality offered by `kclient` includes:
3737
* Typed clients (via generics) and more ergonomic APIs
@@ -61,7 +61,7 @@ With a few exceptions, Istio controllers typically are split in two phases: cons
6161

6262
Construction should create informers (via `kclient.New`), setup a queue (via `controllers.NewQueue`), and register event handlers on the informers.
6363
Often, these handlers are adding something to the queue like `client.AddEventHandler(controllers.ObjectHandler(queue.AddObject))`.
64-
Construction should NOT actually start running all of these things, do I/O, or block in anyway.
64+
Construction should NOT actually start running all of these things, do I/O, or block in any way.
6565

6666
Running the controller actually starts processing things.
6767
Normally, this just means running the queue.

architecture/security/istio-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ At a high level, the Istio agent acts as an intermediate proxy between Istiod an
1010
at two levels. For distributing workload certificates, Envoy will send [SDS](https://www.envoyproxy.io/docs/envoy/latest/configuration/security/secret)
1111
requests to the agent, causing the agent to submit a CSR to the configured CA (generally Istiod). For other configuration,
1212
Envoy will send [ADS](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/operations/dynamic_configuration#aggregated-xds-ads)
13-
requests to the agent, which will be forwarded to the configured discovery server (general Istiod).
13+
requests to the agent, which will be forwarded to the configured discovery server (generally Istiod).
1414

1515
## CA Flow
1616

cni/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ The Istio CNI Node Agent is responsible for several things
44

55
- Install an Istio CNI plugin binary on each node's filesystem, updating that node's CNI config in e.g (`/etc/cni/net.d`), and watching the config and binary paths to reinstall if things are modified.
66
- In sidecar mode, the CNI plugin can configure sidecar networking for pods when they are scheduled by the container runtime, using iptables. The CNI handling the netns setup replaces the current Istio approach using a `NET_ADMIN` privileged `initContainers` container, `istio-init`, injected in the pods along with `istio-proxy` sidecars. This removes the need for a privileged, `NET_ADMIN` container in the Istio users' application pods.
7-
- In ambient mode, the CNI plugin does not configure any networking, but is only responsible for synchronously pushing new pod events back up to an ambient watch server which runs as part of the Istio CNI node agent. The ambient server will find the pod netns and configure networking inside that pod via iptables. The ambient server will additionally watch enabled namespaces, and enroll already-started-but-newly-enrolled pods in a similar fashion.
7+
- In ambient mode, the CNI plugin does not configure any networking but is only responsible for synchronously pushing new pod events back up to an ambient watch server which runs as part of the Istio CNI node agent. The ambient server will find the pod netns and configure networking inside that pod via iptables. The ambient server will additionally watch enabled namespaces and enroll already-started-but-newly-enrolled pods in a similar fashion.
88

99
## Development
1010

11-
The Istio cni-plugin has a hard dependency on Linux. Some efforts have been made to allow non-funtional builds on non-Linux OSes but these are not universal. For most any reasonable intents and purposes only building on Linux is supported. If you are on a non-Linux development environment use `make shell`.
11+
The Istio cni-plugin has a hard dependency on Linux. Some efforts have been made to allow non-functional builds on non-Linux OSes but these are not universal. For most any reasonable intents and purposes only building on Linux is supported. If you are on a non-Linux development environment use `make shell`.
1212

1313
Most any Linux architecture supported by Go should work. Istio is only tested on AMD64 and ARM64.
1414

@@ -35,7 +35,7 @@ Broadly, `istio-cni` accomplishes ambient redirection by instructing ztunnel to
3535

3636
and setting up iptables rules to funnel traffic thru that socket "tube" to ztunnel and back.
3737

38-
This effectively behaves like ztunnel is an in-pod sidecar, without actually requiring the injection of ztunnel as a sidecar into the pod manifest, or mutatating the application pod in any way.
38+
This effectively behaves like ztunnel is an in-pod sidecar, without actually requiring the injection of ztunnel as a sidecar into the pod manifest, or mutating the application pod in any way.
3939

4040
Additionally, it does not require any network rules/routing/config in the host network namespace, which greatly increases ambient mode compatibility with 3rd-party CNIs. In virtually all cases, this "in-pod" ambient CNI is exactly as compatible with 3rd-party CNIs as sidecars are/were.
4141

@@ -71,8 +71,8 @@ The annotation based control is currently only supported in 'sidecar' mode. See
7171

7272
- redirectMode allows TPROXY may to be set, required envoy has extra permissions. Default is redirect.
7373
- includeIPCidr, excludeIPCidr
74-
- includeInboudPorts, excludeInboundPorts
75-
- includeOutboutPorts, excludeOutboundPorts
74+
- includeInboundPorts, excludeInboundPorts
75+
- includeOutboundPorts, excludeOutboundPorts
7676
- excludeInterfaces
7777
- kubevirtInterfaces (deprecated), reroute-virtual-interfaces
7878
- ISTIO_META_DNS_CAPTURE env variable on the proxy - enables dns redirect

cni/pkg/cmd/root.go

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ var rootCmd = &cobra.Command{
112112
if err != nil {
113113
return fmt.Errorf("failed to instantiate ambient enablement selector: %v", err)
114114
}
115+
116+
if cfg.InstallConfig.NativeNftables && cfg.InstallConfig.ForceIptablesBinary != "" {
117+
log.Warn("NativeNftables is enabled along with ForceIptablesBinary. Using native nftables and ignoring iptables")
118+
}
119+
115120
ambientAgent, err := nodeagent.NewServer(ctx, watchServerReady, cniEventAddr,
116121
nodeagent.AmbientArgs{
117122
SystemNamespace: nodeagent.SystemNamespace,
@@ -122,6 +127,7 @@ var rootCmd = &cobra.Command{
122127
EnableIPv6: cfg.InstallConfig.AmbientIPv6,
123128
ReconcilePodRulesOnStartup: cfg.InstallConfig.AmbientReconcilePodRulesOnStartup,
124129
NativeNftables: cfg.InstallConfig.NativeNftables,
130+
ForceIptablesBinary: cfg.InstallConfig.ForceIptablesBinary,
125131
})
126132
if err != nil {
127133
return fmt.Errorf("failed to create ambient nodeagent service: %v", err)
@@ -324,7 +330,8 @@ func constructConfig() (*config.Config, error) {
324330
AmbientDisableSafeUpgrade: viper.GetBool(constants.AmbientDisableSafeUpgrade),
325331
AmbientReconcilePodRulesOnStartup: viper.GetBool(constants.AmbientReconcilePodRulesOnStartup),
326332

327-
NativeNftables: viper.GetBool(constants.NativeNftables),
333+
NativeNftables: viper.GetBool(constants.NativeNftables),
334+
ForceIptablesBinary: os.Getenv("FORCE_IPTABLES_BINARY"),
328335
}
329336

330337
if len(installCfg.K8sNodeName) == 0 {
@@ -342,20 +349,21 @@ func constructConfig() (*config.Config, error) {
342349
}
343350

344351
repairCfg := config.RepairConfig{
345-
Enabled: viper.GetBool(constants.RepairEnabled),
346-
RepairPods: viper.GetBool(constants.RepairRepairPods),
347-
DeletePods: viper.GetBool(constants.RepairDeletePods),
348-
LabelPods: viper.GetBool(constants.RepairLabelPods),
349-
LabelKey: viper.GetString(constants.RepairLabelKey),
350-
LabelValue: viper.GetString(constants.RepairLabelValue),
351-
NodeName: viper.GetString(constants.RepairNodeName),
352-
SidecarAnnotation: viper.GetString(constants.RepairSidecarAnnotation),
353-
InitContainerName: viper.GetString(constants.RepairInitContainerName),
354-
InitTerminationMsg: viper.GetString(constants.RepairInitTerminationMsg),
355-
InitExitCode: viper.GetInt(constants.RepairInitExitCode),
356-
LabelSelectors: viper.GetString(constants.RepairLabelSelectors),
357-
FieldSelectors: viper.GetString(constants.RepairFieldSelectors),
358-
NativeNftables: viper.GetBool(constants.NativeNftables),
352+
Enabled: viper.GetBool(constants.RepairEnabled),
353+
RepairPods: viper.GetBool(constants.RepairRepairPods),
354+
DeletePods: viper.GetBool(constants.RepairDeletePods),
355+
LabelPods: viper.GetBool(constants.RepairLabelPods),
356+
LabelKey: viper.GetString(constants.RepairLabelKey),
357+
LabelValue: viper.GetString(constants.RepairLabelValue),
358+
NodeName: viper.GetString(constants.RepairNodeName),
359+
SidecarAnnotation: viper.GetString(constants.RepairSidecarAnnotation),
360+
InitContainerName: viper.GetString(constants.RepairInitContainerName),
361+
InitTerminationMsg: viper.GetString(constants.RepairInitTerminationMsg),
362+
InitExitCode: viper.GetInt(constants.RepairInitExitCode),
363+
LabelSelectors: viper.GetString(constants.RepairLabelSelectors),
364+
FieldSelectors: viper.GetString(constants.RepairFieldSelectors),
365+
NativeNftables: viper.GetBool(constants.NativeNftables),
366+
ForceIptablesBinary: os.Getenv("FORCE_IPTABLES_BINARY"),
359367
}
360368

361369
return &config.Config{InstallConfig: installCfg, RepairConfig: repairCfg}, nil

cni/pkg/config/config.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ type InstallConfig struct {
158158

159159
// Whether native nftables should be used instead of iptable rules for traffic redirection
160160
NativeNftables bool
161+
162+
// Choose which iptables binary to use (legacy or nft)
163+
ForceIptablesBinary string
161164
}
162165

163166
// RepairConfig struct defines the Istio CNI race repair configuration
@@ -175,7 +178,7 @@ type RepairConfig struct {
175178
// Whether to fix race condition by repairing them
176179
RepairPods bool
177180

178-
// Whether to fix race condition by delete broken pods
181+
// Whether to fix race condition by deleting broken pods
179182
DeletePods bool
180183

181184
// Whether to label broken pods
@@ -194,6 +197,9 @@ type RepairConfig struct {
194197

195198
// Whether to repair pods by running nftables rules
196199
NativeNftables bool
200+
201+
// Choose which iptables binary to use (legacy or nft)
202+
ForceIptablesBinary string
197203
}
198204

199205
func (c InstallConfig) String() string {
@@ -231,6 +237,7 @@ func (c InstallConfig) String() string {
231237
b.WriteString("AmbientReconcilePodRulesOnStartup: " + fmt.Sprint(c.AmbientReconcilePodRulesOnStartup) + "\n")
232238

233239
b.WriteString("NativeNftables: " + fmt.Sprint(c.NativeNftables) + "\n")
240+
b.WriteString("ForceIptablesBinary: " + fmt.Sprint(c.ForceIptablesBinary) + "\n")
234241
return b.String()
235242
}
236243

@@ -249,5 +256,6 @@ func (c RepairConfig) String() string {
249256
b.WriteString("LabelSelectors: " + c.LabelSelectors + "\n")
250257
b.WriteString("FieldSelectors: " + c.FieldSelectors + "\n")
251258
b.WriteString("NativeNftables: " + fmt.Sprint(c.NativeNftables) + "\n")
259+
b.WriteString("ForceIptablesBinary: " + fmt.Sprint(c.ForceIptablesBinary) + "\n")
252260
return b.String()
253261
}

0 commit comments

Comments
 (0)