Skip to content

Instantly share code, notes, and snippets.

@chavafg
Created July 28, 2020 22:20
Show Gist options
  • Save chavafg/708e34855a0e50c8b6ec168a6fd51e0d to your computer and use it in GitHub Desktop.
Save chavafg/708e34855a0e50c8b6ec168a6fd51e0d to your computer and use it in GitHub Desktop.
diff --git a/kata-webhook/main.go b/kata-webhook/main.go
index 71cad03..b2ba8af 100644
--- a/kata-webhook/main.go
+++ b/kata-webhook/main.go
@@ -49,6 +49,10 @@ func annotatePodMutator(ctx context.Context, obj metav1.Object) (bool, error) {
return false, nil
}
+ if pod.GetNamespace() == "sonobuoy" {
+ fmt.Println("sonobuoy pods will not be changed to kata," pod.GetNamespace(), pod.GetName())
+ }
+
for i := range pod.Spec.Containers {
if pod.Spec.Containers[i].SecurityContext != nil {
if *pod.Spec.Containers[i].SecurityContext.Privileged {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment