diff --git a/pkg/kapp/resources/identified_resources_list.go b/pkg/kapp/resources/identified_resources_list.go index 21bb98056..b9c8aefe9 100644 --- a/pkg/kapp/resources/identified_resources_list.go +++ b/pkg/kapp/resources/identified_resources_list.go @@ -38,6 +38,8 @@ func (r IdentifiedResources) List(labelSelector labels.Selector, resRefs []Resou schema.GroupVersionResource{Version: "v1", Resource: "componentstatuses"}, }) + resTypes = NonMatchingGK(resTypes, schema.GroupKind{Group: "cilium.io", Kind: "CiliumIdentity"}) + if len(opts.GKsScope) > 0 { resTypes = MatchingAnyGK(resTypes, opts.GKsScope) } diff --git a/pkg/kapp/resources/resource_types.go b/pkg/kapp/resources/resource_types.go index 654fd1523..8ba7ba0c1 100644 --- a/pkg/kapp/resources/resource_types.go +++ b/pkg/kapp/resources/resource_types.go @@ -270,6 +270,16 @@ func NonMatching(in []ResourceType, ref ResourceRef) []ResourceType { return out } +func NonMatchingGK(in []ResourceType, gk schema.GroupKind) []ResourceType { + var out []ResourceType + for _, item := range in { + if !(GKResourceRef{gk}).Matches(item) { + out = append(out, item) + } + } + return out +} + // TODO: Extend ResourceRef and PartialResourceRefd to allow GVK matching func MatchingAnyGK(in []ResourceType, gks []schema.GroupKind) []ResourceType { var out []ResourceType