Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemon redesign - using controller-runtime #788

Merged
merged 8 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,19 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: test pkg
run: make test-pkg
- name: test pkg on kubernetes
run: CLUSTER_TYPE=kubernetes make test-pkg

- name: test pkg on openshift
run: CLUSTER_TYPE=openshift make test-pkg

- name: test cmd
run: make test-cmd

- name: test api
run: make test-api

- name: test controllers on opensfhit
- name: test controllers on openshift
run: CLUSTER_TYPE=openshift make test-controllers

- name: test controllers on kubernetes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ contents: |

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon -v 2 --zap-log-level 2 service --phase post
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase post
StandardOutput=journal+console

[Install]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ contents: |

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon -v 2 --zap-log-level 2 service --phase pre
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase pre
StandardOutput=journal+console

[Install]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon service -v {{ .LogLevel }} --zap-log-level {{ .LogLevel }} --phase pre
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase pre
StandardOutput=journal+console

[Install]
Expand All @@ -38,7 +38,7 @@ spec:

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon service -v {{ .LogLevel }} --zap-log-level {{ .LogLevel }} --phase post
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase post
StandardOutput=journal+console

[Install]
Expand Down
3 changes: 2 additions & 1 deletion cmd/sriov-network-config-daemon/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func runServiceCmd(cmd *cobra.Command, args []string) error {
}
// init logger
snolog.InitLog()
snolog.SetLogLevel(2)
setupLog := log.Log.WithName("sriov-config-service").WithValues("phase", phaseArg)

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

func phasePost(setupLog logr.Logger, conf *systemd.SriovConfig, hostHelpers helper.HostHelpersInterface) error {
setupLog.V(0).Info("check result of the Pre phase")
prePhaseResult, err := systemd.ReadSriovResult()
prePhaseResult, _, err := systemd.ReadSriovResult()
if err != nil {
return fmt.Errorf("failed to read result of the pre phase: %v", err)
}
Expand Down
Loading
Loading