Skip to content

Commit

Permalink
🔖 preparing initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
chrede88 committed Jan 24, 2024
1 parent de0412a commit 4e8a7b8
Show file tree
Hide file tree
Showing 2,402 changed files with 408 additions and 281 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bugs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 🐛 Bugs
description: Report an issue with the workflow
labels: [bug]
body:
- type: markdown
attributes:
value: |
Please check that a similar issue has not already been opened. [View open issues](https://github.com/chrede88/alfred-kubectl/issues)
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Describe your issue and how to reproduce it, including what you expected to happen.
validations:
required: true
- type: input
id: workflow-version
attributes:
label: Workflow version
description: What version of the workfloe are you using?
placeholder: v1.0.0
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant Alfred log output
description: Please copy and paste any relevant Alfred log output.
render: shell
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: ⚡ Feature Request
url: https://github.com/chrede88/alfred-kubectl/discussions
about: Please use GitHub Discussions for feature requests
- name: 🙋 Question
url: https://github.com/chrede88/alfred-kubectl/discussions
about: Please use GitHub Discussions for questions about the workflow
69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,71 @@

Alfred workflow that can interact with a Kubernetes cluster.

This project is under construction!
## Table of contents
- [Installation](#installation)
- [Usage](#usage)
- [Action Modifiers](#action-modifiers)
- [Workflow Screenshots](#workflow-screenshots)
- [Dependencies](#dependencies)

## Installation
You can install this workflow by downloading the most recent release from [Github](https://github.com/chrede88/alfred-kubectl/releases) or get it through [Alfred Gallery](https://alfred.app/) (not possible yet).

You will be asked to set two variables when first installing the workflow:
1) The path to your kube configuration file.
2) The name of the default kubernetes context you want to use.

The default values will work out of the box for most people.

## Usage
The workflow has two keyword methods:
1) kube
2) kube-context

The latter makes it easy to switch context. This can also be done by pressing `Configure Workflow...` under this workflow in Alfred preferences.

The main keyword `kube` will fire a series of api calls which guides the user through retrieving the resources on the cluster.

The supported global resource types are:
- Node
- Namespace
- PV

The supported namespaced resource types are:
- Pod
- Deployment
- Configmap
- Secret
- Statefulset
- PVC

### Action Modifiers
More details about a resource can be displyed in a Terminal window by hitting <kbd>⌘</kbd><kbd>⏎</kbd> on a selected resource.

Pod resources have two further options:
1) <kbd>⌥</kbd><kbd>⏎</kbd> displays the logs in a Terminal window.
2) <kbd>⌃</kbd><kbd>⏎</kbd> opens an interactive session in a pod, using `/bin/sh`, in a Terminal window.

### Workflow screenshots

Inital promt - pick a resource type
![initial promt](images/initial_promt.png)

Pick a namespace or choose all namespaces
![pick namespace](images/pick_ns.png)

Get resources
![get resources](images/get_resources.png)


## Dependencies

This workflow relies on Python 3 and the following python packages (all shipped with the workflow):
- os
- sys
- json
- kubernetes

The workflow furthermore relies on the `Kubectl` CLI package for fetching details about the resources, pod logs and for executing code in pods (kubectl exec). Both resource details and pod logs will be moved away from kubectl in a later release, but opening interactive sessions into pods can't be done through the python client.

Kubectl can be [installed](https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/) with Homebrew and from binaries.
Binary file added alfred-kubectl.alfredworkflow
Binary file not shown.
Binary file not shown.
Binary file removed dist/dateutil/__pycache__/_version.cpython-310.pyc
Binary file not shown.
Binary file removed dist/dateutil/__pycache__/tzwin.cpython-310.pyc
Binary file not shown.
Binary file removed dist/google/auth/__pycache__/version.cpython-310.pyc
Binary file not shown.
Binary file not shown.
Binary file removed dist/idna/__pycache__/package_data.cpython-310.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed dist/pyasn1/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file removed dist/pyasn1/codec/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed dist/pyasn1/type/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added images/get_resources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/initial_promt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pick_ns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4e8a7b8

Please sign in to comment.