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

feat: delete previously created resources that are no longer needed #157

Open
AmitKumarDas opened this issue Oct 19, 2020 · 1 comment
Open
Labels

Comments

@AmitKumarDas
Copy link

ProblemStatement: As a SRE admin, I would like to delete outdated resources that were created via Recipe tasks. I want to avoid creating new Recipe(s) to delete unused ones.

@AmitKumarDas
Copy link
Author

AmitKumarDas commented Oct 19, 2020

Draft design

  • Consider below Recipe was applied previously
kind: Recipe
metadata:
  name: auto
  namespace: reconcile
spec:
  deleteUnused: true # tunable to handle this feature
  tasks:
  - name:
    create:
      state:
        kind: Pod
        metadata: 
          name: hello
          name: there
  - name:
    apply:
      state:
        kind: ConfigMap
        metadata: 
          name: hello
          name: there
  • Above Recipe was modified as follows:
kind: Recipe
metadata:
  name: auto
  namespace: reconcile
spec:
  deleteUnused: true # tunable to handle this feature
  tasks:
  - name:
    apply:
      state:
        kind: ConfigMap
        metadata: 
          name: hello
          name: there
  • Above should lead to deletion of Pod that was created earlier by this Recipe

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

No branches or pull requests

1 participant