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

Prodduturi, SaiKiran Reddy 1 Reputation point
2021-06-11T10:03:28.4+00:00

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
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
337 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chris Sanders 11 Reputation points
    2021-07-06T16:32:15.077+00:00

    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.