Skip to content

Commit

Permalink
Implement IgnoreLabels() IgnoreAnnotations()
Browse files Browse the repository at this point in the history
  • Loading branch information
appilon committed Apr 5, 2024
1 parent 38f6153 commit 78b71c5
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions internal/framework/provider/client/kubernetes_clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ import (
)

type kubernetesClientGetter struct {
config *rest.Config
dynamicClient dynamic.Interface
discoveryClient discovery.DiscoveryInterface
config *rest.Config
dynamicClient dynamic.Interface
discoveryClient discovery.DiscoveryInterface
ignoreLabels []string
ignoreAnnotations []string
}

func NewKubernetesClientGetter(config *rest.Config) KubernetesClientGetter {
func NewKubernetesClientGetter(config *rest.Config, ignoreLabels, ignoreAnnotations []string) KubernetesClientGetter {
return &kubernetesClientGetter{
config: config,
config: config,
ignoreLabels: ignoreLabels,
ignoreAnnotations: ignoreAnnotations,
}
}

Expand Down Expand Up @@ -51,3 +55,11 @@ func (k kubernetesClientGetter) DiscoveryClient() (discovery.DiscoveryInterface,
}
return k.discoveryClient, nil
}

func (k kubernetesClientGetter) IgnoreLabels() []string {
return k.ignoreLabels
}

func (k kubernetesClientGetter) IgnoreAnnotations() []string {
return k.ignoreAnnotations
}

0 comments on commit 78b71c5

Please sign in to comment.