Skip to content

Commit

Permalink
fix: update libk8soci
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kotzbauer <[email protected]>
  • Loading branch information
ckotzbauer committed Jun 19, 2022
1 parent fecc9ce commit c5ace22
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/anchore/syft v0.48.1
github.com/ckotzbauer/libk8soci v0.0.0-20220618141744-5d23eb2eeea7
github.com/ckotzbauer/libk8soci v0.0.0-20220619090832-e2ab03f1c147
github.com/novln/docker-parser v1.0.0
github.com/nscuro/dtrack-client v0.6.0
github.com/robfig/cron v1.2.0
Expand Down Expand Up @@ -103,6 +103,7 @@ require (
github.com/xanzy/ssh-agent v0.3.0 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect
golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect
golang.org/x/tools v0.1.10 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLI
github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs=
github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
github.com/ckotzbauer/libk8soci v0.0.0-20220618141744-5d23eb2eeea7 h1:femLWHdpj7arNUzYxsIrhv4+fzaAqVSAnUxhz2bWZi4=
github.com/ckotzbauer/libk8soci v0.0.0-20220618141744-5d23eb2eeea7/go.mod h1:MuZMhEXIeKexg2qhJVtYc3xNo15g63M9d1ArjKSCXU4=
github.com/ckotzbauer/libk8soci v0.0.0-20220619090832-e2ab03f1c147 h1:JFCyIG3cuWioiqHev9wQ2bIUeqnIW+RkEeMrTQRzLnc=
github.com/ckotzbauer/libk8soci v0.0.0-20220619090832-e2ab03f1c147/go.mod h1:aWyQlE59uqprR2BxAgryFaULVxb8fMy4EH+WpInGz0o=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
Expand Down Expand Up @@ -1307,6 +1307,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=
golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d h1:vtUKgx8dahOomfFzLREU8nSv25YHnTgLBn4rDnWZdU0=
golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand Down
7 changes: 3 additions & 4 deletions internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ func (c *CronService) runBackgroundService() {
running = false
}

func (c *CronService) executeSyftScans(format string, k8s *kubernetes.KubeClient,
containerImages []libk8s.KubeImage, allImages map[string]libk8s.KubeImage) {
func (c *CronService) executeSyftScans(format string, k8s *kubernetes.KubeClient, containerImages []libk8s.KubeImage, allImages []libk8s.KubeImage) {
sy := syft.New(format)

for _, image := range containerImages {
Expand All @@ -119,9 +118,9 @@ func (c *CronService) executeSyftScans(format string, k8s *kubernetes.KubeClient
}
}

/*for _, t := range c.targets {
for _, t := range c.targets {
t.Cleanup(allImages)
}*/
}
}

func executeJobImage(k8s *kubernetes.KubeClient, containerImages []libk8s.KubeImage) {
Expand Down
2 changes: 1 addition & 1 deletion internal/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewClient(ignoreAnnotations bool) *KubeClient {
return &KubeClient{Client: client, ignoreAnnotations: ignoreAnnotations, SbomOperatorNamespace: sbomOperatorNamespace}
}

func (client *KubeClient) LoadImageInfos(namespaces []corev1.Namespace, podLabelSelector string) ([]libk8s.KubeImage, map[string]libk8s.KubeImage) {
func (client *KubeClient) LoadImageInfos(namespaces []corev1.Namespace, podLabelSelector string) ([]libk8s.KubeImage, []libk8s.KubeImage) {
fallbackPullSecretName := viper.GetString(internal.ConfigKeyFallbackPullSecret)
var fallbackPullSecret []oci.KubeCreds

Expand Down

0 comments on commit c5ace22

Please sign in to comment.