Configuration as code
Export every setting to one YAML file, see what applying a change would do, apply it as an audited revision, and restore an earlier one.
Every Synaxis setting except secret values fits in one file, codewright-synaxis.yaml. You can keep it in source
control, review changes as diffs, and apply them from the console, the CLI or the Helm chart. Each apply is one
transaction, audited and kept as a revision you can restore.
The file
apiVersion: synaxis.codewright.brightwire-technologies.com/v1
kind: SynaxisConfig
spec:
server: { publicUrl: "https://synaxis.example.com" }
auth: { providers: [ … ], roleMappings: [ … ] }
connections:
- name: contoso-github
kind: github
appId: 123456
privateKey: { secretRef: gh-app-key }
webhookSecret: { secretRef: gh-webhook }
scope: [ { include: "contoso/*", exclude: ["*-archive"], activeWithinDays: 365 } ]
workSources: { organizations: [contoso], issues: true, pullRequests: true, projects: true }
overrides: { include: [contoso/legacy-billing], exclude: [contoso/experiments] }
models: { embedding: { … }, providers: [ … ], jobs: { … } }
budgets: { currency: USD, monthly: { summary.file: 300 } }
limits: { repoMirrorMb: 4096, maxFiles: 200000, maxFileKb: 512 }
retention: { auditDays: 365, outOfScopeMirrorDays: 7, secretFindingsDays: 730 }
writeBack: { enabled: false }
managed: [auth, connections, models, budgets]
| Section | Holds | Takes effect |
|---|---|---|
server |
The public address | When the replicas restart |
auth |
Identity providers and role mappings | When the replicas restart |
connections |
Each connection with its scope rules, projects, work sources, manual choices (overrides) and polling |
At once, through the syncs and purges it queues |
models |
Provider Settings, Model Settings, the Available records, the job routes and the embedding model | At once, on every replica; the embedding model when the replicas restart |
budgets |
The currency, each job kind's monthly limit, and what a spent query budget does | At once |
limits |
Repository size, files per ref, file size, refs per repository (maxRefs), and which files are indexed (extensions, excludeFiles) |
When the replicas restart |
retention |
How long each kind of data is kept | When the replicas restart |
writeBack |
Whether people may write to GitHub and Azure DevOps through Synaxis | When the replicas restart |
managed |
The sections that are read-only in the console | At once |
The schema is served at <public URL>/api/v1/config/schema (and The schema for editors in the console), so an
editor with YAML schema support can check the file as you type.
Rules of the file:
- Secrets are named with
secretRef, never written. Store each one first withsynaxis secret set <name>. - A section left out is not touched. A section given is the whole of it: a connection the file no longer names is removed and its data purged.
- An apply refuses an unknown field, a secret that is not stored, or a connection changing kind, and lists every problem.
- A manual choice for a repository not listed yet waits for the sync that lists it.
To change the configuration in the console
- Open Configuration and select Export the current configuration to get the file as it is now.
- Edit it, and paste it into Configuration file (YAML).
- Select Diff. Plan shows each Section with its State (Unchanged, Changed or Not in the file) and its Changes: each Add, Change or Remove, the repositories a removal purges, and notes.
- Select Apply. If it removes connections, Confirm removing connections lists what is purged; select Yes, remove it. The console answers "Applied as revision n.", and names the settings that wait for a restart.
To change it from the CLI
synaxis config export -o codewright-synaxis.yaml
synaxis config diff -f codewright-synaxis.yaml
synaxis config apply -f codewright-synaxis.yaml # add --yes when it removes a connection
synaxis config revisions
synaxis config restore 7 --yes
Revisions and restore
Revisions lists each Revision, when it was Applied, By whom and What changed; "(this replica runs it)" marks the one the replica you are on read at start. View shows a revision's file. Restore applies it again as a new revision, with the same plan and confirmation as an apply.
Managed sections
Sections named in managed are read-only in the console. Their pages show "Managed by configuration revision n:
change it in the configuration file." Use this when the file in source control is the one source of truth.
Apply a file at install
- Helm: put the document in
config.bootstrap. The migrate hook applies it on install, when there is no revision yet. Withconfig.applyOnUpgrade: trueit is applied on every upgrade too, and the file is the source of truth. - Docker Compose: put the file in
config/and setSYNAXIS_Config__Bootstrap: /config/codewright-synaxis.yamlfor the server incompose.override.yaml; it is applied at the first start.
Note: A bootstrap file can only name secrets that are already stored. For the first start, give secrets the server needs before anyone signs in (such as the single sign-on client secret) as mounted files instead.
Settings outside the file
Server settings that are not in the file (the database, Qdrant, the key ring, ports, telemetry, rate limits, sync
timing) are environment variables starting SYNAXIS_ with __ between sections, or the chart's values and
config.settings. The latest applied revision wins over the environment for the sections it holds.