Skip to content

Commit fdc7247

Browse files
authored
Merge pull request #788 from SchSeba/daemon_redesign
Daemon redesign - using controller-runtime
2 parents d7c9458 + 3e6b91c commit fdc7247

File tree

34 files changed

+1517
-1289
lines changed

34 files changed

+1517
-1289
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,19 @@ jobs:
4040
- name: Check out code into the Go module directory
4141
uses: actions/checkout@v2
4242

43-
- name: test pkg
44-
run: make test-pkg
43+
- name: test pkg on kubernetes
44+
run: CLUSTER_TYPE=kubernetes make test-pkg
45+
46+
- name: test pkg on openshift
47+
run: CLUSTER_TYPE=openshift make test-pkg
4548

4649
- name: test cmd
4750
run: make test-cmd
4851

4952
- name: test api
5053
run: make test-api
5154

52-
- name: test controllers on opensfhit
55+
- name: test controllers on openshift
5356
run: CLUSTER_TYPE=openshift make test-controllers
5457

5558
- name: test controllers on kubernetes

bindata/manifests/sriov-config-service/kubernetes/sriov-config-post-network-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ contents: |
66
77
[Service]
88
Type=oneshot
9-
ExecStart=/var/lib/sriov/sriov-network-config-daemon -v 2 --zap-log-level 2 service --phase post
9+
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase post
1010
StandardOutput=journal+console
1111
1212
[Install]

bindata/manifests/sriov-config-service/kubernetes/sriov-config-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ contents: |
77
88
[Service]
99
Type=oneshot
10-
ExecStart=/var/lib/sriov/sriov-network-config-daemon -v 2 --zap-log-level 2 service --phase pre
10+
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase pre
1111
StandardOutput=journal+console
1212
1313
[Install]

bindata/manifests/sriov-config-service/openshift/sriov-config-service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
2222
[Service]
2323
Type=oneshot
24-
ExecStart=/var/lib/sriov/sriov-network-config-daemon service -v {{ .LogLevel }} --zap-log-level {{ .LogLevel }} --phase pre
24+
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase pre
2525
StandardOutput=journal+console
2626
2727
[Install]
@@ -38,7 +38,7 @@ spec:
3838
3939
[Service]
4040
Type=oneshot
41-
ExecStart=/var/lib/sriov/sriov-network-config-daemon service -v {{ .LogLevel }} --zap-log-level {{ .LogLevel }} --phase post
41+
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase post
4242
StandardOutput=journal+console
4343
4444
[Install]

cmd/sriov-network-config-daemon/service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func runServiceCmd(cmd *cobra.Command, args []string) error {
8585
}
8686
// init logger
8787
snolog.InitLog()
88+
snolog.SetLogLevel(2)
8889
setupLog := log.Log.WithName("sriov-config-service").WithValues("phase", phaseArg)
8990

9091
setupLog.V(0).Info("Starting sriov-config-service", "version", version.Version)
@@ -168,7 +169,7 @@ func phasePre(setupLog logr.Logger, conf *systemd.SriovConfig, hostHelpers helpe
168169

169170
func phasePost(setupLog logr.Logger, conf *systemd.SriovConfig, hostHelpers helper.HostHelpersInterface) error {
170171
setupLog.V(0).Info("check result of the Pre phase")
171-
prePhaseResult, err := systemd.ReadSriovResult()
172+
prePhaseResult, _, err := systemd.ReadSriovResult()
172173
if err != nil {
173174
return fmt.Errorf("failed to read result of the pre phase: %v", err)
174175
}

0 commit comments

Comments
 (0)