Skip to content

Commit 065cfbe

Browse files
IlyesbdlalaJ12934
authored andcommitted
#150 Added auto-gen files and config
Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
1 parent 92e8a1e commit 065cfbe

File tree

5 files changed

+29
-2
lines changed

5 files changed

+29
-2
lines changed

operator/.vscode/launch.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "Start Operator (minio)",
99
"type": "go",
1010
"request": "launch",
11-
"mode": "auto",
11+
"mode": "debug",
1212
"program": "main.go",
1313
"env": {
1414
"MINIO_ACCESS_KEY": "minioadmin",
@@ -26,6 +26,16 @@
2626
"request": "launch",
2727
"mode": "auto",
2828
"program": "main.go"
29+
},
30+
{
31+
"name": "Debug Unit Tests",
32+
"type": "go",
33+
"request": "launch",
34+
"mode": "test",
35+
"program": "${workspaceFolder}/controllers/execution",
36+
"args": ["-test.v"],
37+
//"preLaunchTask": "makefileMagic",
38+
"env": {"KUBEBUILDER_ASSETS": "${workspaceFolder}/testbin/bin"}
2939
}
3040
]
3141
}

operator/.vscode/tasks.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "makefileMagic",
6+
"command": "bash",
7+
"args": ["-c", "source ${workspaceFolder}/testbin/setup-envtest.sh && fetch_envtest_tools ${workspaceFolder}/testbin && setup_envtest_env ${workspaceFolder}/testbin"],
8+
"type": "shell"
9+
},
10+
]
11+
}

operator/config/crd/bases/execution.securecodebox.io_scheduledscans.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4240,6 +4240,10 @@ spec:
42404240
type: object
42414241
type: array
42424242
type: object
4243+
schedule:
4244+
description: The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
4245+
minLength: 0
4246+
type: string
42434247
successfulJobsHistoryLimit:
42444248
description: SuccessfulJobsHistoryLimit determines how many past Scans
42454249
will be kept until the oldest one will be deleted, defaults to 3.
@@ -4248,7 +4252,6 @@ spec:
42484252
minimum: 0
42494253
type: integer
42504254
required:
4251-
- interval
42524255
- scanSpec
42534256
type: object
42544257
status:

operator/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ require (
6666
github.com/prometheus/client_model v0.2.0 // indirect
6767
github.com/prometheus/common v0.34.0 // indirect
6868
github.com/prometheus/procfs v0.7.3 // indirect
69+
github.com/robfig/cron v1.2.0
6970
github.com/rs/xid v1.4.0 // indirect
7071
github.com/sirupsen/logrus v1.8.1 // indirect
7172
github.com/spf13/pflag v1.0.5 // indirect

operator/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
483483
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
484484
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
485485
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
486+
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
487+
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
486488
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
487489
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
488490
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=

0 commit comments

Comments
 (0)