Skip to content

Commit

Permalink
Merge pull request #63 from fluxcd/kubeconfig
Browse files Browse the repository at this point in the history
Honour KUBECONFIG environment variable
  • Loading branch information
stefanprodan authored Jun 24, 2020
2 parents 0969a0c + a9f4536 commit 43b00c5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cmd/tk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ func kubeconfigFlag() {
rootCmd.PersistentFlags().StringVarP(&kubeconfig, "kubeconfig", "", "",
"absolute path to the kubeconfig file")
}

if len(os.Getenv("KUBECONFIG")) > 0 {
kubeconfig = os.Getenv("KUBECONFIG")
}
}

func generateDocs() {
Expand Down
23 changes: 21 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ site_description: Documentation for GitOps Toolkit.
site_author: The Flux CD contributors
site_url: https://fluxcd.github.io/toolkit/

# Repository
repo_name: fluxcd/toolkit
repo_url: https://github.com/fluxcd/toolkit
edit_uri: ""
Expand Down Expand Up @@ -48,14 +47,34 @@ nav:
- Kustomization CRD: components/kustomize/kustomization.md
- Kustomize API Reference: components/kustomize/api.md
- Toolkit CLI:
- Overview: cmd/tk.md
- Bootstrap: cmd/tk_bootstrap.md
- Bootstrap github: cmd/tk_bootstrap_github.md
- Bootstrap gitlab: cmd/tk_bootstrap_gitlab.md
- Check: cmd/tk_check.md
- Create: cmd/tk_create.md
- Create kustomization: cmd/tk_create_kustomization.md
- Create source: cmd/tk_create_source.md
- Create source git: cmd/tk_create_source_git.md
- Delete: cmd/tk_delete.md
- Delete kustomization: cmd/tk_delete_kustomization.md
- Delete source: cmd/tk_delete_source.md
- Delete source git: cmd/tk_delete_source_git.md
- Export: cmd/tk_export.md
- Export kustomization: cmd/tk_export_kustomization.md
- Export source: cmd/tk_export_source.md
- Export source git: cmd/tk_export_source_git.md
- Get: cmd/tk_get.md
- Get kustomizations: cmd/tk_get_kustomizations.md
- Get sources: cmd/tk_get_sources.md
- Get sources git: cmd/tk_get_sources_git.md
- Install: cmd/tk_install.md
- Resume: cmd/tk_resume.md
- Resume kustomization: cmd/tk_resume_kustomization.md
- Suspend: cmd/tk_suspend.md
- Synchronize: cmd/tk_sync.md
- Suspend kustomization: cmd/tk_suspend_kustomization.md
- Sync: cmd/tk_sync.md
- Sync kustomization: cmd/tk_sync_kustomization.md
- Sync source: cmd/tk_sync_source.md
- Sync source git: cmd/tk_sync_source_git.md
- Uninstall: cmd/tk_uninstall.md

0 comments on commit 43b00c5

Please sign in to comment.