question

ProdduturiSaiKiranReddy-9188 avatar image
0 Votes"
ProdduturiSaiKiranReddy-9188 asked ProdduturiSaiKiranReddy-9188 commented

Will Deleting ARC-GitopsConfiguration deletes the k8s resources which are already deployed to cluster

we have configured gitops repository to an azure-arc instance by k8sconfiguration create. It successfully deploys all the component's to cluster ( which are there in the git repo) .

Now we have an scenario to delete this configuration from portal or from cloud.

How do we delete components on the cluster automatically upon deleting configuration.?

( currently we manually deleted them from cluster. ) .

Is there any alternative which deletes cluster resources automatically when we delete the configuration ?

Thanks
SAI

azure-arc
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the post and sorry for the delayed response. I am following up on this internally and should have an update sometime this week.

0 Votes 0 ·

1 Answer

ChrisSanders-0177 avatar image
0 Votes"
ChrisSanders-0177 answered ProdduturiSaiKiranReddy-9188 commented

Deleting a sourceControlConfiguration will not result in deletion of the components that Flux v1 deployed based on the k8s manifests in the git repo. One option, when installing sourceControlConfiguration you can use the --sync-garbage-collection parameter to instruct Flux to remove any deployed component that has been removed from the git repo. With this, if you want to remove all deployed components from the k8s cluster components, you should be able to move the manifest files in the git repo to a location that is not accessible to Flux, and when Flux next reconciles it should remove the previously deployed components. Then you can delete the sourceControlConfiguration.

We are working on integrating Flux v2, which will have a simpler option.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.