This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sidecar-injection: provide granular control for injection (#1638)
Currently it is not possible to enroll specific pods within the mesh for sidecar injection without enrolling the entire namespace. This behavior is not desirable when several application pods run in the same namespace and only certain pods need to be enrolled in the mesh with a sidecar. This change decouples the sidecar injection for pods from the namespace monitoring workflow. A pod will be injected with the sidecar if its namespace is monitored, and either of the following are true: 1. The pod is explicitly enabled for injection 2. The namespace is enabled for injection and the pod is not explicitly disabled for injection This change also extends the `osm namespace add` command with an `--enable-sidecar-injection` flag which automatically adds the sidecar injection annotation on the namespace. Similarly, the `osm namespace remove` command is updated to remove the annotation if present. It also fixes an existing bug in the `osm namespace remove` command where all the labels are removed instead of just the monitor label. Additionally, tests are updated to check for the labels and annotations as expected. Resolves #1617 Signed-off-by: Shashank Ram <shashank08@gmail.com>
- Loading branch information
1 parent
6a2b9bf
commit 8266205
Showing
12 changed files
with
603 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.