.NET SDK Deployment Cookbook¶
Project scaffold¶
The scaffold includes .kiket/manifest.yaml, replay payloads, and CI templates. Hook it into your solution or keep it as a standalone project.
Build & package¶
Deploy the published folder to your platform of choice (Azure Web Apps, Cloud Run, containers, etc.). Ensure DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 if you ship to alpine-based images.
Hosting targets¶
| Platform | Tips |
|---|---|
| Azure App Service | Use the built-in ASP.NET Core runtime, map WEBSITES_PORT to your desired port, and configure env vars via the portal. |
| Azure Container Apps / AWS ECS / Cloud Run | Containerise the published output, expose port 8080, and configure readiness probes against /health. |
| Kubernetes | Deploy as a Deployment + Service; set resource requests to avoid throttling guard hooks. |
CI/CD¶
Typical GitHub Actions steps:
kiket extensions lintdotnet testkiket extensions replay --template workflow.before_transition --url https://preview.example.com/webhooks/workflow.before_transitiondotnet publish+ deploy
Secrets and configuration¶
- Declare manifest secrets and sync via
kiket marketplace secrets sync. - Map them to
KIKET_SECRET_<KEY>environment variables per deployment slot. - Use
context.Secrets.RotateAsyncfor short-lived credentials.
Observability¶
- Telemetry is on by default—verify the events under Admin → Marketplace → SDK Telemetry.
- Add structured logging via
ILoggerinside handlers orFeedbackHookto ship telemetry to Application Insights / Cloud Logging. - Keep
/healthaccessible for synthetic monitoring.
Custom data + SLA recipes¶
var client = context.Endpoints.CustomData(projectId);
var list = await client.ListAsync("com.example.crm", "automation_records",
new CustomDataListOptions { Filters = new Dictionary<string, object?> { ["status"] = "active" } });
if (list?.Data?.Count == 0)
{
await client.CreateAsync("com.example.crm", "automation_records", new Dictionary<string, object?>
{
["email"] = payload["lead_email"],
["metadata"] = new { source = "campaign" }
});
}
- Keep schema files under
.kiket/modules/**. - Add automated tests using the replay harness plus
dotnet test.
Upgrade strategy¶
- Register multiple handler versions and branch on
context.EventVersion. - Bump the manifest version + changelog, then publish via
kiket extensions publish.
Checklist¶
- CLI lint/test/replay succeed.
-
/healthresponds with statusok. - Telemetry feed visible in admin dashboard/CLI.
- Required env vars (
KIKET_WEBHOOK_SECRET,KIKET_WORKSPACE_TOKEN,KIKET_SECRET_*) configured. - Alerts wired via
context.Endpoints.NotifyAsync.