kompose icon indicating copy to clipboard operation
kompose copied to clipboard

run-kompose pre-commit hook

Open znd4 opened this issue 1 year ago • 3 comments

What would you like to be added?

Would it be reasonable to add a.pre-commit-hooks.yaml to the kompose repo? I'd love to write a (probably pretty simple) PR if it seems appropriate.

The goal would be to enable the following .pre-commit-config.yaml

repos:
  - repo: https://github.com/kubernetes/kompose
    rev: ...
    hooks:
      - id: run-kompose # should this just be kompose?
        args: convert -o k8s/
        # not sure about the regex atm, but hopefully you get the idea
        files: "(docker-compose\\.yaml|k8s/*")

This can currently be somewhat implemented with repo: local and language: system, with obvious downsides

repos:
  - repo: local
    hooks:
      - id: run-kompose
        language: system
        entry: kompose ...
        files: ...

Unfortunately, this requires installing kompose separately, ruling out pre-commit.ci, and adding maintenance overhead to CI pipelines.

Why is this needed?

The use-case would basically be to continue to use docker-compose.yaml as our development platform, (at least until we can figure out a `skaffold workflow that works for us).

This might be against the philosophy of "moving people away from docker-compose", so I'd understand not wanting to add this.

znd4 avatar Dec 12 '23 14:12 znd4

Currently, I have no objections to this. Thoughts @cdrage?

AhmedGrati avatar Jan 14 '24 10:01 AhmedGrati

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Apr 13 '24 11:04 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar May 13 '24 11:05 k8s-triage-robot

Closing due to no activity, let me know if you are able to open a PR for this!

cdrage avatar May 29 '24 13:05 cdrage