Kubernetes Sync
After a successful deployment, RDT activates an automatic file synchronization system. It watches your local configuration and property files, detects changes, and lets you push updates to the running Kubernetes pod without a full redeployment.
How It Works
Two Watch Zones
RDT creates two file watchers after deployment:
| Watch Zone | Path | Tracks |
|---|---|---|
| Metadata | configuration/packages/**/* | All files recursively — SAMO config packages |
| Properties | project/environments/<env>/* | Top-level files — property files for the deployed environment |
Changes are tracked separately so you can sync just metadata, just ConfigMaps, or both.
The Status Bar
The sync status bar appears in the bottom bar of VS Code after a deployment. It shows the current sync state and is your primary interaction point.
Screenshot needed
All 4 status bar states side by side: idle, pending, syncing, failed
Status Bar States
Hidden
No active sync context. The status bar is not visible.
Idle
Sync is active, no pending changes.
| Property | Value |
|---|---|
| Icon | $(sync-ignored) |
| Text | Sync: <namespace> |
| Tooltip | "No pending changes" |
| Background | Default |
Screenshot needed
The idle status bar
Pending
File changes have been detected. The status bar turns yellow to draw attention.
| Property | Value |
|---|---|
| Icon | $(sync) |
| Text | Sync (<count>) |
| Tooltip | "N metadata, M property files changed. Click to act." |
| Background | Warning (yellow/orange) |
Screenshot needed
The pending status bar with change count
Syncing
A sync operation is in progress.
| Property | Value |
|---|---|
| Icon | $(sync~spin) (animated) |
| Text | Syncing <phase>... |
| Tooltip | "Click to open Output" |
| Background | Default |
The <phase> indicates what's being synced: metadata, ConfigMaps, or rollback.
GIF needed
The syncing status bar with spinning icon
Failed
The last sync operation failed.
| Property | Value |
|---|---|
| Icon | $(error) |
| Text | Sync failed |
| Tooltip | Error message + "Click to open Output" |
| Background | Error (red) |
Screenshot needed
The failed status bar
Sync Actions
Click the status bar to open a Quick Pick menu with available actions. The menu options change based on the current state.
When Idle
| Action | Description |
|---|---|
| Stop Sync | Deactivate file watchers and hide the status bar |
When Changes Are Pending
| Action | Description |
|---|---|
| Sync all | Sync both metadata and ConfigMaps (shown only when both types have changes) |
| Sync metadata only | Copy configuration packages to the pod and restart |
| Sync ConfigMaps only | Update ConfigMaps from property files and restart affected services |
| Show changed files | Display a list of all pending file changes |
| Ignore all changes | Clear all pending changes without syncing |
| Stop Sync | Deactivate file watchers and hide the status bar |
Screenshot needed
The sync action Quick Pick menu showing all options
Sync Operations in Detail
Metadata Sync
When you sync metadata changes:
- Clear remote config directory on the pod
- Copy entire
configuration/packages/directory to the pod - Restart the
lids-as-masterStatefulSet - Wait for the pod to be ready
ConfigMap Sync
When you sync property file changes:
- Recreate affected ConfigMaps from the updated property files
- Restart only the services that depend on the changed ConfigMaps
Service Restart Map
Not all property file changes require restarting every service. RDT uses a targeted restart strategy:
| Changed ConfigMap | Services Restarted |
|---|---|
lidsas-properties | statefulset/lids-as-master |
lidsas-master-properties | statefulset/lids-as-master |
samogateway-properties | deployment/samo-gateway |
securityserver-properties | deployment/security-server |
userservice-properties | deployment/user-service |
licenseserver-properties | All services |
datasource-properties | All services |
licenseserver-properties and datasource-properties trigger a full restart because these configurations are shared across all services.
Commands
RDT registers the following commands for sync management:
| Command | Description |
|---|---|
SAMO RDT: Trigger Kubernetes Sync | Open the sync action menu (same as clicking status bar) |
SAMO RDT: Stop Kubernetes Sync | Deactivate file watchers and stop sync |
SAMO RDT: Ignore Pending Sync Changes | Clear all pending changes |
SAMO RDT: Show Pending Sync Changes | Display list of changed files |
Access these from the Command Palette (Ctrl+Shift+P).
Persistence
The sync context (active deployment info, watched paths) is persisted in VS Code's workspace state. This means:
- Survives window reload — if you close and reopen VS Code, sync resumes automatically
- Per-workspace — each workspace has its own sync context
- Auto-cleanup — stale contexts from older extension versions are automatically discarded
Troubleshooting
| Problem | Solution |
|---|---|
| Status bar not appearing after deploy | Check the Output panel for deployment errors. Sync only activates after a fully successful deploy. |
| Changes not detected | Verify the file is in one of the two watched directories. Property file changes are only detected for top-level files in the environment directory. |
| Sync fails repeatedly | Click the red status bar to open the Output channel and check the error details. Common causes: pod restarted, namespace deleted, network issues. |
| Want to restart from scratch | Stop sync, then redeploy. This creates a fresh sync context. |