Skip to content

Commit

Permalink
Add note on targetRef + authorization policy in multi-revision enviro…
Browse files Browse the repository at this point in the history
…nment (#3023)

Signed-off-by: Keith Mattix II <[email protected]>
Co-authored-by: Keith Mattix II <[email protected]>
  • Loading branch information
istio-testing and keithmattix authored Dec 13, 2023
1 parent 8237149 commit 8655fab
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 18 deletions.
4 changes: 4 additions & 0 deletions kubernetes/customresourcedefinitions.gen.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion security/v1/authorization_policy.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions security/v1/authorization_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -467,19 +467,23 @@ message AuthorizationPolicy {
// in the same namespace as the authorization policy. If the authorization policy is in the root namespace, the selector
// will additionally match with workloads in all namespaces.
//
// If the selector and the targetRef are not set, the selector will match all workloads. At most one of the selector
// If the selector and the targetRef are not set, the selector will match all workloads. At most one of the selector
// and targetRef can be set.
istio.type.v1beta1.WorkloadSelector selector = 1;

// $hide_from_docs
// Optional. The targetRef specifies the gateway the policy should be
// applied to. The targeted resource specified will determine which
// Optional. The targetRef specifies the gateway the policy should be
// applied to. The targeted resource specified will determine which
// workloads the authorization policy applies to. The targeted resource
// must be a `Gateway` in the group `gateway.networking.k8s.io`. The
// gateway must be in the same namespace as the authorization policy.
//
// If not set, the policy is applied as defined by the selector.
// At most one of the selector and targetRef can be set.
//
// NOTE: If you are using the `targetRef` field in a multi-revision environment with Istio versions prior to 1.20,
// it is highly recommended that you pin the authorization policy to a revision running 1.20+ via the istio.io/rev label.
// This is to prevent proxies connected to older istiod control planes (that don't know about the targetRef field)
// from misinterpreting the policy as namespace-wide during the upgrade process.
istio.type.v1beta1.PolicyTargetReference targetRef = 5;

// Optional. A list of rules to match the request. A match occurs when at least one rule matches the request.
Expand Down
1 change: 0 additions & 1 deletion security/v1/request_authentication.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions security/v1/request_authentication.proto
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,8 @@ message RequestAuthentication {
// If not set, the selector will match all workloads. At most one of the selector and targetRef can be set.
istio.type.v1beta1.WorkloadSelector selector = 1;

// $hide_from_docs
// Optional. The targetRef specifies the gateway the policy should be
// applied to. The targeted resource specified will determine which
// Optional. The targetRef specifies the gateway the policy should be
// applied to. The targeted resource specified will determine which
// workloads the request authentication policy to. The targeted resource
// must be a `Gateway` in the group `gateway.networking.k8s.io`. The
// gateway must be in the same namespace as the request authentication
Expand Down
6 changes: 5 additions & 1 deletion security/v1beta1/authorization_policy.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions security/v1beta1/authorization_policy.pb.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions security/v1beta1/authorization_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -467,19 +467,23 @@ message AuthorizationPolicy {
// in the same namespace as the authorization policy. If the authorization policy is in the root namespace, the selector
// will additionally match with workloads in all namespaces.
//
// If the selector and the targetRef are not set, the selector will match all workloads. At most one of the selector
// If the selector and the targetRef are not set, the selector will match all workloads. At most one of the selector
// and targetRef can be set.
istio.type.v1beta1.WorkloadSelector selector = 1;

// $hide_from_docs
// Optional. The targetRef specifies the gateway the policy should be
// applied to. The targeted resource specified will determine which
// Optional. The targetRef specifies the gateway the policy should be
// applied to. The targeted resource specified will determine which
// workloads the authorization policy applies to. The targeted resource
// must be a `Gateway` in the group `gateway.networking.k8s.io`. The
// gateway must be in the same namespace as the authorization policy.
//
// If not set, the policy is applied as defined by the selector.
// At most one of the selector and targetRef can be set.
//
// NOTE: If you are using the `targetRef` field in a multi-revision environment with Istio versions prior to 1.20,
// it is highly recommended that you pin the authorization policy to a revision running 1.20+ via the istio.io/rev label.
// This is to prevent proxies connected to older istiod control planes (that don't know about the targetRef field)
// from misinterpreting the policy as namespace-wide during the upgrade process.
istio.type.v1beta1.PolicyTargetReference targetRef = 5;

// Optional. A list of rules to match the request. A match occurs when at least one rule matches the request.
Expand Down
1 change: 0 additions & 1 deletion security/v1beta1/request_authentication.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions security/v1beta1/request_authentication.pb.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions security/v1beta1/request_authentication.proto
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,8 @@ message RequestAuthentication {
// If not set, the selector will match all workloads. At most one of the selector and targetRef can be set.
istio.type.v1beta1.WorkloadSelector selector = 1;

// $hide_from_docs
// Optional. The targetRef specifies the gateway the policy should be
// applied to. The targeted resource specified will determine which
// Optional. The targetRef specifies the gateway the policy should be
// applied to. The targeted resource specified will determine which
// workloads the request authentication policy to. The targeted resource
// must be a `Gateway` in the group `gateway.networking.k8s.io`. The
// gateway must be in the same namespace as the request authentication
Expand Down

0 comments on commit 8655fab

Please sign in to comment.