Skip to content
Merged
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
8 changes: 5 additions & 3 deletions pkg/clusters/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,12 @@ func (c *Cluster) Cluster() cluster.Cluster {
// Scheme returns the cluster's scheme.
// Returns nil if the client has not been initialized.
func (c *Cluster) Scheme() *runtime.Scheme {
if c.cluster == nil {
return nil
if c.cluster != nil {
return c.cluster.GetScheme()
} else if c.client != nil {
return c.client.Scheme()
}
return c.cluster.GetScheme()
return nil
}

// APIServerEndpoint returns the cluster's API server endpoint.
Expand Down