Skip to content

Commit

Permalink
doc: add docs for user impersonation
Browse files Browse the repository at this point in the history
Signed-off-by: Logan Cox <[email protected]>
  • Loading branch information
logan-bobo committed Aug 22, 2024
1 parent 9b643ce commit d57eb56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ Flags are:

Directory to output kind logs to (if not specified, the current working directory).

* **`--as`**

The kubernetes user to impersonate for the operation. User could be a regular user or a service account in a namespace.

* **`--config (string)`**

Path to file to load test settings from. This is usually the `kuttl-test.yaml` file.
Expand Down
4 changes: 2 additions & 2 deletions pkg/test/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/envtest"
kindConfig "sigs.k8s.io/kind/pkg/apis/config/v1alpha4"

harness "github.com/kudobuilder/kuttl/pkg/apis/testharness/v1beta1"
"github.com/kudobuilder/kuttl/pkg/file"
"github.com/kudobuilder/kuttl/pkg/http"
"github.com/kudobuilder/kuttl/pkg/k8s"
"github.com/kudobuilder/kuttl/pkg/report"
testutils "github.com/kudobuilder/kuttl/pkg/test/utils"
)
Expand Down Expand Up @@ -253,7 +253,7 @@ func (h *Harness) Config() (*rest.Config, error) {
h.config, err = h.RunKIND()
default:
h.T.Log("running tests using configured kubeconfig.")
h.config, err = config.GetConfig()
h.config, err = k8s.GetConfig()
if err != nil {
return nil, err
}
Expand Down

0 comments on commit d57eb56

Please sign in to comment.