feat: Initialize Zastava Webhook service with TLS and Authority authentication
- Added Program.cs to set up the web application with Serilog for logging, health check endpoints, and a placeholder admission endpoint. - Configured Kestrel server to use TLS 1.3 and handle client certificates appropriately. - Created StellaOps.Zastava.Webhook.csproj with necessary dependencies including Serilog and Polly. - Documented tasks in TASKS.md for the Zastava Webhook project, outlining current work and exit criteria for each task.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Mongo2Go;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace Mongo2GoTests.Runner
|
||||
{
|
||||
public class MongoTransactionTest
|
||||
{
|
||||
internal static MongoDbRunner _runner;
|
||||
internal static IMongoCollection<TestDocument> _mainCollection;
|
||||
internal static IMongoCollection<TestDocument> _dependentCollection;
|
||||
internal static string _databaseName = "TransactionTest";
|
||||
internal static string _mainCollectionName = "MainCollection";
|
||||
internal static string _dependentCollectionName = "DependentCollection";
|
||||
internal static IMongoDatabase database;
|
||||
internal static IMongoClient client;
|
||||
internal static void CreateConnection(ushort? singleNodeReplSetWaitTimeout = null)
|
||||
{
|
||||
if (singleNodeReplSetWaitTimeout.HasValue)
|
||||
{
|
||||
_runner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: singleNodeReplSetWaitTimeout.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_runner = MongoDbRunner.Start(singleNodeReplSet: true);
|
||||
}
|
||||
|
||||
client = new MongoClient(_runner.ConnectionString);
|
||||
database = client.GetDatabase(_databaseName);
|
||||
_mainCollection = database.GetCollection<TestDocument>(_mainCollectionName);
|
||||
_dependentCollection = database.GetCollection<TestDocument>(_dependentCollectionName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user