Skip to content

Commit

Permalink
renamed plugin from kubectl-os to kubectl-openstack
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Jan 19, 2019
1 parent 0ae3725 commit a613803
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ after_success:
- bash <(curl -s https://codecov.io/bash)

before_deploy:
- cp bazel-bin/cmd/kubectl-os/linux_amd64_pure_stripped/kubectl-os /tmp/kubectl-os
- cp bazel-bin/cmd/kubectl-os/kubectl-os_tar.tar.gz /tmp/kubectl-os.tar.gz
- cp bazel-bin/cmd/kubectl-openstack/linux_amd64_pure_stripped/kubectl-openstack /tmp/kubectl-openstack
- cp bazel-bin/cmd/kubectl-openstack/kubectl-openstack_tar.tar.gz /tmp/kubectl-openstack.tar.gz

deploy:
- provider: releases
api_key: $GITHUB_RELEASE_TOKEN
file:
- /tmp/kubectl-os
- /tmp/kubectl-os.tar.gz
- /tmp/kubectl-openstack
- /tmp/kubectl-openstack.tar.gz
overwrite: true
skip_cleanup: true
on:
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

docker run -it -w /github/workspace -v $(pwd):/github/workspace -v /tmp:/tmp --entrypoint bazel sbueringer/bazel build //cmd/kubectl-os:kubectl-os //cmd/kubectl-os:kubectl-os_tar
docker run -it -w /github/workspace -v $(pwd):/github/workspace -v /tmp:/tmp --entrypoint bazel sbueringer/bazel build //cmd/kubectl-openstack:kubectl-openstack //cmd/kubectl-openstack:kubectl-openstack_tar
10 changes: 5 additions & 5 deletions cmd/kubectl-os/BUILD.bazel → cmd/kubectl-openstack/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
name = "go_default_library",
srcs = ["kubectl-os.go"],
importpath = "github.com/sbueringer/kubectl-openstack-plugin/cmd/kubectl-os",
srcs = ["kubectl-openstack.go"],
importpath = "github.com/sbueringer/kubectl-openstack-plugin/cmd/kubectl-openstack",
visibility = ["//visibility:private"],
deps = [
"//pkg/cmd:go_default_library",
Expand All @@ -13,7 +13,7 @@ go_library(
)

go_binary(
name = "kubectl-os",
name = "kubectl-openstack",
embed = [":go_default_library"],
pure = "on",
visibility = ["//visibility:public"],
Expand All @@ -36,7 +36,7 @@ filegroup(
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")

pkg_tar(
name = "kubectl-os_tar",
srcs = [":kubectl-os"],
name = "kubectl-openstack_tar",
srcs = [":kubectl-openstack"],
extension = "tar.gz",
)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func main() {
flags := pflag.NewFlagSet("kubectl-os", pflag.ExitOnError)
flags := pflag.NewFlagSet("kubectl-openstack", pflag.ExitOnError)
pflag.CommandLine = flags

root := cmd.NewCmdOpenStack(genericclioptions.IOStreams{In: os.Stdin, Out: os.Stdout, ErrOut: os.Stderr})
Expand Down
4 changes: 2 additions & 2 deletions krew/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash


#kubectl krew install --manifest=./krew/os.yaml --archive=bazel-bin/cmd/kubectl-os/kubectl-os_tar.tar.gz
kubectl krew install --manifest=./krew/os.yaml
kubectl krew install --manifest=./krew/openstack.yaml --archive=bazel-bin/cmd/kubectl-openstack/kubectl-openstack_tar.tar.gz
#kubectl krew install --manifest=./krew/openstack.yaml
18 changes: 9 additions & 9 deletions krew/os.yaml → krew/openstack.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: os
name: openstack
spec:
version: "v0.0.6"
version: v0.0.7
platforms:
- selector:
matchExpressions:
- {key: os, operator: In, values: [linux]}
uri: https://github.com/sbueringer/kubectl-openstack-plugin/releases/download/v0.0.6/kubectl-os.tar.gz
sha256: 52b0e3aee5226fd6f0bc75fe5a8d778c9ce12bd82380cd85074aa92ebe8fa035
uri: https://github.com/sbueringer/kubectl-openstack-plugin/releases/download/v0.0.7/kubectl-openstack.tar.gz
sha256: a6e5242b62fea42e10814ae43788afa1e71673d5eb698295dbffa88c39d49f4a
files:
- from: "/kubectl-os"
- from: "/kubectl-openstack"
to: "."
bin: "./kubectl-os"
bin: "./kubectl-openstack"
shortDescription: Extends kubectl with some OpenStack commands
caveats: |
This plugin only works with Kubernetes clusters running on OpenStack.
Expand All @@ -26,10 +26,10 @@ spec:
credentials. Some of these commands are:
# Shows PersistentVolumes joined with the corresponding OpenStack disks
kubectl os volumes
kubectl openstack volumes
# Shows Services joined with the corresponding OpenStack LBaaS objects
kubectl os lb
kubectl openstack lb
# Show Nodes joined with the corresponding OpenStack servers
kubectl os server
kubectl openstack server
2 changes: 1 addition & 1 deletion pkg/cmd/config_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewCmdImportConfig(streams genericclioptions.IOStreams) *cobra.Command {
Use: "import-config",
Aliases: []string{"rc"},
Short: "Import config from OpenStack rc files.",
Example: fmt.Sprintf(importConfigExample, "kubectl os"),
Example: fmt.Sprintf(importConfigExample, "kubectl openstack"),
SilenceUsage: true,
RunE: func(c *cobra.Command, args []string) error {
if err := o.Complete(c, args); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewCmdLB(streams genericclioptions.IOStreams) *cobra.Command {
cmd := &cobra.Command{
Use: "lb",
Short: "List all lb and corresponding services from Kubernetes and OpenStack",
Example: fmt.Sprintf(lbExample, "kubectl os"),
Example: fmt.Sprintf(lbExample, "kubectl openstack"),
SilenceUsage: true,
RunE: func(c *cobra.Command, args []string) error {
if err := o.Complete(c, args); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func NewCmdServer(streams genericclioptions.IOStreams) *cobra.Command {
Use: "server",
Aliases: []string{"srv"},
Short: "List all server from Kubernetes and OpenStack",
Example: fmt.Sprintf(serverExample, "kubectl os"),
Example: fmt.Sprintf(serverExample, "kubectl openstack"),
SilenceUsage: true,
RunE: func(c *cobra.Command, args []string) error {
if err := o.Complete(c, args); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/volume-fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func NewCmdVolumesFix(streams genericclioptions.IOStreams) *cobra.Command {
Use: "volumes-fix",
Aliases: []string{"vsf"},
Short: "Fix volumes from Kubernetes and OpenStack",
Example: fmt.Sprintf(volumesFixExample, "kubectl os"),
Example: fmt.Sprintf(volumesFixExample, "kubectl openstack"),
SilenceUsage: true,
RunE: func(c *cobra.Command, args []string) error {
if err := o.Complete(c, args); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewCmdVolumes(streams genericclioptions.IOStreams) *cobra.Command {
Use: "volumes",
Aliases: []string{"vs"},
Short: "List all volumes from Kubernetes and OpenStack",
Example: fmt.Sprintf(volumesExample, "kubectl os"),
Example: fmt.Sprintf(volumesExample, "kubectl openstack"),
SilenceUsage: true,
RunE: func(c *cobra.Command, args []string) error {
if err := o.Complete(c, args); err != nil {
Expand Down

0 comments on commit a613803

Please sign in to comment.