File tree Expand file tree Collapse file tree 8 files changed +579
-10
lines changed Expand file tree Collapse file tree 8 files changed +579
-10
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : batch/v1
2
+ kind : Job
3
+ metadata :
4
+ name : warp-job
5
+ spec :
6
+ template :
7
+ spec :
8
+ containers :
9
+ - name : warp-job
10
+ env :
11
+ - name : WARP_ACCESS_KEY
12
+ - name : WARP_SECRET_KEY
13
+ image : " minio/warp:latest"
14
+ imagePullPolicy : Always
15
+ restartPolicy : Never
16
+ backoffLimit : 0
17
+
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Service
3
+ metadata :
4
+ name : warp
5
+ labels :
6
+ app : warp
7
+ spec :
8
+ publishNotReadyAddresses : true
9
+ clusterIP : None
10
+ ports :
11
+ - port : 7761
12
+ name : warp
13
+ selector :
14
+ app : warp
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : StatefulSet
3
+ metadata :
4
+ name : warp
5
+ labels :
6
+ app : warp
7
+ spec :
8
+ serviceName : warp
9
+ podManagementPolicy : Parallel
10
+ replicas : 1
11
+ selector :
12
+ matchLabels :
13
+ app : warp
14
+ template :
15
+ metadata :
16
+ name : warp
17
+ labels :
18
+ app : warp
19
+ spec :
20
+ affinity :
21
+ podAntiAffinity :
22
+ requiredDuringSchedulingIgnoredDuringExecution :
23
+ - labelSelector :
24
+ matchExpressions :
25
+ - key : app
26
+ operator : In
27
+ values :
28
+ - warp
29
+ topologyKey : " kubernetes.io/hostname"
30
+ containers :
31
+ - name : warp
32
+ image : " minio/warp:latest"
33
+ imagePullPolicy : Always
34
+ args :
35
+ - client
36
+ ports :
37
+ - name : http
38
+ containerPort : 7761
39
+
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ import (
6
6
"fmt"
7
7
"net/http"
8
8
"os"
9
- "os/signal"
10
9
"syscall"
11
10
12
11
"github.com/noobaa/noobaa-operator/v5/pkg/options"
12
+ "github.com/noobaa/noobaa-operator/v5/pkg/util"
13
13
"github.com/sirupsen/logrus"
14
14
)
15
15
@@ -67,13 +67,11 @@ func RunAdmissionServer() {
67
67
log .Infof ("Server running and listening in port: %s" , port )
68
68
69
69
// listening shutdown singal
70
- signalChan := make (chan os.Signal , 1 )
71
- signal .Notify (signalChan , syscall .SIGINT , syscall .SIGTERM )
72
- <- signalChan
73
-
74
- log .Info ("Got shutdown signal, shutting down webhook server gracefully..." )
75
- err = server .Shutdown (context .Background ())
76
- if err != nil {
77
- log .Info ("Failed to Shutdown admission server" )
78
- }
70
+ util .OnSignal (func () {
71
+ log .Info ("Got shutdown signal, shutting down webhook server gracefully..." )
72
+ err = server .Shutdown (context .Background ())
73
+ if err != nil {
74
+ log .Info ("Failed to Shutdown admission server" )
75
+ }
76
+ }, syscall .SIGINT , syscall .SIGTERM )
79
77
}
You can’t perform that action at this time.
0 commit comments