소스 검색

adding prestop hook

afeiszli 3 년 전
부모
커밋
68c7b87717
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      k8s/client/netclient-daemonset.yaml

+ 4 - 0
k8s/client/netclient-daemonset.yaml

@@ -25,6 +25,10 @@ spec:
           name: etc-netclient
         securityContext:
           privileged: true
+        lifecycle:
+          preStop:
+            exec:
+              command: ["/root/netclient","uninstall"]
       volumes:
       - hostPath:
           # change path for every netclient deployed, e.g. /etc/netclient-1, /etc/netclient-2, etc.