Skip to content

v0.0.1

Latest
Compare
Choose a tag to compare
@bivas bivas released this 12 Feb 14:35

Release Notes for v0.0.1

New Features

  • Initial release of kubectl-protected plugin.
  • Added functionality to check if the current Kubernetes cluster is protected.
  • Supports defining protected clusters using a YAML file.
  • Command-line options:
    • --silence-error-on-protected: Exit without error if the cluster is protected.
    • --protected-file-path: Path to the file containing the list of protected clusters (default: $HOME/.kube/protected.yaml).

Installation

Option 1: Compile from Source

  1. Clone the repository:
    git clone https://github.com/bivas/kubectl-protected.git
    cd kubectl-protected
  2. Build the plugin:
    go build -o kubectl-protected cmd/protected/main.go
  3. Move the binary to a directory in your PATH:
    mv kubectl-protected /usr/local/bin/
  4. Verify the installation:
    kubectl protected --help

Option 2: Download from Releases

  1. Visit the releases page of the project.
  2. Download the appropriate binary for your operating system.
  3. Move the binary to a directory in your PATH:
    mv kubectl-protected /usr/local/bin/
  4. Verify the installation:
    kubectl protected --help

Usage

  1. Create a YAML file that lists the protected clusters. By default, the plugin looks for this file at $HOME/.kube/protected.yaml.

Example protected.yaml:

protected:
  - cluster1
  - .*pattern.*
  1. Run the plugin to check if the current Kubernetes cluster is protected:
    kubectl protected

Example with command-line options:

kubectl protected --protected-file-path /path/to/protected.yaml --silence-error-on-protected

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for details.