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

Deletion #76

Merged
merged 1 commit into from
Jul 17, 2020
Merged

Deletion #76

merged 1 commit into from
Jul 17, 2020

Conversation

Kidswiss
Copy link
Contributor

Resolves #32

@Kidswiss Kidswiss mentioned this pull request Jun 17, 2020
3 tasks
@Kidswiss Kidswiss requested a review from srueg June 17, 2020 11:41
pkg/apis/syn/v1alpha1/cluster_types.go Outdated Show resolved Hide resolved
pkg/controller/cluster/cluster_reconcile.go Outdated Show resolved Hide resolved
pkg/helpers/crd.go Show resolved Hide resolved
pkg/helpers/crd.go Outdated Show resolved Hide resolved
pkg/controller/gitrepo/gitrepo_reconcile.go Outdated Show resolved Hide resolved
pkg/helpers/values.go Outdated Show resolved Hide resolved
pkg/apis/syn/v1alpha1/cluster_types.go Outdated Show resolved Hide resolved
pkg/apis/syn/v1alpha1/cluster_types.go Outdated Show resolved Hide resolved
pkg/apis/syn/v1alpha1/cluster_types.go Outdated Show resolved Hide resolved
pkg/apis/syn/v1alpha1/gitrepo_types.go Outdated Show resolved Hide resolved
pkg/apis/syn/v1alpha1/tenant_types.go Outdated Show resolved Hide resolved
pkg/controller/cluster/cluster_reconcile.go Outdated Show resolved Hide resolved
pkg/helpers/crd.go Outdated Show resolved Hide resolved
pkg/vault/client.go Outdated Show resolved Hide resolved
pkg/helpers/crd.go Outdated Show resolved Hide resolved
pkg/controller/cluster/cluster_reconcile.go Outdated Show resolved Hide resolved
pkg/controller/cluster/cluster_reconcile.go Outdated Show resolved Hide resolved
pkg/controller/cluster/cluster_reconcile.go Outdated Show resolved Hide resolved
pkg/helpers/crd.go Outdated Show resolved Hide resolved
pkg/helpers/crd.go Outdated Show resolved Hide resolved
pkg/controller/gitrepo/gitrepo_reconcile.go Outdated Show resolved Hide resolved
pkg/helpers/crd.go Outdated Show resolved Hide resolved
pkg/helpers/crd.go Outdated Show resolved Hide resolved
pkg/helpers/crd.go Outdated Show resolved Hide resolved
pkg/helpers/crd.go Outdated Show resolved Hide resolved
pkg/vault/client.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@Kidswiss
Copy link
Contributor Author

Kidswiss commented Jul 2, 2020

Tested it on synfra-dev:

  • the operator doesn't have permission to delete/archive the repositories. Gitlab returns a 403 permission denied...
  • somehow the creation of the common.yml and the cluster yml files broke, they were not created on the dev instance. The operator didn't log any errors or any indication that it tried to create the files.

@Kidswiss
Copy link
Contributor Author

Kidswiss commented Jul 2, 2020

TODO: handle the case where no files are in the repository. This currently seems not to work properly.

@Kidswiss
Copy link
Contributor Author

Kidswiss commented Jul 2, 2020

I was able to fix the issue with the empty repository.

@Kidswiss
Copy link
Contributor Author

Kidswiss commented Jul 8, 2020

Fixing this issue and testing against out dev environment shows, that the vault policies for the operator aren't yet correct.

@Kidswiss
Copy link
Contributor Author

So now all the issues against the synfra cluster were resolved.

@srueg ready to merge

@srueg
Copy link
Contributor

srueg commented Jul 17, 2020

LGTM.

Can you please rebase/merge master? Maybe this also fixes the stuck GitHub Actions...

@Kidswiss
Copy link
Contributor Author

Sure I'm squashing the commits anyways before merging.

@Kidswiss Kidswiss force-pushed the deletion branch 2 times, most recently from 88eb58f to 72e8b9d Compare July 17, 2020 13:31
This commit add logic to delete Git and Vault resources. There are two
kinds of deletion for each resource:

* soft deletion -> the resource can easily be restored if necessary
* hard deletion -> the resource is completely deleted

Also there's an annotation that is set by default, that prevents the
operator from deleting resources. Please see the docs for more info.

Resources will be deleted as soon as the k8s resource belonging to it is
deleted!
@Kidswiss Kidswiss merged commit 321e718 into master Jul 17, 2020
@Kidswiss Kidswiss deleted the deletion branch July 17, 2020 13:49
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

Successfully merging this pull request may close these issues.

Implement GitRepo Deletion
2 participants