Repository navigation
feat!: run each connector with the live-sync CLI - #10
Merged
Merged
Conversation
The chart now runs the live-sync CLI of the image instead of connector-src-postgres. The values.yaml contract does not change. - Each connector gets its own Deployment that runs `live-sync run`. A `$VAR` database_url comes from `env` through Kubernetes expansion. The chart Secret holds a literal database_url, with the SSH tunnel parameters, and the SSH private key. - A post-install and post-upgrade hook Job runs `refresh-publication` with the table list. A table list change does not restart the pod, and a refresh error, for example a table not in the publication, fails the release. - `drop: true` drops the connector on the next upgrade. `helm uninstall` drops every connector after Helm deletes its pod. - The Service and the PDB select only the run pods. The gRPC port is gone, and the probes use the metrics endpoint. BREAKING CHANGE: `helm uninstall` now drops the replication slots, origins, and catalog rows of each connector. Use `--no-hooks` to keep them. Each connector now has its own pod with the `resources` of the values file.
The CI databases do not exist, so the refresh and drop hooks cannot succeed. The install skips the hooks, applies the hook Jobs directly, and checks that the run, refresh, and drop pods pass the restricted PodSecurity admission. The wait loop handles pods that the controllers did not create yet.
The connector pods now send the live-sync usage telemetry. `telemetry.enabled: false` passes `--disable-telemetry` to each live-sync command. The value is not in values.yaml, so that its contract stays the same. The README documents it and what the telemetry sends.
Users delete a connector by removing its entry, not by setting drop: true for one upgrade and then removing it. A forgotten drop leaves a slot that keeps WAL on the source. On upgrade, the chart finds the run Deployments of the release whose connector ID is not in the config, and runs a post-upgrade drop Job for each. The values of a removed connector are gone, so the Job copies the pod spec of the old Deployment. The chart Secret keeps the keys of the removed connector for that one upgrade. lookup does not work in helm template or in GitOps tools, so drop: true stays for them. Tested in kind: removing a literal-URL connector and a paused connector dropped the slot, origin, and catalog row, and the other connector kept replicating without a restart. The next upgrade removed the kept Secret keys and ran no drop Job.
live-sync 0.36.0 reads the connection strings from LIVE_SYNC_SOURCE and LIVE_SYNC_TARGET. The chart already sets them, so the commands drop --source and --target, and the connection strings are not in the process arguments any more. 0.36.0 also replaces refresh-publication --tables with --table-config, which reads a file or stdin. The refresh Job pipes the table list to --table-config=-. --table-config sets the target name and settings of a table, but it is not a filter: every table of the publications syncs, and a table that leaves the list keeps its sync. To stop the sync of a table, remove it from the publication. The identity check flag is now --skip-identity-check. The chart reads the new skip_identity_check key and the old skip_always_identity_check key. The chart needs image v0.36.0 or later. Tested in kind with live-sync built from the 0.36.0 release commit: the run pods have no connection strings in /proc/1/cmdline, two connectors on a new target started with no restart, a published table without an entry synced, the identity flag reached the run and refresh commands, a removed connector was dropped with only the env vars, an entry for an unpublished table failed the refresh Job with the error in its termination message, and uninstall dropped everything.
live-sync reads only skip_identity_check, and the chart assumes a current image.
Each connector now runs in its own pod, so a smaller CPU share is enough. live-sync needs more memory than 512Mi.
Set vpa.enabled to create one for each run Deployment. The default updateMode is Off, so VPA only writes recommendations.
- connectorLabels merges the chart labels with connectorSelectorLabels, so the connector labels are written once. - podSpec takes run and uninstall, and derives the restart policy, the Secret, and the ServiceAccount from them. - A secretName helper replaces five copies of the Secret name. - One drop Job body serves the drop, uninstall, and removed connector cases. - The Secret reads the old Secret only when a connector was removed. The rendered manifests do not change.
Args, env, and replicas are in the pod spec, so a change to them already restarts the pod. The checksum now covers only the connection strings and the SSH key, which live in the chart Secret. A change to a field that only the refresh Job reads, such as target.skip_replica_identity_index, no longer restarts the pod.
arajkumar
pushed a commit
that referenced
this pull request
Dec 1, 2026
🤖 I have created a release *beep* *boop* --- ## [0.2.0](v0.1.2...v0.2.0) (2026-12-01) ### ⚠ BREAKING CHANGES * run each connector with the live-sync CLI ([#10](#10)) ### Features * run each connector with the live-sync CLI ([#10](#10)) ([77a2676](77a2676)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The chart runs
connector-src-postgres, the config-file gRPC service. All connectors share one pod, so a change to one connector restarts all of them. We want each connector to run thelive-syncCLI, like the managed connectors. Thevalues.yamlcontract must stay the same.Change
For each entry in
config.connectors:live-sync run(Recreate strategy,replicas: 0whenenabled: false). A change to one connector restarts only that connector's pod. A change totarget.tablesrestarts nothing.target.tablestolive-sync refresh-publication --table-config=-. When the refresh fails, for example for an entry that matches no published table, the release fails, and the Job pod shows the error.LIVE_SYNC_SOURCEandLIVE_SYNC_TARGET, not in the process arguments.live-sync drop:drop: true: after each install and upgrade.lookup, and the Job copies the pod spec of the old Deployment.helm uninstall: every connector, after Helm deletes the run pods.helm uninstall --no-hookskeeps the connectors.$VARdatabase_urlcomes fromenvthrough Kubernetes expansion. A literaldatabase_urland an SSH private key go into a chart Secret.ssh_configbecomessshtunnel_*DSN parameters.telemetry.enabled: falseto send--disable-telemetry. This key is not invalues.yaml.vpa.enabled: trueto create aVerticalPodAutoscalerfor each connector. The defaultupdateModeis"Off", so VPA only writes recommendations. This key is not invalues.yaml.The keys of
values.yamldo not change. The defaultresourceschange from 500m CPU and 512Mi memory to 250m CPU and 750Mi memory, for each connector pod.service.grpcPortis not used any more, because live-sync has no gRPC endpoint.Breaking changes
The subscription name is the connector
idin both charts, so an upgrade keeps the slots, origins, and catalog rows. The new pods continue CDC, and no data is copied again. These changes break something for users:target.tablesis not a filter. The oldconfig.yamlpath synced only the listed tables, and no tables for an empty list (ExcludeAllMapperinpkg/catalog/refresh.go).refresh-publication --table-configsyncs every published table (IncludeUnmatched). After the upgrade, each published table that is not in the list starts its initial copy. To prevent that, make each publication contain only the listed tables before the upgrade.helm uninstalldrops the slots, origins, and catalog rows. Before, a new install continued from the slots. The synced tables stay.grpcport.service.grpcPorthas no effect.The README has a new "Upgrade from a chart that runs connector-src-postgres" section with these steps.
Risks
lookupin GitOps tools:helm templateand Argo CD do not drop a removed connector. With these tools, usedrop: truefirst, as before.Checks
drop: true, connector removal, and uninstall. Details are below.helm lintpasses for both CI values files. kubeconform 0.6.7 in strict mode passes on Kubernetes 1.30 and 1.31. actionlint 1.7.7 passes.--no-hooksand applies the hook Jobs directly, because the CI databases do not exist. It checks that restricted PodSecurity admits the run, refresh, and drop pods.kind test results
eventscopied 50 rows, and the run pod stayed the same.BackoffLimitExceeded. The Job's termination message showedtables not in publication: public.missing.initial_data_copy: falseand a table rename, only new rows streamed.drop: true: two upgrades in a row both succeeded.--wait.kind test results for the CLI changes
/proc/1/cmdlineof the run pods has no connection strings.logssynced 30 rows, andmetricswent tometrics_env. CDC added 120 rows tometrics_envand 10 rows toevents_literal.--skip-identity-check.helm templateshows thatskip_identity_check: truesends it.tables not in publication: "public"."missing"in its termination message.