Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master #1

Merged
merged 6 commits into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,33 @@ If you want to build it yourself later, you can change into the source directory

### Code completion

To load completion for bash env run
#### BASH

. <(hetzner-kube completion)
To load completion run

To configure your bash shell to load completions for each session add to your `.bashrc` file:
source <(hetzner-kube completion bash)

To configure your bash shell to load completions for each session add to your "~/.bashrc" file

# ~/.bashrc or ~/.profile
. <(hetzner-kube completion)
echo 'source <(hetzner-kube completion bash)\n' >> ~/.bashrc

Or you can add it to your `bash_completition.d` folder:

# On linux
hetzner-kube completion > /etc/bash_completion.d/hetzner-kube
hetzner-kube completion bash > /etc/bash_completion.d/hetzner-kube
# On OSX with completion installed via brew (`brew intall bash-completion`)
hetzner-kube completion > /usr/local/etc/bash_completion.d/hetzner-kube
hetzner-kube completion bash > /usr/local/etc/bash_completion.d/hetzner-kube

#### ZSH

To load completion run

source <(hetzner-kube completion zsh)

To configure your zsh shell to load completions for each session add to your "~/.zshrc" file

echo 'source <(hetzner-kube completion zsh)\n' >> ~/.zshrc

## Usage

Expand Down
14 changes: 0 additions & 14 deletions cmd/cluster.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down
15 changes: 1 addition & 14 deletions cmd/cluster_add_external_worker.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down Expand Up @@ -188,6 +174,7 @@ An external server must meet the following requirements:

func init() {
clusterCmd.AddCommand(clusterAddExternalWorkerCmd)

clusterAddExternalWorkerCmd.Flags().StringP("name", "n", "", "Name of the cluster to add the workers to")
clusterAddExternalWorkerCmd.Flags().StringP("ip", "i", "", "The IP address of the external node")
}
15 changes: 1 addition & 14 deletions cmd/cluster_add_worker.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down Expand Up @@ -142,6 +128,7 @@ You can specify the worker server type as in cluster create.`,

func init() {
clusterCmd.AddCommand(clusterAddWorkerCmd)

clusterAddWorkerCmd.Flags().StringP("name", "", "", "Name of the cluster to add the workers to")
clusterAddWorkerCmd.Flags().String("worker-server-type", "cx11", "Server type used of workers")
clusterAddWorkerCmd.Flags().IntP("nodes", "n", 2, "Number of nodes for the cluster")
Expand Down
16 changes: 1 addition & 15 deletions cmd/cluster_addon.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand All @@ -34,8 +20,8 @@ var clusterAddonCmd = &cobra.Command{

func init() {
clusterCmd.AddCommand(clusterAddonCmd)

}

func validateAddonSubCommand(cmd *cobra.Command, args []string) error {
name, err := cmd.Flags().GetString("name")
if err != nil {
Expand Down
15 changes: 1 addition & 14 deletions cmd/cluster_addon_install.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down Expand Up @@ -52,5 +38,6 @@ var clusterAddonInstallCmd = &cobra.Command{

func init() {
clusterAddonCmd.AddCommand(clusterAddonInstallCmd)

clusterAddonInstallCmd.Flags().StringP("name", "n", "", "Name of the cluster")
}
14 changes: 0 additions & 14 deletions cmd/cluster_addon_list.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down
15 changes: 1 addition & 14 deletions cmd/cluster_addon_uninstall.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down Expand Up @@ -52,5 +38,6 @@ var clusterAddonUninstallCmd = &cobra.Command{

func init() {
clusterAddonCmd.AddCommand(clusterAddonUninstallCmd)

clusterAddonUninstallCmd.Flags().StringP("name", "n", "", "Name of the cluster")
}
14 changes: 0 additions & 14 deletions cmd/cluster_create.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down
25 changes: 1 addition & 24 deletions cmd/cluster_delete.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down Expand Up @@ -78,15 +64,6 @@ var clusterDeleteCmd = &cobra.Command{

func init() {
clusterCmd.AddCommand(clusterDeleteCmd)
clusterDeleteCmd.Flags().StringP("name", "n", "", "Name of the cluster to delete")

// Here you will define your flags and configuration settings.

// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// clusterDeleteCmd.PersistentFlags().String("foo", "", "A help for foo")

// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// clusterDeleteCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
clusterDeleteCmd.Flags().StringP("name", "n", "", "Name of the cluster to delete")
}
24 changes: 0 additions & 24 deletions cmd/cluster_kubeconfig.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down Expand Up @@ -117,14 +103,4 @@ func init() {
clusterKubeconfigCmd.Flags().BoolP("print", "p", false, "prints output to stdout")
clusterKubeconfigCmd.Flags().BoolP("backup", "b", false, "saves existing config")
clusterKubeconfigCmd.Flags().BoolP("force", "f", false, "don't ask to overwrite")

// Here you will define your flags and configuration settings.

// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// clusterKubeconfigCmd.PersistentFlags().String("foo", "", "A help for foo")

// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// clusterKubeconfigCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
24 changes: 0 additions & 24 deletions cmd/cluster_list.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down Expand Up @@ -51,14 +37,4 @@ var clusterListCmd = &cobra.Command{

func init() {
clusterCmd.AddCommand(clusterListCmd)

// Here you will define your flags and configuration settings.

// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// clusterListCmd.PersistentFlags().String("foo", "", "A help for foo")

// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// clusterListCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
14 changes: 0 additions & 14 deletions cmd/cluster_master_ip.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down
16 changes: 1 addition & 15 deletions cmd/cluster_remove_external_worker.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
Expand Down Expand Up @@ -85,7 +71,7 @@ var clusterRemoveExternalWorkerCmd = &cobra.Command{

func init() {
clusterCmd.AddCommand(clusterRemoveExternalWorkerCmd)

clusterRemoveExternalWorkerCmd.Flags().StringP("name", "n", "", "Name of the cluster where to remove the worker")
clusterRemoveExternalWorkerCmd.Flags().StringP("ip", "i", "", "The IP address of the external node")

}
Loading