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

Take kubectl apply out of Alpha and into Beta #34274

Closed
mikedanese opened this Issue Oct 6, 2016 · 14 comments

Comments

@mikedanese
Member

mikedanese commented Oct 6, 2016

  • Fully document behavior
  • Prune all restmappings, not just those provided

cc @pwittrock

@MrHohn

This comment has been minimized.

Member

MrHohn commented Oct 19, 2016

Sorry to bother, I want to know what is the plan for "Prune all restmappings"? I think addon-manager will need this feature (at least need to also prune given additional restmappings?).

@mikedanese

This comment has been minimized.

Member

mikedanese commented Oct 19, 2016

I have not started working on it. I can take a look or you can if you want.

@mikedanese mikedanese self-assigned this Oct 19, 2016

@MrHohn

This comment has been minimized.

Member

MrHohn commented Oct 19, 2016

Sure, I can take a look at this if it is not complicated.

I wanna follow the plan you proposed before: add a --type flag to modified the visitedRESTMappings

k8s-merge-robot added a commit that referenced this issue Nov 4, 2016

Merge pull request #35220 from MrHohn/kubectl-apply-type
Automatic merge from submit-queue

Implement --prune-whitelist(-w) flag to overwrite default whitelist for --prune

From #34274.

Updates:

As suggested, the new commits implement a default whitelist for `kubectl apply --prune`, which could be overwritten by using `--prune-whitelist`or `-w` flag. The default whitelist and example as below.

Also supports `--dry-run` for `--prune` to fix #35222.

whitelist:

```
type pruneResource struct {
    group      string
    version    string
    kind       string
    namespaced bool
}

*pruneResources = []pruneResource{
    {"", "v1", "ConfigMap", true},
    {"", "v1", "Endpoints", true},
    {"", "v1", "Namespace", false},
    {"", "v1", "PersistentVolumeClaim", true},
    {"", "v1", "PersistentVolume", false},
    {"", "v1", "Pod", true},
    {"", "v1", "ReplicationController", true},
    {"", "v1", "Secret", true},
    {"", "v1", "Service", true},
    {"batch", "v1", "Job", true},
    {"extensions", "v1beta1", "DaemonSet", true},
    {"extensions", "v1beta1", "Deployment", true},
    {"extensions", "v1beta1", "HorizontalPodAutoscaler", true},
    {"extensions", "v1beta1", "Ingress", true},
    {"extensions", "v1beta1", "ReplicaSet", true},
    {"apps", "v1beta1", "StatefulSet", true},
}
```

example:

```
$ kubectl apply -f /path/to/file --prune -l test=true \
      -w core/v1/Pod \
      -w core/v1/Service \
      -w extensions/v1beta1/Deployment 
```

@mikedanese
@bgrant0607

This comment has been minimized.

Member

bgrant0607 commented Nov 17, 2016

cc @ymqytw @pwittrock

@pwittrock

This comment has been minimized.

Member

pwittrock commented Nov 17, 2016

@MrHohn Can we close this issue?

@MrHohn

This comment has been minimized.

Member

MrHohn commented Nov 17, 2016

@pwittrock Sure. --prune is not well documented yet, but I think #35234 is also tracking this.

@pwittrock pwittrock referenced this issue Nov 17, 2016

Open

kubectl apply umbrella issue tracker #35234

15 of 32 tasks complete
@MrHohn

This comment has been minimized.

Member

MrHohn commented Nov 23, 2016

Actually I think we might want to keep this issue open. There is an Alpha Disclaimer comment in the code, which has a pointer to this issue.
Plus this --prune feature indeed needs to be refined, see comments here and here.

Could we update the contents on top and keep it open?

@pwittrock @mikedanese

@pwittrock pwittrock changed the title from Polish outstanding issues with kubeclt apply --prune to Take kubectl apply out of Alpha and into Beta Nov 23, 2016

@pwittrock

This comment has been minimized.

Member

pwittrock commented Nov 23, 2016

SGTM

@xiangpengzhao

This comment has been minimized.

Member

xiangpengzhao commented Jun 24, 2017

/sig cli

@fejta-bot

This comment has been minimized.

fejta-bot commented Jan 6, 2018

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@bgrant0607

This comment has been minimized.

Member

bgrant0607 commented Jan 23, 2018

/remove-lifecycle stale

@fejta-bot

This comment has been minimized.

fejta-bot commented Apr 23, 2018

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@fejta-bot

This comment has been minimized.

fejta-bot commented May 23, 2018

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@fejta-bot

This comment has been minimized.

fejta-bot commented Jun 22, 2018

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment