Skip to content

Commit 6dfd03f

Browse files
authored
Fix operator crash at startup with missing apis (#1699)
1 parent 9358d74 commit 6dfd03f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/pkg/cluster/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (c *Info) fetchAvailableAPIs(ctx context.Context, client *discovery.Discove
6868
for apiName := range c.apisMap {
6969
if hasAPI(apiName, resources) {
7070
c.apisMap[apiName] = true
71-
} else {
71+
} else if discErr != nil {
7272
// Check if the wanted API is in error
7373
for gv, err := range discErr.Groups {
7474
if strings.Contains(apiName, gv.String()) {

0 commit comments

Comments
 (0)