• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

k8snetworkplumbingwg / sriov-network-operator / 19227470377

10 Nov 2025 09:48AM UTC coverage: 62.151% (-0.2%) from 62.366%
19227470377

Pull #902

github

web-flow
Merge f9637c189 into 3d1a472a6
Pull Request #902: Create platform and orchestrator packages

319 of 659 new or added lines in 25 files covered. (48.41%)

41 existing lines in 9 files now uncovered.

8772 of 14114 relevant lines covered (62.15%)

0.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/pkg/orchestrator/kubernetes/kubernetes.go
1
package kubernetes
2

3
import (
4
        "context"
5

6
        corev1 "k8s.io/api/core/v1"
7

8
        "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/consts"
9
)
10

11
// Kubernetes implements the orchestrator.Interface for vanilla Kubernetes clusters.
12
type Kubernetes struct{}
13

14
// New creates a new Kubernetes orchestrator instance.
15
func New() (*Kubernetes, error) {
1✔
16
        return &Kubernetes{}, nil
1✔
17
}
1✔
18

19
// Name returns the name of the Kubernetes orchestrator.
NEW
20
func (k *Kubernetes) Name() string {
×
NEW
21
        return "Kubernetes"
×
NEW
22
}
×
23

24
// ClusterType returns the cluster type for Kubernetes.
25
func (k *Kubernetes) ClusterType() consts.ClusterType {
1✔
26
        return consts.ClusterTypeKubernetes
1✔
27
}
1✔
28

29
// Flavor returns the cluster flavor for vanilla Kubernetes.
30
func (k *Kubernetes) Flavor() consts.ClusterFlavor {
1✔
31
        return consts.ClusterFlavorDefault
1✔
32
}
1✔
33

34
// BeforeDrainNode is a no-op for vanilla Kubernetes as no special preparation is needed.
35
// Always returns true to allow the drain to proceed immediately.
36
func (k *Kubernetes) BeforeDrainNode(_ context.Context, _ *corev1.Node) (bool, error) {
1✔
37
        return true, nil
1✔
38
}
1✔
39

40
// AfterCompleteDrainNode is a no-op for vanilla Kubernetes as no cleanup is needed.
41
// Always returns true to indicate completion.
42
func (k *Kubernetes) AfterCompleteDrainNode(_ context.Context, _ *corev1.Node) (bool, error) {
1✔
43
        return true, nil
1✔
44
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc