Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a namespace selector for admission webhook
This prevents the webhook from being called for the Portieris install namespace, which means that Portieris can recover itself in the case of cluster failure. Without this an approval from the Portieris webhook is needed to okay scaling itself up. This means that with no pods available, the webhook can't approve the recovery of any Portieris pods, and so the cluster deadlocks. This change gives the Portieris chart ownership of the portieris install namespace, and labels it in such a way that we can filter for it in the webhook config. It's configured as an opt out, rather than Istio's which is an opt in. All namespaces without the label are fair game. By adding the namespace into the chart, it'll be deleted by Helm when the chart gets removed. And adding the label selector means that the label could be added to other namespaces to bypass Portieris. Both of these potential issues have been documented in the readme. #112
- Loading branch information
1 parent
850f87d
commit a8dbe38
Showing
3 changed files
with
19 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: {{ .Values.namespace }} | ||
annotations: | ||
"helm.sh/hook": "pre-install" | ||
labels: | ||
securityenforcement.admission.cloud.ibm.com/namespace: skip |