Skip to content

Commit

Permalink
Merge branch 'master' into feature/prettyjson
Browse files Browse the repository at this point in the history
  • Loading branch information
brutus333 authored Jan 27, 2025
2 parents ee42c1a + 9aff93e commit 8f8d47d
Show file tree
Hide file tree
Showing 113 changed files with 762 additions and 587 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
uses: actions/[email protected]

- name: Install Go
uses: actions/setup-go@v5.1.0
uses: actions/setup-go@v5.2.0
with:
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Lint
uses: golangci/golangci-lint-action@v6.1.1
uses: golangci/golangci-lint-action@v6.2.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/[email protected]

- name: Install Go
uses: actions/setup-go@v5.1.0
uses: actions/setup-go@v5.2.0
with:
go-version-file: go.mod
cache-dependency-path: go.sum
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# options for analysis running
run:
# default concurrency is a available CPU number
# default concurrency is an available CPU number
concurrency: 8

# timeout for analysis, e.g. 30s, 5m, default is 1m
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# The base image for building the k9s binary

FROM golang:1.23.3-alpine3.20 AS build
FROM golang:1.23.5-alpine3.20 AS build

WORKDIR /k9s
COPY go.mod go.sum main.go Makefile ./
Expand All @@ -13,14 +13,14 @@ RUN apk --no-cache add --update make libx11-dev git gcc libc-dev curl \
# -----------------------------------------------------------------------------
# Build the final Docker image

FROM alpine:3.20.3
FROM alpine:3.21.2
ARG KUBECTL_VERSION="v1.31.2"

COPY --from=build /k9s/execs/k9s /bin/k9s
RUN apk --no-cache add --update ca-certificates \
&& apk --no-cache add --update -t deps curl vim \
&& TARGET_ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
&& curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${TARGET_ARCH}/kubectl -o /usr/local/bin/kubectl \
&& curl -f -L https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${TARGET_ARCH}/kubectl -o /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl \
&& apk del --purge deps

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Please refer to our [K9s documentation](https://k9scli.io) site for installation

Wanna discuss K9s features with your fellow `K9sers` or simply show your support for this tool?

* Channel: [K9ersSlack](https://k9sers.slack.com/)
* Channel: [K9sersSlack](https://k9sers.slack.com/)
* Invite: [K9slackers Invite](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM)

## Installation
Expand Down Expand Up @@ -396,7 +396,7 @@ You can now override the context portForward default address configuration by se
maxConnRetry: 5
# Indicates whether modification commands like delete/kill/edit are disabled. Default is false
readOnly: false
# Toggles whether k9s should exit when CTRL-C is pressed. When set to true, you will need to exist k9s via the :quit command. Default is false.
# Toggles whether k9s should exit when CTRL-C is pressed. When set to true, you will need to exit k9s via the :quit command. Default is false.
noExitOnCtrlC: false
#UI settings
ui:
Expand All @@ -411,13 +411,13 @@ You can now override the context portForward default address configuration by se
noIcons: false
# Toggles reactive UI. This option provide for watching on disk artifacts changes and update the UI live Defaults to false.
reactive: false
# By default all contexts wil use the dracula skin unless explicitly overridden in the context config file.
# By default all contexts will use the dracula skin unless explicitly overridden in the context config file.
skin: dracula # => assumes the file skins/dracula.yaml is present in the $XDG_DATA_HOME/k9s/skins directory
# Allows to set certain views default fullscreen mode. (yaml, helm history, describe, value_extender, details, logs) Default false
defaultsToFullScreen: false
# Toggles icons display as not all terminal support these chars.
noIcons: false
# Toggles whether k9s should check for the latest revision from the Github repository releases. Default is false.
# Toggles whether k9s should check for the latest revision from the GitHub repository releases. Default is false.
skipLatestRevCheck: false
# When altering kubeconfig or using multiple kube configs, k9s will clean up clusters configurations that are no longer in use. Setting this flag to true will keep k9s from cleaning up inactive cluster configs. Defaults to false.
keepMissingClusters: false
Expand Down Expand Up @@ -661,7 +661,7 @@ K9s allows you to extend your command line and tooling by defining your very own
A plugin is defined as follows:

* Shortcut option represents the key combination a user would type to activate the plugin. Valid values are [a-z], Shift-[A-Z], Ctrl-[A-Z].
* Override option make that the default action related to the shortcut will be overrided by the plugin
* Override option make that the default action related to the shortcut will be overridden by the plugin
* Confirm option (when enabled) lets you see the command that is going to be executed and gives you an option to confirm or prevent execution
* Description will be printed next to the shortcut in the k9s menu
* Scopes defines a collection of resources names/short-names for the views associated with the plugin. You can specify `all` to provide this shortcut for all views.
Expand Down Expand Up @@ -944,7 +944,7 @@ k9s:
noIcons: false
# Toggles reactive UI. This option provide for watching on disk artifacts changes and update the UI live Defaults to false.
reactive: false
# By default all contexts wil use the dracula skin unless explicitly overridden in the context config file.
# By default all contexts will use the dracula skin unless explicitly overridden in the context config file.
skin: dracula # => assumes the file skins/dracula.yaml is present in the $XDG_DATA_HOME/k9s/skins directory
defaultsToFullScreen: false
skipLatestRevCheck: false
Expand Down Expand Up @@ -1088,12 +1088,12 @@ to make this project a reality!
## Meet The Core Team!
If you have chops in GO and K8s and would like to offer your time to help maintain and enhance this project, please reach out to me.
* [Fernand Galiana](https://github.com/derailed)
* <img src="assets/mail.png" width="16" height="auto" alt="email"/> [email protected]
* <img src="assets/twitter.png" width="16" height="auto" alt="twitter"/> [@kitesurfer](https://twitter.com/kitesurfer?lang=en)
* [Aleksei Romanenko](https://github.com/slimus)
We always enjoy hearing from folks who benefit from our work!
## Contributions Guideline
Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_0.1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rev and see if we're happier with some of the fixes!
```text
>po<ENTER>
```
+ Similarly to filter on a given resource you can use `/' and type your filter.
+ Similarly to filter on a given resource you can use `/` and type your filter.
+ In both instances `<ESC>` will back you out of command mode and into navigation mode.
<br/>
Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_0.10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Most of the refactors are around K8s resource fetching and viewing as well as na

## Custom Skins Per Cluster

In this release, we've added support for skins at the cluster level. Do you want K9s to look differently based on which cluster you're connecting to? All you'll need is to name the skin file in the K9s home directory as follows `mycluster_skin.yml`. If no cluster specific skin file is found, the standard `skin.yml` file will be loaded if present. Please checkout the `skins` directory in this repo or PR me if you have cool skins you'd like to share with your fellow K9ers as they will be featured in these release notes and in the project README.
In this release, we've added support for skins at the cluster level. Do you want K9s to look differently based on which cluster you're connecting to? All you'll need is to name the skin file in the K9s home directory as follows `mycluster_skin.yml`. If no cluster specific skin file is found, the standard `skin.yml` file will be loaded if present. Please checkout the `skins` directory in this repo or PR me if you have cool skins you'd like to share with your fellow K9sers as they will be featured in these release notes and in the project README.

## Hot(Ness)?

Expand Down
4 changes: 2 additions & 2 deletions change_logs/release_0.12.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Also if you dig this tool, please make some noise on social! [@kitesurfer](https

### Searchable Logs

There has been quiet a few demands for this feature. It should now be generally available in this drop. It works the same as the resource view ie `/fred`, you can also specify a fuzzy filter using `/-f blee-duh`. The paint is still fresh on that deal and not super confident that it will work nominally as I had to rework the logs to enable. So totally possible I've hosed something in the process.
There has been quite a few demands for this feature. It should now be generally available in this drop. It works the same as the resource view ie `/fred`, you can also specify a fuzzy filter using `/-f blee-duh`. The paint is still fresh on that deal and not super confident that it will work nominally as I had to rework the logs to enable. So totally possible I've hosed something in the process.

### APIServer Dud

Expand All @@ -38,7 +38,7 @@ k9s:

### K9s Slackers

I've enabled a [K9s slack channel](https://join.slack.com/t/k9sers/shared_invite/enQtOTAzNTczMDYwNjc5LWJlZjRkNzE2MzgzYWM0MzRiYjZhYTE3NDc1YjNhYmM2NTk2MjUxMWNkZGMzNjJiYzEyZmJiODBmZDYzOGQ5NWM) dedicated to all K9ers. This would be a place for us to meet and discuss ideas and use cases. I'll be honest here I am not a big slack afficionado as I don't do very well with interrupt drive workflows. But I think it would be a great resource for us all.
I've enabled a [K9s slack channel](https://join.slack.com/t/k9sers/shared_invite/enQtOTAzNTczMDYwNjc5LWJlZjRkNzE2MzgzYWM0MzRiYjZhYTE3NDc1YjNhYmM2NTk2MjUxMWNkZGMzNjJiYzEyZmJiODBmZDYzOGQ5NWM) dedicated to all K9sers. This would be a place for us to meet and discuss ideas and use cases. I'll be honest here I am not a big slack aficionado as I don't do very well with interrupt drive workflows. But I think it would be a great resource for us all.

NOTE: Please be kind to each others and threat everyone with respect as I would like this to be a safe and fun place for folks to hangout. Thank you for you support and understanding!!

Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_0.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Thank you so much for your support!!

+ [Feature #97](https://github.com/derailed/k9s/issues/97)
Changed log view to now use kubectl logs shell command.
There was some issues with the previous implementation with missing info and panics.
There were some issues with the previous implementation with missing info and panics.
NOTE! User must type Ctrl-C to exit the logs and navigate back to K9s
+ Reordered containers to show spec.containers first vs spec.initcontainers.
+ [Feature #29](https://github.com/derailed/k9s/issues/29)
Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_0.3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Thank you so much for your support!!

1. [Feature #124](https://github.com/derailed/k9s/issues/124)
1. *NodeView* Add current cpu/memory percentages to track current load on nodes.
2. *NodeView* Add requested cpu/memory percentages to track how much containers
2. *NodeView* Add requested cpu/memory percentages to track how many container
resources are requested on the cluster.
3. *NodeView* Add requested cpu/memory raw metrics
4. *NodeView* Add corresponding column sorters
Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_0.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Thank you so much for your support and awesome suggestions to make K9s better!!
2. The RBAC view will auto-refresh just like any K9s views hence showing live RBAC updates
3. RBAC view supports standard K8s verbs ie get,list,deletecollection,watch,create,patch,update,delete.
4. Any verbs not in this standard K8s verb list, will end up in the EXTRAS column.
5. For non resource URLS, we map standard REST verbs to K8s verbs ie post=create patch=update, etc..
5. For non resource URLS, we map standard REST verbs to K8s verbs ie post=create patch=update, etc.
6. Added initial sorts by name and group while in RBAC view.
7. Usage: To activate, enter command mode via `:cr` or `:ro` for clusterrole(cr)/role(ro), select a row and press `<enter>`
8. To bail out of the view and return to previous use `p` or `<esc>`
Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_0.4.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Thank you so much for your support and awesome suggestions to make K9s better!!
```

These commands will pull all the available cluster and role bindings associated with these subject types.
Use select + `<enter>` to see the associated RBACK policy rules.
Use select + `<enter>` to see the associated RBAC policy rules.
You can also filter/sort, like in any other K9s views with the added bonus of auto updates when new user/group bindings come into your clusters.

To see ServiceAccount RBAC policies, you can navigate to the serviceaccount view aka `:sa` and select + `<enter>` to view the associated policy rules.
Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_0.4.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ NOTE: In a K9s environment, if you'd like to specify a spinach config file, you

NOTE: There is a bit more that need to be done on this integration to be complete. Please file an issue if something does not work as expected.

NOTE: Popeye will run it's own course and K9s is just a viewer for it, so if you'd like additional sanitation or find Popeye related issues, please tune to the corresponding repo!
NOTE: Popeye will run its own course and K9s is just a viewer for it, so if you'd like additional sanitation or find Popeye related issues, please tune to the corresponding repo!

Let us know if you dig it? And share your before/after clusters scores!

Expand Down
4 changes: 2 additions & 2 deletions change_logs/release_0.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Also if you dig this tool, please make some noise on social! [@kitesurfer](https

## Change Logs

I am super excited about this drop of K9s. Lot's of cool improvements based on K9s friends excellent feedback!
I am super excited about this drop of K9s. Lots of cool improvements based on K9s friends excellent feedback!


### Popeye
Expand All @@ -31,7 +31,7 @@ Added a container view to list all the containers available on a given pod. On a

> Ever wanted to know where your pods originated from?
Fear not, K9s has got your back! Some folks have expressed desires to navigate from a deployment to it's pods or see which pods are running on a given node. Whether you are starting from a Node, a Deployment, ReplicaSet, DaemonSet or StatefulSet, you can now simply `<enter>` of a selected item a view the associated pods. [Issue #149](https://github.com/derailed/k9s/issues/149)
Fear not, K9s has got your back! Some folks have expressed desires to navigate from a deployment to its pods or see which pods are running on a given node. Whether you are starting from a Node, a Deployment, ReplicaSet, DaemonSet or StatefulSet, you can now simply `<enter>` of a selected item a view the associated pods. [Issue #149](https://github.com/derailed/k9s/issues/149)

### RollingBack ReplicaSets

Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_0.6.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Also if you dig this tool, please make some noise on social! [@kitesurfer](https

### Performance... With feelings!

Ran thru another perf pass and hope I've pushed the needle in the right direction? K9s is now leveraging informers which I think came out of CRDs work. Our initial assessments shows numbers to μsecond updates, down from milliseconds 🎉. Hopefully the outputs are still correct as I have the tendency to make things much faster with incorrect results ;( We hope to hear back from you with a report from your clusters and assessments and brace for good news? This was a deep cycle thru K9s core and more perf will be gain, once we get a chance to vet this new strategy. I'd like to take this opportunity to thank you all for your patience and incredible kindness and support. We certainly hope this drop won't turn out to be a dud as I am fresh out of prozac patches 😩
Ran thru another perf pass and hope I've pushed the needle in the right direction? K9s is now leveraging informers which I think came out of CRDs work. Our initial assessments shows numbers to μsecond updates, down from milliseconds 🎉. Hopefully the outputs are still correct as I have the tendency to make things much faster with incorrect results ;( We hope to hear back from you with a report from your clusters and assessments and brace for good news? This was a deep cycle thru K9s core and more perf will be gained, once we get a chance to vet this new strategy. I'd like to take this opportunity to thank you all for your patience and incredible kindness and support. We certainly hope this drop won't turn out to be a dud as I am fresh out of prozac patches 😩

---

Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_0.7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Provided your K8s services are head(Full), you can now navigate to the pods that

### Moving Forward!

In this drop, we've added support for port-forwarding that allows you to exercise your container from your local machine. To setup a port-forward, from the Pod view drill down to a selected Pod's containers, select the container that exposes the port of interest and hit `Ctrl-F`. A dialog will popup allowing you to configure a localhost port to forward to. Once set up, K9s will take you to you to the new PortForward view aka `pf`. Pending your terminal feature and container setup, you should be able to pop the forwarded URL directly into your browse. On iTerm2 me think `command+click` does the trick?
In this drop, we've added support for port-forwarding that allows you to exercise your container from your local machine. To setup a port-forward, from the Pod view drill down to a selected Pod's containers, select the container that exposes the port of interest and hit `Ctrl-F`. A dialog will popup allowing you to configure a localhost port to forward to. Once set up, K9s will take you to the new PortForward view aka `pf`. Pending your terminal feature and container setup, you should be able to pop the forwarded URL directly into your browse. On iTerm2 me think `command+click` does the trick?

Big thanks and ATTABOY! in full effect all week to [Brent](https://github.com/brentco) for filing this initial issue. Please keep in mind, these port-forward babies are a bit expensive to run, so make sure you choose wisely and delete any superfluous PFs!!

Expand Down
4 changes: 2 additions & 2 deletions change_logs/release_0.8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This feature comes out of [Raman Gupta](https://github.com/rocketraman) report.

### OldiesButGoodies?

So the initial few releases of K9s did not have any failsafe counter measures while deleting resources. So we've beefed the deletion logic to make sure you did not inadvertantly blow something away by leveraging
So the initial few releases of K9s did not have any failsafe counter measures while deleting resources. So we've beefed the deletion logic to make sure you did not inadvertently blow something away by leveraging
dialogs. This was totally a reasonable thing to do! However in case of managed pods, one may want to quickly cycle on or more pod perhaps to pickup a new image or configuration. For this purpose we've introduced an alternate deletion mechanism to delete pod under `alt-k` for kill. Thanks to my fellow frenchma [ftorto](https://github.com/ftorto) for this one ;)

### HairPlugs!
Expand Down Expand Up @@ -74,7 +74,7 @@ plugins:
scopes:
- co
description: Sniff
# NOTE! Ksniff has been install as a kubectl extension!
# NOTE! Ksniff has been installed as a kubectl extension!
command: kubectl
# Run this command in the background so that I can still do K9s stuff...
background: true
Expand Down
Loading

0 comments on commit 8f8d47d

Please sign in to comment.