Skip to content

Commit ecac3fb

Browse files
authored
Fix missing kind error ResourceDashboard (#158)
Signed-off-by: Tamal Saha <[email protected]>
1 parent 0960425 commit ecac3fb

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

Dockerfile.dbg

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM appscode/dlv:1.8.3
15+
FROM appscode/dlv:1.9.1
1616

1717
FROM {ARG_FROM}
1818

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ require (
3232
kmodules.xyz/client-go v0.25.6
3333
kmodules.xyz/custom-resources v0.25.0
3434
kmodules.xyz/monitoring-agent-api v0.25.0
35-
kmodules.xyz/resource-metadata v0.13.1
35+
kmodules.xyz/resource-metadata v0.13.2
3636
kmodules.xyz/resource-metrics v0.25.0
3737
kmodules.xyz/sets v0.24.0
3838
kubepack.dev/kubepack v0.5.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1728,8 +1728,8 @@ kmodules.xyz/monitoring-agent-api v0.25.0 h1:RU9RBeCqQdoS381xXy8cM1aqT+7qmtuPI3K
17281728
kmodules.xyz/monitoring-agent-api v0.25.0/go.mod h1:RH5f/W9eCiW+KTblBIh8MZkjCWdtMQ8MuzCBMfgkynM=
17291729
kmodules.xyz/offshoot-api v0.25.0 h1:Svq9da/+sg5afOjpgo9vx2J/Lu90Mo0aFxkdQmgKnGI=
17301730
kmodules.xyz/offshoot-api v0.25.0/go.mod h1:ysEBn7LJuT3+s8ynAQA/OG0BSsJugXa6KGtDLMRjlKo=
1731-
kmodules.xyz/resource-metadata v0.13.1 h1:HRNpbfhyGvY9ECxYJtWFpmHZARCqMRP4HV9oPunawms=
1732-
kmodules.xyz/resource-metadata v0.13.1/go.mod h1:dHFJGeJjPpeyhXL7hdgb81NaQa/AeLAkhy4kSpnpPzE=
1731+
kmodules.xyz/resource-metadata v0.13.2 h1:vG+vN/uuB0bzdcpUYoV2K1x/BmrZ1Zn0ti4KJfSi3kA=
1732+
kmodules.xyz/resource-metadata v0.13.2/go.mod h1:dHFJGeJjPpeyhXL7hdgb81NaQa/AeLAkhy4kSpnpPzE=
17331733
kmodules.xyz/resource-metrics v0.25.0 h1:wj3npVZZQr+Yysg/XdGn4LdT5kQizWeO0zq7QlSVx50=
17341734
kmodules.xyz/resource-metrics v0.25.0/go.mod h1:4a49npnu73c9LGDWHWQsPWoXWXU9rpCcknoH1+HHesI=
17351735
kmodules.xyz/sets v0.24.0 h1:GbltLEPVnURjcmWyf8eFstgJBpm9o151wsrABkByGrc=

vendor/kmodules.xyz/resource-metadata/hub/resourcedashboards/lib.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"github.com/pkg/errors"
3333
ioutilx "gomodules.xyz/x/ioutil"
3434
apierrors "k8s.io/apimachinery/pkg/api/errors"
35-
"k8s.io/apimachinery/pkg/runtime"
35+
"k8s.io/apimachinery/pkg/api/meta"
3636
"k8s.io/apimachinery/pkg/runtime/schema"
3737
"sigs.k8s.io/controller-runtime/pkg/client"
3838
"sigs.k8s.io/yaml"
@@ -112,7 +112,7 @@ func LoadInternalByGVR(gvr schema.GroupVersionResource) (*v1alpha1.ResourceDashb
112112
func LoadByName(kc client.Client, name string) (*v1alpha1.ResourceDashboard, error) {
113113
var ed v1alpha1.ResourceDashboard
114114
err := kc.Get(context.TODO(), client.ObjectKey{Name: name}, &ed)
115-
if runtime.IsNotRegisteredError(err) || apierrors.IsNotFound(err) {
115+
if meta.IsNoMatchError(err) || apierrors.IsNotFound(err) {
116116
return LoadInternalByName(name)
117117
}
118118
return &ed, err

vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/lib.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"github.com/pkg/errors"
3434
ioutilx "gomodules.xyz/x/ioutil"
3535
apierrors "k8s.io/apimachinery/pkg/api/errors"
36+
"k8s.io/apimachinery/pkg/api/meta"
3637
"k8s.io/apimachinery/pkg/runtime/schema"
3738
"k8s.io/klog/v2"
3839
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -122,7 +123,7 @@ func LoadByGVR(kc client.Client, gvr schema.GroupVersionResource) (*v1alpha1.Res
122123
if err == nil {
123124
d, _ := LoadDefaultByGVR(gvr)
124125
return merge(&ed, d), true
125-
} else if client.IgnoreNotFound(err) != nil {
126+
} else if !meta.IsNoMatchError(err) && !apierrors.IsNotFound(err) {
126127
klog.V(3).InfoS(fmt.Sprintf("failed to load resource editor for %+v", gvr))
127128
}
128129
return LoadDefaultByGVR(gvr)

vendor/modules.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ kmodules.xyz/monitoring-agent-api/client
19191919
# kmodules.xyz/offshoot-api v0.25.0
19201920
## explicit; go 1.18
19211921
kmodules.xyz/offshoot-api/api/v1
1922-
# kmodules.xyz/resource-metadata v0.13.1
1922+
# kmodules.xyz/resource-metadata v0.13.2
19231923
## explicit; go 1.18
19241924
kmodules.xyz/resource-metadata/apis/core/install
19251925
kmodules.xyz/resource-metadata/apis/core/v1alpha1

0 commit comments

Comments
 (0)