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:
44
Mongo2Go-4.1.0/src/Mongo2Go/Helper/FileSystem.cs
Normal file
44
Mongo2Go-4.1.0/src/Mongo2Go/Helper/FileSystem.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
namespace Mongo2Go.Helper
|
||||
{
|
||||
public class FileSystem : IFileSystem
|
||||
{
|
||||
public void CreateFolder(string path)
|
||||
{
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteFolder(string path)
|
||||
{
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
Directory.Delete(path, true);
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteFile(string fullFileName)
|
||||
{
|
||||
if (File.Exists(fullFileName))
|
||||
{
|
||||
File.Delete(fullFileName);
|
||||
}
|
||||
}
|
||||
|
||||
public void MakeFileExecutable (string path)
|
||||
{
|
||||
//when on linux or osx we must set the executeble flag on mongo binarys
|
||||
var p = Process.Start("chmod", $"+x {path}");
|
||||
p.WaitForExit();
|
||||
|
||||
if (p.ExitCode != 0)
|
||||
{
|
||||
throw new IOException($"Could not set executable bit for {path}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user