Skip to content

.NET SDK Deployment Cookbook

Project scaffold

kiket extensions scaffold my-dotnet-extension --sdk dotnet
dotnet restore

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

dotnet publish -c Release -r linux-x64 --self-contained false -o publish

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:

  1. kiket extensions lint
  2. dotnet test
  3. kiket extensions replay --template workflow.before_transition --url https://preview.example.com/webhooks/workflow.before_transition
  4. dotnet 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.RotateAsync for short-lived credentials.

Observability

  • Telemetry is on by default—verify the events under Admin → Marketplace → SDK Telemetry.
  • Add structured logging via ILogger inside handlers or FeedbackHook to ship telemetry to Application Insights / Cloud Logging.
  • Keep /health accessible 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.
  • /health responds with status ok.
  • 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.

References