Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding conditioner plugin #3895

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

ddymko
Copy link
Contributor

@ddymko ddymko commented Jun 11, 2024

Hey there 👋

Looking to add in the conditioner plugin to the krew index. This plugin lets you add, remove, update conditions on a node

Validation of local install

☁  Downloads  cat conditioner.yaml

apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
  name: conditioner
spec:
  version: v1.1.1
  platforms:
    - bin: kubectl-conditioner.exe
      uri: https://github.com/devbytes-cloud/conditioner/releases/download/v1.1.1/conditioner_Windows_x86_64.zip
      sha256: 66ea9cf3bd8e0caec32b5dffac2573a3df3ac96a3899012f7bd9f08a53a1c15d
      selector:
        matchLabels:
          os: windows
          arch: amd64
    - bin: kubectl-conditioner.exe
      uri: https://github.com/devbytes-cloud/conditioner/releases/download/v1.1.1/conditioner_Windows_arm64.zip
      sha256: 6a444f6533a695af37078760b36e3fa9b9cc27e80d4c1314517a9ba6dfe4b3b0
      selector:
        matchLabels:
          os: windows
          arch: arm64
    - bin: kubectl-conditioner
      uri: https://github.com/devbytes-cloud/conditioner/releases/download/v1.1.1/conditioner_Linux_x86_64.tar.gz
      sha256: 5a4d89f8968f24137aa784d41879b4a43e4b5b5d659e703429addd3d843ff3a2
      selector:
        matchLabels:
          os: linux
          arch: amd64
    - bin: kubectl-conditioner
      uri: https://github.com/devbytes-cloud/conditioner/releases/download/v1.1.1/conditioner_Linux_arm64.tar.gz
      sha256: ae777193dee428098af50b545eeec7b5fdf3832950d3226a1a8be86ed2f19b16
      selector:
        matchLabels:
          os: linux
          arch: arm64
    - bin: kubectl-conditioner
      uri: https://github.com/devbytes-cloud/conditioner/releases/download/v1.1.1/conditioner_Darwin_x86_64.tar.gz
      sha256: 5e32b7462321c309b284c00df194db6a2707b7e3f6123b9c3888c587d14f30f0
      selector:
        matchLabels:
          os: darwin
          arch: amd64
    - bin: kubectl-conditioner
      uri: https://github.com/devbytes-cloud/conditioner/releases/download/v1.1.1/conditioner_Darwin_arm64.tar.gz
      sha256: 23077822cb334df87d50409c64ef4f5ac554a686b60d9760aaa5f6d8660278d8
      selector:
        matchLabels:
          os: darwin
          arch: arm64
  shortDescription: Add, update, or remove conditions on Kubernetes nodes
  homepage: https://github.com/devbytes-cloud/conditioner
  description: Conditioner allows you to add, update, or remove conditions on Kubernetes nodes. It's a handy tool for cluster administrators to manage node status conditions effectively.
☁  Downloads  wget https://github.com/devbytes-cloud/conditioner/releases/download/v1.1.1/conditioner_Darwin_arm64.tar.gz
--2024-06-11 08:03:11--  https://github.com/devbytes-cloud/conditioner/releases/download/v1.1.1/conditioner_Darwin_arm64.tar.gz
Resolving github.com (github.com)... 140.82.113.4
Connecting to github.com (github.com)|140.82.113.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/758238328/b47245c7-15fa-454d-a6c7-631adf42f713?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240611%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240611T120311Z&X-Amz-Expires=300&X-Amz-Signature=a224c997bf3c76c092a5ba563397759ed02335d76bf4786b9d4ed764df9e7918&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=758238328&response-content-disposition=attachment%3B%20filename%3Dconditioner_Darwin_arm64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2024-06-11 08:03:11--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/758238328/b47245c7-15fa-454d-a6c7-631adf42f713?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240611%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240611T120311Z&X-Amz-Expires=300&X-Amz-Signature=a224c997bf3c76c092a5ba563397759ed02335d76bf4786b9d4ed764df9e7918&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=758238328&response-content-disposition=attachment%3B%20filename%3Dconditioner_Darwin_arm64.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.109.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10989534 (10M) [application/octet-stream]
Saving to: ‘conditioner_Darwin_arm64.tar.gz’

conditioner_Darwin_arm64.tar.gz                          100%[=================================================================================================================================>]  10.48M  --.-KB/s    in 0.1s

2024-06-11 08:03:11 (71.9 MB/s) - ‘conditioner_Darwin_arm64.tar.gz’ saved [10989534/10989534]

☁  Downloads  kubectl krew install --manifest=conditioner.yaml --archive=conditioner_Darwin_arm64.tar.gz
Installing plugin: conditioner
Installed plugin: conditioner
\
 | Use this plugin:
 | 	kubectl conditioner
 | Documentation:
 | 	https://github.com/devbytes-cloud/conditioner
/

@ahmetb
Copy link
Member

ahmetb commented Jun 11, 2024

🤖 Beep beep! I’m a robot speaking on behalf of @ahmetb. 🤖


Thanks for submitting your kubectl plugin to Krew!
One of the krew-index maintainers will review it soon. Note that the reviews for new plugin submissions may take a few days.

In the meanwhile, here are a few tips to make your plugin manifest better:

  • Make sure your plugin follows the best practices.
  • Eliminate redundant wording form shortDescription (it should be max 50 characters).
  • Try to word wrap your description to 80-character lines (no usage examples, please).

Thanks for your patience!
/kind new-plugin

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 11, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @ddymko!

It looks like this is your first PR to kubernetes-sigs/krew-index 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/krew-index has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 11, 2024
@ahmetb
Copy link
Member

ahmetb commented Jun 27, 2024

I can accept this plugin, but fundamentally I think the tool is doing a "name grab" and is a bit limited-purpose, since it can only update Node conditions and nothing else. (I'm not sure if it's even feasible to update conditions fields of other types holistically since they all don't have the same shape/semantics.) That's why I'm conflicted a bit from naming and versatility/usefulness perspective.

/kind gray-area
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 27, 2024
@kubernetes-sigs kubernetes-sigs deleted a comment from k8s-ci-robot Jun 27, 2024
@ddymko
Copy link
Contributor Author

ddymko commented Jul 1, 2024

@ahmetb thanks for taking the time to look at this!

You mention that this is a "name grab". I was trying to follow the developer guide and give a somewhat a unique name to the plugin. Figured conditioner would be unique enough as I was approaching this as a shampoo/conditioner (thought I was being clever 😅)

Would you suggest that a name change would be more appropriate here?

since it can only update Node conditions and nothing else.

Just to be devils advocate here. Looking through the krew index there are a lot of limited scoped plugins on the krew index such as ctx/ns and these are plugins I use everyday.


@ahmetb
Copy link
Member

ahmetb commented Jul 2, 2024

I think I initially overreacted, sorry. If the name were "conditions" but it was doing only working on some resource conditions, it would've been a generic name grab situation limiting future assignment of the name. This is fine since the name is unique enough to not collide.

/lgtm
/approve
/hold cancel

Also, please consider setting up Krew release automation which helps you skip manually making updates to your Krew manifests on each new version and send a pull request. It’s a GitHub workflow bot that can run every time you push a new tag. Those PRs are automatically approved.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 2, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 2, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, ddymko

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 2, 2024
@k8s-ci-robot k8s-ci-robot merged commit b9ed308 into kubernetes-sigs:master Jul 2, 2024
3 checks passed
@ddymko ddymko deleted the dd/conditioner-plugin branch July 2, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/gray-area kind/new-plugin lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants