Closed tobernguyen closed 3 years ago
/kind feature
I agree this is a gap in Kops' ability to support scenarios in which lifecycle overrides are intended.
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
/remove-lifecycle stale
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
/remove-lifecycle stale
+1
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-contributor-experience at kubernetes/community. /lifecycle stale
+
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-contributor-experience at kubernetes/community. /lifecycle rotten
/remove-lifecycle rotten
I can reproduce this using master git-3eacde0212
.
At the moment, kops delete only Instance Profiles that match this expression. Deletion of IAM Roles is similar condition. So if I provide masters.$CLUSTER_NAME
and nodes.$CLUSTER_NAME
as existing Instance Profile, it will be deleted when delete cluster.
I will take this issue.
/assign
@johngmyers Nice changes. #11497 will resolve a part of this issue.
A similar change could be made for Instance Profiles.
It's good.
But this issue proposes lifecycle-overrides
option, which do you think is the better way?
And I'm worried about this comment.
@h3poteto I'm struggling to understand what a lifecycle-overrides option to a delete cluster
command would mean, especially in the general case. Would we need to support giving the --phase
flag to delete cluster
? With which combination of flags would we want to remove the cluster from the state store?
@johngmyers I was expecting something like...
For example when I execute kops delete cluster --lifecycle-overrides IAMRoles=Ignore
, kops deletes the cluster leaving only IAMRole. More specifically, when that option was specified, kops skips these actions in delete cluster command.
I'm sorry, I don't know about --phase
flag. Could you please tell me what the flag specifies?
@h3poteto perhaps you could look it up in the documentation?
@johanhubens Is this https://kops.sigs.k8s.io/cli/kops_update_cluster/#options ?
--phase string Subset of tasks to run: assets, cluster, network, security
This option is similar I expected.
I think that your suggestion
A similar change could be made for Instance Profiles.
is good idea. We can delete Instance Profiles using ownership tags with the same logic as #11497 . If it can be implemented, I think that those options are unnecessary.
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:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
I think this issue has already been resolved, so we can close this.
/close
@johngmyers: Closing this issue.
1. What
kops
version are you running? The commandkops version
, will display this information. 1.17.0-beta.12. What Kubernetes version are you running?
kubectl version
will print the version if a cluster is running or provide the Kubernetes version specified as akops
flag.3. What cloud provider are you using? AWS
4. What commands did you run? What is the simplest way to reproduce this issue? I created a cluster using existing AWS Instance Profiles (https://github.com/kubernetes/kops/blob/master/docs/iam_roles.md#use-existing-aws-instance-profiles)
Then I tried to delete the cluster:
5. What happened after the commands executed? The
kops delete cluster
command tries to delete the attached AWS Instance Profiles, IAM Roles, and IAM Policies which were managed outside kops (it were provisioned by Terraform in our project).6. What did you expect to happen?
kops delete cluster
should providelifecycle-overrides
option likekops update
command so we tell kops to not delete AWS Instance Profiles, IAM Roles, and Policies.7. Please provide your cluster manifest. Execute
kops get --name my.example.com -o yaml
to display your cluster manifest. You may want to remove your cluster name and other sensitive information. I don't think this is needed8. Please run the commands with most verbose logging by adding the
-v 10
flag. Paste the logs into this report, or in a gist and provide the gist link here. I don't think this is needed9. Anything else do we need to know? No