Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Using kubeaudit as a Go package isn't possible since ClientOptions is in an internal package #347

Closed
1 of 2 tasks
eschley opened this issue Jul 23, 2021 · 3 comments
Closed
1 of 2 tasks

Comments

@eschley
Copy link

eschley commented Jul 23, 2021

ISSUE TYPE
  • Bug Report
  • Feature Idea

BUG REPORT

SUMMARY

The kubeaudit auditors AuditLocal and AuditCluster both require a parameter of ClientOptions that is defined in
"github.com/Shopify/kubeaudit/internal/k8s" which can't be used outside of kubeaudit itself.

Steps To Reproduce

  1. create a new project NOT a test under kubeaudit project.
  2. copy the example code for a Local or Cluster audit from https://pkg.go.dev/github.com/Shopify/kubeaudit
  3. try to run it and you will get this error "use of internal package github.com/Shopify/kubeaudit/internal/k8s not allowed"
ENVIRONMENT
  • Kubeaudit version: main / latest
  • Kubeaudit install method: DIY-BUILD
STEPS TO REPRODUCE
  1. Create a new project, not a test in the kubeaudit package
  2. Copy the code examples for AuditCluster or AuditLocal from https://pkg.go.dev/github.com/Shopify/kubeaudit
  3. Try to compile your project. You will get the following error "use of internal package github.com/Shopify/kubeaudit/internal/k8s not allowed"
EXPECTED RESULTS

Should be able to use kubeaudit as a package
ClientOptions needs to be moved out of the internal package in order for kubeaudit to be used as a Go package.

@ghost
Copy link

ghost commented Jul 23, 2021

Thanks for opening your first issue here! Be sure to follow the issue template!

@genevieveluyt
Copy link
Contributor

Closing this as a duplicate of #298. Feel free to reopen if you disagree!

@genevieveluyt
Copy link
Contributor

Should be fixed by #348

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants