Skip to content

Commit

Permalink
Renaming to address PR: kubernetes-sigs/krew-index#3142 from krew review
Browse files Browse the repository at this point in the history
  • Loading branch information
arijitr-citrix committed Aug 2, 2023
1 parent 70927b4 commit 4862797
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 52 deletions.
Binary file removed .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ To install the debugging tools, simply clone the repository to your local machin
git clone https://github.com/netscaler/modern-apps-toolkit.git
```
## Tools Included
- Kubectl **netscaler-k8s** plugin:
NetScaler provides a kubectl plug-in **netscaler-k8s** to inspect ingress controller deployments and aids in troubleshooting operations. You can inspect NetScaler config and related Kubernetes components using the subcommands available with this plug-in. For more information on how to use the plugin, see [Kubectl plugin document](netscaler-k8s-plugin/README.md)
- Kubectl **netscaler** plugin:
NetScaler provides a kubectl plug-in **netscaler** to inspect ingress controller deployments and aids in troubleshooting operations. You can inspect NetScaler config and related Kubernetes components using the subcommands available with this plug-in. For more information on how to use the plugin, see [Kubectl plugin document](netscaler-plugin/README.md)

- CIC Diagnostics Tool:
CIC Diagnostics tool is a simple shell script that collects information related to Citrix Ingress Controller and applications deployed in the Kubernetes cluster.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
project_name: "netscaler-k8s-plugin"
project_name: "netscaler-plugin"
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- binary: kubectl-netscaler_k8s
main: netscaler_k8s/kubectl-netscaler_k8s.go
- binary: kubectl-netscaler
main: netscaler/kubectl-netscaler.go
env:
- CGO_ENABLED=0
goos:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build:
DEBUG=true GOPROXY=direct GOSUMDB=off go mod tidy
DEBUG=true GOPROXY=direct GOSUMDB=off go build -ldflags "-w -s" -buildvcs=false netscaler_k8s/kubectl-netscaler_k8s.go
DEBUG=true GOPROXY=direct GOSUMDB=off go build -ldflags "-w -s" -buildvcs=false netscaler/kubectl-netscaler.go
34 changes: 17 additions & 17 deletions netscaler-k8s-plugin/README.md → netscaler-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ You can install the `kubectl` plug-in by downloading it from the [NetScaler Mode

For Linux:

curl -LO https://github.com/netscaler/modern-apps-toolkit/releases/download/v1.0.0-netscaler-k8s-plugin/netscaler-k8s-plugin_v1.0.0-netscaler-k8s-plugin_Linux_x86_64.tar.gz
gunzip netscaler-k8s-plugin_v1.0.0-netscaler-k8s-plugin_Linux_x86_64.tar.gz
tar -xvf netscaler-k8s-plugin_v1.0.0-netscaler-k8s-plugin_Linux_x86_64.tar
chmod +x kubectl-netscaler_k8s
sudo mv kubectl-netscaler_k8s /usr/local/bin/kubectl-netscaler_k8s
curl -LO https://github.com/netscaler/modern-apps-toolkit/releases/download/v1.0.0-netscaler-plugin/netscaler-plugin_v1.0.0-netscaler-plugin_Linux_x86_64.tar.gz
gunzip netscaler-plugin_v1.0.0-netscaler-plugin_Linux_x86_64.tar.gz
tar -xvf netscaler-plugin_v1.0.0-netscaler-plugin_Linux_x86_64.tar
chmod +x kubectl-netscaler
sudo mv kubectl-netscaler /usr/local/bin/kubectl-netscaler

For Mac:

curl -s -L https://github.com/netscaler/modern-apps-toolkit/releases/download/v1.0.0-netscaler-k8s-plugin/netscaler-k8s-plugin_v1.0.0-netscaler-k8s-plugin_Darwin_x86_64.tar.gz | tar xvz -
chmod +x kubectl-netscaler_k8s
sudo mv kubectl-netscaler_k8s /usr/local/bin/kubectl-netscaler_k8s
curl -s -L https://github.com/netscaler/modern-apps-toolkit/releases/download/v1.0.0-netscaler-plugin/netscaler-plugin_v1.0.0-netscaler-plugin_Darwin_x86_64.tar.gz | tar xvz -
chmod +x kubectl-netscaler
sudo mv kubectl-netscaler /usr/local/bin/kubectl-netscaler

> **Note:** For Mac, you need to enable [allow a developer app](https://support.apple.com/en-in/HT202491)
For Windows:

curl.exe -LO https://github.com/netscaler/modern-apps-toolkit/releases/download/v1.0.0-netscaler-k8s-plugin/netscaler-k8s-plugin_v1.0.0-netscaler-k8s-plugin_Windows_x86_64.zip | tar xvz
curl.exe -LO https://github.com/netscaler/modern-apps-toolkit/releases/download/v1.0.0-netscaler-plugin/netscaler-plugin_v1.0.0-netscaler-plugin_Windows_x86_64.zip | tar xvz

> **Note:** For Windows, you must set you `$PATH` variable to where kubectl-netscaler_k8s.exe file is extracted.
> **Note:** For Windows, you must set you `$PATH` variable to where kubectl-netscaler.exe file is extracted.

The following subcommands are available with this plug in:
Expand All @@ -46,11 +46,11 @@ The following subcommands are available with this plug in:

You can use the `help` command as follows to know about the available commands.

# kubectl netscaler-k8s --help
# kubectl netscaler --help

For more information about a subcommand use the `help` command as follows:

# kubectl netscaler-k8s <command> --help
# kubectl netscaler <command> --help

### Status command

Expand All @@ -72,7 +72,7 @@ The components can be filtered based on either both application prefix (NS_APPS_
The following example shows the status of NetScaler components created by ingress controller with the label `app=cic-tier2-citrix-cpx-with-ingress-controller` and the prefix `plugin2` in the NetScaler namespace.

```
# kubectl netscaler-k8s status -l app=cic-tier2-citrix-cpx-with-ingress-controller -n netscaler -p plugin
# kubectl netscaler status -l app=cic-tier2-citrix-cpx-with-ingress-controller -n netscaler -p plugin
Showing NetScaler components for prefix: plugin2
NAMESPACE INGRESS PORT RESOURCE NAME STATUS
Expand Down Expand Up @@ -100,10 +100,10 @@ The `l` option is used for querying the label of Citrix ingress controller pod.
| --label | -l | Label of the ingress controller deployment. |
| --pod | | Name of the ingress controller pod. |

The following is a sample output for the kubectl netscaler-k8s conf subcommand:
The following is a sample output for the kubectl netscaler conf subcommand:

```
# kubectl netscaler-k8s conf -l app=cic-tier2-citrix-cpx-with-ingress-controller -n netscaler
# kubectl netscaler conf -l app=cic-tier2-citrix-cpx-with-ingress-controller -n netscaler
set ns config -IPAddress 198.168.0.4 -netmask 255.255.255.255
set ns weblogparam -bufferSizeMB 3
Expand Down Expand Up @@ -138,9 +138,9 @@ Flags for support subcommand:
|--unhideIP| | Set this to unhide IP addresses while collecting Kubernetes information. By default, this flag is set to `false`. |
|--skip-nsbundle| |This option disables extraction of techsupport from NetScaler. By default, this flag is set to `false`.|

The following is a sample output for the `kubectl netscaler-k8s support` command.
The following is a sample output for the `kubectl netscaler support` command.

# kubectl netscaler-k8s support -l app=cic-tier2-citrix-cpx-with-ingress-controller -n plugin
# kubectl netscaler support -l app=cic-tier2-citrix-cpx-with-ingress-controller -n plugin
Extracting show tech support information, this may take
minutes.............

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (

"k8s.io/cli-runtime/pkg/genericclioptions"

"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/constant"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/kubectl"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/request"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/util"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/constant"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/kubectl"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/request"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/util"
)

// ConfCmdFlag struct for cobra command arguments for conf sub command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (

"k8s.io/cli-runtime/pkg/genericclioptions"

"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/constant"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/kubectl"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/request"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/util"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/constant"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/kubectl"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/request"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/util"
)

// StatusCmdFlag struct for cobra command arguments for status sub command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"

"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/constant"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/kubectl"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/request"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/util"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/constant"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/kubectl"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/request"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/util"
)

// Constant map for kubernetes objects to query using kubectl get
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion netscaler-k8s-plugin/go.mod → netscaler-plugin/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is a generated file. Do not edit directly.

module github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin
module github.com/netscaler/modern-apps-toolkit/netscaler-plugin

go 1.19

Expand Down
File renamed without changes.
18 changes: 9 additions & 9 deletions netscaler-k8s-plugin/krew.yaml → netscaler-plugin/krew.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: netscaler-k8s
name: netscaler
spec:
shortDescription: A Kubernetes plugin for inspecting Ingress Controller and associated NetScaler deployments
description: |
The official kubectl plugin for netscaler-k8s.
The official kubectl plugin for netscaler.
version: {{ .TagName }}
homepage: https://github.com/netscaler/modern-apps-toolkit/tree/main/netscaler-k8s-plugin#readme
homepage: https://github.com/netscaler/modern-apps-toolkit/tree/main/netscaler-plugin#readme
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
{{addURIAndSha "https://github.com/netscaler/modern-apps-toolkit/releases/download/{{ .TagName }}/netscaler-k8s-plugin_{{ .TagName }}_Darwin_x86_64.tar.gz" .TagName | indent 6 }}
bin: ./kubectl-netscaler_k8s
{{addURIAndSha "https://github.com/netscaler/modern-apps-toolkit/releases/download/{{ .TagName }}/netscaler-plugin_{{ .TagName }}_Darwin_x86_64.tar.gz" .TagName | indent 6 }}
bin: ./kubectl-netscaler
files:
- from: "*"
to: "."
- selector:
matchLabels:
os: linux
arch: amd64
{{addURIAndSha "https://github.com/netscaler/modern-apps-toolkit/releases/download/{{ .TagName }}/netscaler-k8s-plugin_{{ .TagName }}_Linux_x86_64.tar.gz" .TagName | indent 6 }}
bin: ./kubectl-netscaler_k8s
{{addURIAndSha "https://github.com/netscaler/modern-apps-toolkit/releases/download/{{ .TagName }}/netscaler-plugin_{{ .TagName }}_Linux_x86_64.tar.gz" .TagName | indent 6 }}
bin: ./kubectl-netscaler
files:
- from: "*"
to: "."
- selector:
matchLabels:
os: darwin
arch: amd64
{{addURIAndSha "https://github.com/netscaler/modern-apps-toolkit/releases/download/{{ .TagName }}/netscaler-k8s-plugin_{{ .TagName }}_Windows_x86_64.zip" .TagName | indent 6 }}
bin: ./kubectl-netscaler_k8s.exe
{{addURIAndSha "https://github.com/netscaler/modern-apps-toolkit/releases/download/{{ .TagName }}/netscaler-plugin_{{ .TagName }}_Windows_x86_64.zip" .TagName | indent 6 }}
bin: ./kubectl-netscaler.exe
files:
- from: "*"
to: "."
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"strings"
"syscall"

"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/constant"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/util"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/constant"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/util"

apiv1 "k8s.io/api/core/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"fmt"
"os"

"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/commands/conf"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/commands/status"
"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/commands/support"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/commands/conf"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/commands/status"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/commands/support"

"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand All @@ -29,7 +29,7 @@ import (
func main() {

rootCmd := &cobra.Command{
Use: "netscaler-k8s",
Use: "netscaler",
Short: "A Kubernetes plugin for inspecting Ingress Controller and associated NetScaler deployments",
}
rootCmd.CompletionOptions.DisableDefaultCmd = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"errors"
"fmt"

"github.com/netscaler/modern-apps-toolkit/netscaler-k8s-plugin/util"
"github.com/netscaler/modern-apps-toolkit/netscaler-plugin/util"

appsv1 "k8s.io/api/apps/v1"
apiv1 "k8s.io/api/core/v1"
Expand Down
File renamed without changes.

0 comments on commit 4862797

Please sign in to comment.