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

Need a way to delete a single resource #262

Closed
jessesuen opened this issue Jun 5, 2018 · 4 comments
Closed

Need a way to delete a single resource #262

jessesuen opened this issue Jun 5, 2018 · 4 comments
Assignees
Milestone

Comments

@jessesuen
Copy link
Member

A user hit an issue where an kubectl edit was performed from underneath argocd's kubectl apply. A field was added to selector.matchLabels. Because of this, kubectl apply did not remove this field (since it believed it to be defaulted by a controller), and the apply failed due to mismatched labels.

To handle issues like this, we additionally need a "replace" sync strategy, which will perform a kubectl replace instead of apply. This will also solve the problem when a user wishes to modify immutable fields (e.g. a service type needs to change from LoadBalancer)

@alexmt alexmt added this to the 0.6.0 milestone Jun 14, 2018
@jessesuen jessesuen self-assigned this Jun 22, 2018
@jessesuen
Copy link
Member Author

This will be handled by the apply sync strategy with a force option. Which translates to kubectl apply --force

@jessesuen
Copy link
Member Author

d633f6b adds the ability to supply --force when performing a sync.

@jessesuen jessesuen modified the milestones: 0.6.0, 0.7.0 Jul 18, 2018
@jessesuen
Copy link
Member Author

Reopening. I incorrectly thought that after the addition of the --force flag, it would cover cases where the kubectl apply failed due to incompatible spec changes. However, it seems we still do not handle cases when we change a service from LoadBalancer to ClusterIP. For these types of situations, we really need kubectl replace.

@jessesuen jessesuen reopened this Jul 18, 2018
@jessesuen jessesuen added the P2 label Jul 18, 2018
@jessesuen jessesuen changed the title Need a "replace" sync strategy [SPIKE] Need a way to sync/delete/replace a single resource Aug 2, 2018
@dthomson25 dthomson25 changed the title [SPIKE] Need a way to sync/delete/replace a single resource Need a way to delete a single resource Aug 13, 2018
@dthomson25 dthomson25 added the 2 label Aug 13, 2018
@jessesuen
Copy link
Member Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants