canonical / cos-configuration-k8s-operator

This charmed operator for Kubernetes enables you to provide configurations to various components of the Canonical Observability Stack (COS) bundle.
https://charmhub.io/cos-configuration-k8s
Apache License 2.0
4 stars 6 forks source link

Remove the git-sync pebble service - only use `--one-time` #17

Closed sed-i closed 2 years ago

sed-i commented 2 years ago

In this PR the git-sync pebble service is removed, in favor of --one-time only sync invocations. This is needed because of the following:

  1. git-sync --one-time is needed by the sync-now action, but that interferes with the regular scheduled operation of git-sync - after the sync-now command, scheduled syncs do not work anymore. Related:
  2. Even if they worked together, there could be a race condition between git-sync updating the repo folder and charm code reading alert rules from disk.

The approach in this PR aligns update-status period with syncing period.

sed-i commented 2 years ago

So… now that we remove the asynchronous element of gitsync (and we do it for very good reasons), what does gitsync give us over a simple, plain usage of either the git command line, or a git client written in python?

It has a bunch of good features that we can avoid implementing ourselves: