Skip to content

Commit 8e804d5

Browse files
authored
Merge pull request #4 from riptano/minor-doc-updates
minor doc updates
2 parents 6dfa3a5 + 85176da commit 8e804d5

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# kcloud
2+
23
CLI tool to download kube config settings from various cloud providers. Requires local installation
34
of aws, az, and/or gcloud commands to access the cloud providers.
45

6+
## Install
7+
8+
go install github.com/riptano/kcloud/cmd/kcloud@latest
9+
510
## Usage
611

712
kcloud aws|azr|gcp [profile|subscription|project] [region/cluster]
@@ -18,6 +23,6 @@ of aws, az, and/or gcloud commands to access the cloud providers.
1823

1924
kcloud gcp my-project-dev us-east4/my-cluster
2025

21-
## Build and Install
26+
## Build From Source
2227

2328
make install

cmd/kcloud/aws.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type AWSCmd struct {
2424

2525
func (aws *AWSCmd) Run(ctx *kong.Context) error {
2626
if aws.Profile.Profile == "" {
27-
return AWSPrintConfigProfiles()
27+
return AWSPrintConfigProfiles(DefaultAWSConfigFilePath())
2828
}
2929
if len(aws.Profile.Cluster.Cluster) == 0 {
3030
return aws.AWSListClusters()
@@ -72,9 +72,9 @@ var awsKnownRegions = map[string]struct{}{
7272

7373
const awsCmd = "aws"
7474

75-
// AWSPrintConfigProfiles lists the available profiles
76-
func AWSPrintConfigProfiles() error {
77-
config, err := awsLoadConfig(DefaultAWSConfigFilePath())
75+
// AWSPrintConfigProfiles lists the available profiles in the given config file
76+
func AWSPrintConfigProfiles(configFile string) error {
77+
config, err := awsLoadConfig(configFile)
7878
if err != nil {
7979
return fmt.Errorf("unable to parse AWS credentials: %w", err)
8080
}

cmd/kcloud/azure.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ type AzureCmd struct {
1414
Subscription struct {
1515
Subscription string `arg:"" optional:""`
1616
Cluster struct {
17-
Cluster []string `arg:"" optional:"" name:"region/cluster"`
18-
} `arg:"" name:"region/cluster"`
17+
Cluster []string `arg:"" optional:"" name:"resource-group/cluster"`
18+
} `arg:"" name:"resource-group/cluster"`
1919
} `arg:""`
2020
}
2121

cmd/kcloud/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var cli struct {
1818
Aws AWSCmd `cmd:"" help:"AWS provider" aliases:"amazon,aks"`
1919
}
2020

21-
const description = "Download kubeconfig for various kubernetes cloud providers.\nExample: kcloud gcp my-dev-project us-east4/my-awesome-cluster"
21+
const description = "Download kubeconfig for various kubernetes cloud providers.\nExample: `kcloud gcp my-dev-project us-east4/my-awesome-cluster`"
2222

2323
func main() {
2424
ctx := kong.Parse(&cli,

0 commit comments

Comments
 (0)