kubectl icon indicating copy to clipboard operation
kubectl copied to clipboard

Place CACHEDIR.TAG file in ~/.kube/cache and ~/.kube/http-cache

Open ogarcia opened this issue 3 years ago • 14 comments

What would you like to be added: ~/.kube/cache and ~/.kube/http-cache are cache folders that do not need to be backed up. Until the kubernetes/kubernetes#56402 issue is resolved I propose a trivial change that is add a CACHEDIR.TAG file in these folders following the standard.

TLDR: Create a CACHEDIR.TAG file in ~/.kube/cache and ~/.kube/http-cache containing the following line:

Signature: 8a477f597d28d172789f06886806bc55

Why is this needed: To avoid that the cache dirs ~/.kube/cache and ~/.kube/http-cache are included in backup systems wasting space.

ogarcia avatar Apr 28 '21 08:04 ogarcia

/assign @dougsland @rikatz

To take a look.

eddiezane avatar Apr 28 '21 16:04 eddiezane

@ogarcia thanks for the issue.

Can you please show me in which case of backup is this happening? Or how this can be reproduced as a problem? I see the files inside my .kube/cache but couldn't figure out how adding the tag file can solve this.

Thanks

rikatz avatar May 16 '21 20:05 rikatz

@ogarcia thanks for the issue.

:smiling_face_with_three_hearts:

Can you please show me in which case of backup is this happening? Or how this can be reproduced as a problem? I see the files inside my .kube/cache but couldn't figure out how adding the tag file can solve this.

If I use a backup system like restic and I do a full backip of my system the directory .kube/cache is included on it. But several backup systems can check if the file CACHEDIR.TAG exists in a folder, and if exist and contains the signature described in my first comment, the contents of the directory are ignored.

Place the file CACHEDIR.TAG at moment of create the directories is like tagging them as this directory is a cache directory and you must not backup it. This behaviour is present in Rust cargo command for example.

ogarcia avatar May 17 '21 16:05 ogarcia

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR 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 Aug 15 '21 17:08 k8s-triage-robot

/remove-lifecycle stale

ogarcia avatar Aug 16 '21 06:08 ogarcia

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR 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 Nov 14 '21 07:11 k8s-triage-robot

/remove-lifecycle stale

ogarcia avatar Nov 15 '21 08:11 ogarcia

/triage accepted /priority backlog /help

eddiezane avatar Jan 05 '22 17:01 eddiezane

@eddiezane: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to this:

/triage accepted /priority backlog /help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jan 05 '22 17:01 k8s-ci-robot

@eddiezane is it okay If I pick this up?

danishprakash avatar Jan 23 '22 04:01 danishprakash

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR 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 23 '22 04:04 k8s-triage-robot

/remove-lifecycle stale

ogarcia avatar Apr 23 '22 08:04 ogarcia

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR 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 Jul 22 '22 09:07 k8s-triage-robot

/remove-lifecycle stale

ogarcia avatar Jul 22 '22 10:07 ogarcia

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR 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 Oct 20 '22 10:10 k8s-triage-robot

/remove-lifecycle stale

ogarcia avatar Oct 20 '22 11:10 ogarcia

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

This bot triages PRs 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 PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR 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 Feb 08 '23 09:02 k8s-triage-robot

/remove-lifecycle stale

ogarcia avatar Feb 08 '23 11:02 ogarcia

/assign

Affan-7 avatar Jul 28 '23 05:07 Affan-7

@Affan-7 I'm sorry, I was working on this just now and forgot to assign.But as a beginner, I think my pr may not be accepted.

ning0515 avatar Jul 28 '23 08:07 ning0515

/assign

ning0515 avatar Jul 28 '23 10:07 ning0515

@eddiezane Hello, can you take a look at my PR#119648?I have read a lot of discussions on GitHub,for example . Although modifying client-go would be more direct, modifying kubectl may have a smaller impact.

ning0515 avatar Jul 31 '23 06:07 ning0515