Compare commits

..

67 Commits

Author SHA1 Message Date
khwezi d57391f694 Merge pull request 'Updated nuget packages' (#34) from update into master
Reviewed-on: #34
2026-06-15 09:07:35 +02:00
Khwezi Mngoma 0f50f6f761 Updated nuget packages
continuous-integration/drone/pr Build is passing
2026-06-15 09:03:58 +02:00
khwezi 26e08e49a3 Merge pull request 'Updated merchant payment id handling' (#33) from payments into master
Reviewed-on: #33
2026-06-13 21:26:07 +02:00
Khwezi Mngoma 33baf27a9a Updated merchant payment id handling
continuous-integration/drone/pr Build is passing
2026-06-13 21:25:22 +02:00
khwezi e8cb47c007 Merge pull request 'Updated ledger handling' (#32) from payments into master
Reviewed-on: #32
2026-06-13 18:07:37 +02:00
Khwezi Mngoma 13b542f0cf Updated ledger handling
continuous-integration/drone/pr Build is passing
2026-06-13 18:07:03 +02:00
khwezi a91dd920ff Merge pull request 'Updated nuget packages' (#31) from payments into master
Reviewed-on: #31
2026-06-13 17:23:11 +02:00
Khwezi Mngoma 3e079a3726 Updated nuget packages
continuous-integration/drone/pr Build is passing
2026-06-13 17:21:26 +02:00
khwezi 8e81e0c0be Merge pull request 'Updated scheduler events' (#30) from payments into master
Reviewed-on: #30
2026-06-13 16:37:06 +02:00
Khwezi Mngoma c801901930 Updated scheduler events
continuous-integration/drone/pr Build is passing
2026-06-13 16:36:37 +02:00
khwezi 7a0f8d96cc Merge pull request 'Refactored valid payfast host list' (#29) from payments into master
Reviewed-on: #29
2026-06-13 12:12:45 +02:00
Khwezi Mngoma 496f728670 Refactored valid payfast host list
continuous-integration/drone/pr Build is passing
2026-06-13 12:11:20 +02:00
khwezi 81fb246ec6 Merge pull request 'Updated library references and configs' (#28) from payments into master
Reviewed-on: #28
2026-06-13 10:57:09 +02:00
Khwezi Mngoma 1710806038 Updated library references and configs
continuous-integration/drone/pr Build is passing
2026-06-13 10:56:38 +02:00
khwezi f215c3a2f7 Merge pull request 'Updated core' (#27) from payments into master
Reviewed-on: #27
2026-06-05 06:06:03 +02:00
Khwezi Mngoma 6d7027f10a Updated core
continuous-integration/drone/pr Build is passing
2026-06-05 06:05:13 +02:00
khwezi 3aba434859 Merge pull request 'Upgraded quartz' (#26) from payments into master
Reviewed-on: #26
2026-06-03 11:48:08 +02:00
Khwezi Mngoma 90569c6271 Upgraded quartz
continuous-integration/drone/pr Build is passing
2026-06-03 11:16:16 +02:00
khwezi b53e856ea2 Merge pull request 'Updates core system' (#25) from payments into master
Reviewed-on: #25
2026-06-03 08:46:21 +02:00
Khwezi Mngoma 02c21319e6 Updates core system
continuous-integration/drone/pr Build is passing
Refactored k8s manifest
2026-06-03 08:45:21 +02:00
khwezi b343dbe668 Merge pull request 'Refactored manifest' (#24) from payments into master
Reviewed-on: #24
2026-06-02 08:11:17 +02:00
Khwezi Mngoma d4c005602e Refactored manifest
continuous-integration/drone/pr Build is passing
2026-06-02 08:09:35 +02:00
khwezi 783ca2e9c5 Merge pull request 'Stable run' (#23) from payments into master
Reviewed-on: #23
2026-06-02 00:30:13 +02:00
Khwezi Mngoma 3d506cffd1 Stable run
continuous-integration/drone/pr Build is passing
2026-06-02 00:29:02 +02:00
khwezi cdc373562e Merge pull request 'Updated notification service' (#22) from migration into master
Reviewed-on: #22
2026-05-17 16:07:12 +02:00
Khwezi Mngoma f299e8952a Updated notification service
continuous-integration/drone/pr Build is passing
2026-05-17 16:06:46 +02:00
khwezi c54695c390 Merge pull request 'Externalised email processor cron setting' (#21) from migration into master
Reviewed-on: #21
2026-05-16 00:43:16 +02:00
Khwezi Mngoma c47fef80b3 Externalised email processor cron setting
continuous-integration/drone/pr Build is passing
2026-05-16 00:42:47 +02:00
khwezi e2d2009cac Merge pull request 'Fixed email sending logic' (#20) from migration into master
Reviewed-on: #20
2026-05-16 00:33:04 +02:00
Khwezi Mngoma 53b422433c Fixed email sending logic
continuous-integration/drone/pr Build is passing
2026-05-16 00:32:22 +02:00
khwezi 3769bb5bae Merge pull request 'Adjusted misfire threshold to 2min' (#19) from migration into master
Reviewed-on: #19
2026-05-15 22:32:01 +02:00
Khwezi Mngoma 547f8dd229 Adjusted misfire threshold to 2min
continuous-integration/drone/pr Build is passing
2026-05-15 22:31:38 +02:00
khwezi 13be0eab87 Merge pull request 'migration' (#18) from migration into master
Reviewed-on: #18
2026-05-15 22:05:36 +02:00
Khwezi Mngoma 5b8b1684c4 Refactored UAT to auto-rollout
continuous-integration/drone/pr Build is passing
2026-05-15 22:04:56 +02:00
Khwezi Mngoma e19f98e7ca Changed job fire-time from 1min to 5min intervals 2026-05-15 22:01:48 +02:00
khwezi 8a8ed98a91 Merge pull request 'Updated Feature package to fix quartz job misfire' (#17) from migration into master
Reviewed-on: #17
2026-05-15 09:59:22 +02:00
Khwezi Mngoma 4b8aecc779 Updated Feature package to fix quartz job misfire
continuous-integration/drone/pr Build is passing
2026-05-15 09:58:17 +02:00
khwezi f4a350b2e3 Merge pull request 'Updated nuget packafe Features' (#16) from migration into master
Reviewed-on: #16
2026-05-15 08:42:48 +02:00
Khwezi Mngoma e61f628804 Updated nuget packafe Features
continuous-integration/drone/pr Build is passing
2026-05-15 08:42:05 +02:00
khwezi 56dbe85868 Merge pull request 'Migrated to Feature only library reference' (#15) from migration into master
Reviewed-on: #15
2026-05-14 17:48:02 +02:00
Khwezi Mngoma 8fa3ac7546 Migrated to Feature only library reference
continuous-integration/drone/pr Build is passing
2026-05-14 17:47:00 +02:00
khwezi e238dcce59 Merge pull request 'Updated job orchestrator' (#14) from migration into master
Reviewed-on: #14
2026-05-10 17:37:41 +02:00
Khwezi Mngoma 88e70b1e81 Updated job orchestrator
continuous-integration/drone/pr Build is passing
2026-05-10 17:37:14 +02:00
khwezi 36dc31e85b Merge pull request 'Implemented startup jobs' (#13) from migration into master
Reviewed-on: #13
2026-05-10 17:22:01 +02:00
Khwezi Mngoma 41f92d0670 Implemented startup jobs
continuous-integration/drone/pr Build is passing
2026-05-10 17:20:57 +02:00
khwezi e9a1552e6d Merge pull request 'Updated to use new shop database' (#12) from migration into master
Reviewed-on: #12
2026-05-10 11:24:04 +02:00
Khwezi Mngoma 988ba4113c Updated to use new shop database
continuous-integration/drone/pr Build is passing
2026-05-10 11:23:35 +02:00
khwezi f62ac1bc71 Merge pull request 'Populated README' (#11) from migration into master
Reviewed-on: #11
2026-05-10 09:49:10 +02:00
Khwezi Mngoma 544eef0e49 Populated README
continuous-integration/drone/pr Build is passing
2026-05-10 09:47:42 +02:00
khwezi a7b9e945a3 Merge pull request 'Added host entry to my gitea instance to git tag and release commands' (#10) from migration into master
Reviewed-on: #10
2026-05-10 08:54:39 +02:00
Khwezi Mngoma 4a20c5ea5f Added host entry to my gitea instance to git tag and release commands
continuous-integration/drone/pr Build is passing
2026-05-10 08:54:14 +02:00
khwezi 6f5892c228 Merge pull request 'migration' (#9) from migration into master
Reviewed-on: #9
2026-05-10 08:47:01 +02:00
Khwezi Mngoma 23d992704e Removed image specification on uat deploy
continuous-integration/drone/pr Build is failing
2026-05-10 08:46:40 +02:00
Khwezi Mngoma 581cd2084a Added step to install curl on tag and release step 2026-05-10 08:45:54 +02:00
khwezi 87bfc65b34 Merge pull request 'Added git tag and release step to package' (#8) from migration into master
Reviewed-on: #8
2026-05-10 08:38:40 +02:00
Khwezi Mngoma aef2884e8e Added git tag and release step to package
continuous-integration/drone/pr Build is failing
2026-05-10 08:38:10 +02:00
khwezi c18635a0d4 Merge pull request 'migration' (#7) from migration into master
Reviewed-on: #7
2026-05-10 08:24:19 +02:00
Khwezi Mngoma 84597be935 Updated nuget packages
continuous-integration/drone/pr Build is passing
2026-05-10 08:23:50 +02:00
Khwezi Mngoma 13370ccb7f Increased replica sets from 1 to 3 2026-05-10 08:17:47 +02:00
khwezi ce7bcd20ac Merge pull request 'Refactored pipeline and k8s manifest' (#6) from migration into master
Reviewed-on: #6
2026-05-10 08:08:39 +02:00
Khwezi Mngoma d84de56a9d Refactored pipeline and k8s manifest
continuous-integration/drone/pr Build is passing
2026-05-10 08:08:01 +02:00
khwezi d7215ff278 Merge pull request 'Refactore manifest deployment name' (#5) from migration into master
Reviewed-on: #5
2026-05-09 19:00:31 +02:00
Khwezi Mngoma d934cc6251 Refactore manifest deployment name
continuous-integration/drone/pr Build is failing
2026-05-09 18:59:50 +02:00
khwezi 7dc60b1235 Merge pull request 'Refactored pipeline to ferer to the correct deployment name' (#4) from migration into master
Reviewed-on: #4
2026-05-09 18:50:57 +02:00
Khwezi Mngoma 113c3ef268 Refactored pipeline to ferer to the correct deployment name
continuous-integration/drone/pr Build is failing
2026-05-09 18:50:37 +02:00
khwezi f3936a34b9 Merge pull request 'Fixed pipeline to use the correct k8s manifest path' (#3) from migration into master
Reviewed-on: #3
2026-05-09 18:42:34 +02:00
Khwezi Mngoma f9287962a5 Fixed pipeline to use the correct k8s manifest path
continuous-integration/drone/pr Build is failing
2026-05-09 18:42:09 +02:00
8 changed files with 173 additions and 86 deletions
+26 -7
View File
@@ -31,20 +31,37 @@ steps:
registry: nexus.khongisa.co.za registry: nexus.khongisa.co.za
repo: nexus.khongisa.co.za/litecharms-scheduler repo: nexus.khongisa.co.za/litecharms-scheduler
tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ] tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ]
custom_labels:
- org.opencontainers.image.source=https://gitea.khongisa.co.za/litecharms/scheduler
- org.opencontainers.image.version=1.${DRONE_BUILD_NUMBER}
- org.opencontainers.image.revision=${DRONE_COMMIT_SHA}
username: { from_secret: docker_username } username: { from_secret: docker_username }
password: { from_secret: docker_password } password: { from_secret: docker_password }
- name: gitea-tag - name: gitea-tag-release
image: alpine/git image: alpine/git
environment: environment:
GITEA_TOKEN: { from_secret: git_token }
GITEA_USER: { from_secret: git_username } GITEA_USER: { from_secret: git_username }
GITEA_PASS: { from_secret: git_password } GITEA_PASS: { from_secret: git_password }
commands: commands:
- git config --global user.email "drone@litecharms.co.za" - echo "169.255.58.144 gitea.khongisa.co.za" >> /etc/hosts
- git config --global user.name "Drone CI" - apk add --no-cache curl
- git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/scheduler.git - git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/scheduler.git
- git tag 1.${DRONE_BUILD_NUMBER} - git tag 1.${DRONE_BUILD_NUMBER}
- git push origin 1.${DRONE_BUILD_NUMBER} - git push origin 1.${DRONE_BUILD_NUMBER}
- |
curl -X POST "https://gitea.khongisa.co.za/api/v1/repos/litecharms/scheduler/releases" \
-H "Authorization: token $${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"1.${DRONE_BUILD_NUMBER}\",
\"target_commitish\": \"${DRONE_COMMIT_SHA}\",
\"name\": \"Release 1.${DRONE_BUILD_NUMBER}\",
\"body\": \"### Artifacts\n* **Docker Image:** nexus.khongisa.co.za/litecharms-scheduler:1.${DRONE_BUILD_NUMBER}\n* **NuGet:** [View on Nexus](https://nexus.khongisa.co.za/repository/nuget-group/)\",
\"draft\": false,
\"prerelease\": false
}"
depends_on: depends_on:
- build - build
@@ -65,8 +82,9 @@ steps:
commands: commands:
- mkdir -p $HOME/.kube - mkdir -p $HOME/.kube
- echo "$KUBE_CONFIG" > $HOME/.kube/config - echo "$KUBE_CONFIG" > $HOME/.kube/config
- kubectl apply -f shop/litecharms-scheduler-uat.yml - kubectl apply -f litecharms-scheduler-uat.yml
- kubectl rollout restart deployment/litecharms-scheduler -n litecharms-scheduler-uat - sleep 10
- kubectl rollout restart statefulset/litecharms-scheduler-uat -n litecharms-scheduler-uat
depends_on: depends_on:
- package - package
@@ -87,8 +105,9 @@ steps:
commands: commands:
- mkdir -p $HOME/.kube - mkdir -p $HOME/.kube
- echo "$KUBE_CONFIG" > $HOME/.kube/config - echo "$KUBE_CONFIG" > $HOME/.kube/config
- kubectl apply -f litecharms-shop.yml - kubectl apply -f litecharms-scheduler.yml
- kubectl rollout restart shop/deployment/litecharms-scheduler -n litecharms-scheduler - sleep 10
- kubectl rollout restart statefulset/litecharms-scheduler -n litecharms-scheduler
depends_on: depends_on:
- uat - uat
@@ -8,8 +8,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="LiteCharms.Abstractions" Version="1.13.0" /> <PackageReference Include="LiteCharms.Features.MidrandBooks" Version="1.135.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.7" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.9" />
<PackageReference Include="Mediator.SourceGenerator" Version="3.0.2"> <PackageReference Include="Mediator.SourceGenerator" Version="3.0.2">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -18,13 +18,12 @@
<!-- Lite Charms Libraries --> <!-- Lite Charms Libraries -->
<ItemGroup> <ItemGroup>
<PackageReference Include="LiteCharms.Extensions" Version="1.13.0" /> <PackageReference Include="LiteCharms.Features" Version="1.135.0" />
<PackageReference Include="LiteCharms.Features" Version="1.13.0" />
<PackageReference Include="LiteCharms.Models" Version="1.13.0" />
</ItemGroup> </ItemGroup>
<!-- Shared Global Usings --> <!-- Shared Global Usings -->
<ItemGroup> <ItemGroup>
<Using Include="Quartz" /> <Using Include="Quartz" />
<Using Include="Mediator" />
</ItemGroup> </ItemGroup>
</Project> </Project>
+20 -10
View File
@@ -1,23 +1,33 @@
using LiteCharms.Extensions; using LiteCharms.Features.Extensions;
using LiteCharms.Features.Mediator;
using LiteCharms.Features.MidrandBooks.Extensions;
using LiteCharmsScheduler.Workers; using LiteCharmsScheduler.Workers;
using static LiteCharms.Abstractions.Constants; using static LiteCharms.Features.Extensions.Quartz;
var builder = Host.CreateApplicationBuilder(args); var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddMediator(); builder.Services.AddMediator();
builder.Services.AddEmailServiceBus();
builder.Services.AddSalesServiceBus();
builder.Services.AddGeneralServiceBus();
builder.Services.AddEmailServices(builder.Configuration);
builder.Services.AddShopDatabase(builder.Configuration);
builder.Services.AddQuartzSchedulerClient(ShopSchedulerName, ShopSchedulerInstanceId, builder.Configuration);
builder.Services.AddHostedService<Worker>(); builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(TelemetryPipelineBehavior<,>));
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineBehavior<,>));
builder.Services.AddEmailServices(builder.Configuration);
builder.Services.AddEmailServiceBus();
builder.Services.AddHttpClient();
builder.Services.AddShopServices();
builder.Services.AddPayfastServices(builder.Configuration);
builder.Services.AddHashServices(builder.Configuration);
builder.Services.AddMidrandShopDatabase(builder.Configuration);
builder.Services.AddQuartzScheduler(MidrandShopSchedulerName, builder.Configuration);
builder.Services.AddHostedService<JobWorker>();
var host = builder.Build(); var host = builder.Build();
var schedulerFactory = host.Services.GetRequiredService<ISchedulerFactory>(); var schedulerFactory = host.Services.GetRequiredService<ISchedulerFactory>();
var scheduler = await schedulerFactory.GetScheduler(ShopSchedulerName); var scheduler = await schedulerFactory.GetScheduler(MidrandShopSchedulerName);
if (!scheduler!.IsStarted) if (!scheduler!.IsStarted)
await scheduler.Start(); await scheduler.Start();
+8
View File
@@ -0,0 +1,8 @@
namespace LiteCharmsScheduler.Workers
{
public class JobWorker(ILogger<JobWorker> logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken) =>
logger.LogInformation("Midrand Books jobs initialized");
}
}
-17
View File
@@ -1,17 +0,0 @@
namespace LiteCharmsScheduler.Workers
{
public class Worker(ILogger<Worker> logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
if (logger.IsEnabled(LogLevel.Information))
{
logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
}
await Task.Delay(1000, stoppingToken);
}
}
}
}
+24 -9
View File
@@ -1,21 +1,36 @@
{ {
"Email": { "PayfastSettings": {
"Credentials": { "CheckoutUrl": "https://sandbox.payfast.co.za/eng/process",
"Username": "shop@litecharms.co.za" "ValidHosts": [
}, "www.payfast.co.za",
"Port": 465, "sandbox.payfast.co.za",
"Host": "mail.litecharms.co.za", "w1w.payfast.co.za",
"UseSsl": true "w2w.payfast.co.za",
"ips.payfast.co.za",
"api.payfast.co.za",
"payment.payfast.io"
]
},
"HasherSettings": {
"MinHashLength": 11
},
"BookshopS3Settings": {
"ServiceUrl": "http://192.168.1.177:30900",
"Region": "garage",
"BucketName": "bookshop",
"CdnBaseUrl": "https://bookshop.cdn.khongisa.co.za"
}, },
"Monitoring": { "Monitoring": {
"ApiKey": "", "ApiKey": "",
"Address": "http://aspire-dashboard-service.aspire.svc.cluster.local:18889", "Address": "http://aspire-dashboard-service.aspire.svc.cluster.local:18889",
"ServiceName": "LiteCharms.LeadGenerator" "ServiceName": "MidrandBooks.DEV"
}, },
"EmailProcessorCron": "0 */5 * * * ?",
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Warning"
} }
}, },
"AllowedHosts": "*" "AllowedHosts": "*"
+18 -1
View File
@@ -1 +1,18 @@
# LiteCharms # LiteCharms.Scheduler
The background processing engine responsible for automated tasks and scheduled jobs.
## 🏗 Architecture
* **Type:** Kubernetes **StatefulSet**
* **Persistence:** Uses Postgres at `192.168.1.170`.
* **Clustering:** Configured for Quartz.NET/Hangfire clustering to support multiple replicas without task duplication.
## 🚀 CI/CD Workflow
* **Trigger:** Pull Request to `master`.
* **Versioning:** Automated Gitea Releases with links to Docker and NuGet artifacts.
* **Identity:** Uses stable network identifiers (`litecharms-scheduler-0`, etc.) to maintain lock integrity in the database.
## ⚙️ Scaling
To scale the scheduler:
`kubectl scale statefulset litecharms-scheduler --replicas=3`
*Note: Ensure Database Job Store is enabled in appsettings before scaling.*
+72 -36
View File
@@ -17,6 +17,18 @@ data:
Email__Host: "mail.litecharms.co.za" Email__Host: "mail.litecharms.co.za"
Email__Port: "465" Email__Port: "465"
Email__UseSsl: "true" Email__UseSsl: "true"
EmailProcessorCron: "0 */5 * * * ?"
HasherSettings__MinHashLength: "11"
BookshopS3Settings__ServiceUrl: "http://garage.garage.svc.cluster.local:3900"
BookshopS3Settings__Region: "garage"
BookshopS3Settings__BucketName: "bookshop"
BookshopS3Settings__CdnBaseUrl: "https://bookshop.cdn.khongisa.co.za"
PayfastSettings__CheckoutUrl: "https://sandbox.payfast.co.za/eng/process"
PayfastSettings__ValidHosts__0: "www.payfast.co.za"
PayfastSettings__ValidHosts__1: "sandbox.payfast.co.za"
PayfastSettings__ValidHosts__2: "ips.payfast.co.za"
PayfastSettings__ValidHosts__3: "api.payfast.co.za"
PayfastSettings__ValidHosts__4: "payment.payfast.io"
--- ---
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@@ -25,31 +37,38 @@ metadata:
namespace: litecharms-scheduler-uat namespace: litecharms-scheduler-uat
type: Opaque type: Opaque
data: data:
connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPWxlYWRnZW5lcmF0b3ItZGV2O1VzZXJuYW1lPWxlYWRnZW5lcmF0b3I7UGFzc3dvcmQ9S2VLNDRsczRQWHBuYms7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU= connection-string-quartz: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl
connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPW1pZHJhbmRzaG9wLWRldjtVc2VybmFtZT1taWRyYW5kc2hvcC1kZXYtdXNlcjtQYXNzd29yZD1hUFh5a0tnM3RTOWNtRDtQZXJzaXN0IFNlY3VyaXR5IEluZm89VHJ1ZQ==
discord-webhook: aHR0cHM6Ly9kaXNjb3JkLmNvbS9hcGkvd2ViaG9va3MvMTUwMDIzMzEyOTYwNzAzNjk3MC9KYzc5endwMjlxYWpLbmoyYkR3cm5GR0RJci11ZGIyV2JIUDZTYjdpT0hCTWpQSUY3Vkw5eUVHTkJUSXpSOVVWVzI0bQ== discord-webhook: aHR0cHM6Ly9kaXNjb3JkLmNvbS9hcGkvd2ViaG9va3MvMTUwMDIzMzEyOTYwNzAzNjk3MC9KYzc5endwMjlxYWpLbmoyYkR3cm5GR0RJci11ZGIyV2JIUDZTYjdpT0hCTWpQSUY3Vkw5eUVHTkJUSXpSOVVWVzI0bQ==
aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw== aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw==
email-password: JFpTLWVJQGlYbTVNUCRhfg== email-password: JFpTLWVJQGlYbTVNUCRhfg==
quartz-store: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QpU2VjdXJpdHkgSW5mbz1UcnVl hasher-salt: VEdsbmFIUWdRMmhoY20xekxDQk5hV1J5WVc1a1FtOXZhM01nYldGclpTQnNiM1J6SUc5bUlHMXZibVY1SUdGdVpDQmhjbVVnWVNCemRXTmpaWE56Wm5Wc0lIWnBjbUZzSUhOMGIzSjVJR2x1SUZOdmRYUm9JRUZtY21sallRPT0=
bookshop-s3-accesskey: R0s1MTRkMmNlOGRjNjkyMzdhMDVjMDFlZWY=
bookshop-s3-secretkey: ZWFhZmVkYTFhZWQ0MDllY2ZlNjA3MTRlY2RhNTQ5YjgyYmRmNWEzZGFmOWYxOGRkNjFmNjZiNDk3M2E2NDgyZQ==
payfast-passphrase: OUdBSVIwdFdwaFgwcU8=
payfast-merchantid: MTAwNDkzMDc=
payfast-merchantkey: anU2bmF2bjBqY2JmMA==
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: Service
metadata: metadata:
name: scheduler-data-pvc name: scheduler-worker-service
namespace: litecharms-scheduler-uat namespace: litecharms-scheduler-uat
spec: spec:
accessModes: ["ReadWriteMany"] clusterIP: None
storageClassName: nfs-storage selector:
resources: app: scheduler
requests: ports:
storage: 2Gi - port: 80
name: dummy-port
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: litecharms-scheduler name: litecharms-scheduler-uat
namespace: litecharms-scheduler-uat namespace: litecharms-scheduler-uat
spec: spec:
serviceName: "scheduler-worker" serviceName: "scheduler-worker-service"
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
@@ -62,6 +81,7 @@ spec:
containers: containers:
- name: scheduler - name: scheduler
image: nexus.khongisa.co.za/litecharms-scheduler:latest image: nexus.khongisa.co.za/litecharms-scheduler:latest
imagePullPolicy: Always
resources: resources:
limits: limits:
memory: "2Gi" memory: "2Gi"
@@ -73,6 +93,46 @@ spec:
- configMapRef: - configMapRef:
name: scheduler-config name: scheduler-config
env: env:
- name: BookshopS3Settings__AccessKey
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: bookshop-s3-accesskey
- name: BookshopS3Settings__SecretKey
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: bookshop-s3-secretkey
- name: HasherSettings__Salt
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: hasher-salt
- name: PayfastSettings__Passphrase
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: payfast-passphrase
- name: PayfastSettings__MerchantId
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: payfast-merchantid
- name: PayfastSettings__MerchantKey
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: payfast-merchantkey
- name: ConnectionStrings__PostgresMidrandBooks
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: connection-string
- name: Monitoring__ApiKey
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: aspire-apikey
- name: Email__Credentials__Password - name: Email__Credentials__Password
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@@ -82,12 +142,7 @@ spec:
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: scheduler-secrets name: scheduler-secrets
key: quartz-store key: connection-string-quartz
- name: ConnectionStrings__PostgresShop
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: connection-string
- name: ConnectionStrings__DiscordShop - name: ConnectionStrings__DiscordShop
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@@ -98,22 +153,3 @@ spec:
secretKeyRef: secretKeyRef:
name: scheduler-secrets name: scheduler-secrets
key: aspire-apikey key: aspire-apikey
volumeMounts:
- name: storage
mountPath: /app/wwwroot/content
subPath: content
- name: storage
mountPath: /app/keys
subPath: dataprotection-keys
livenessProbe:
exec:
command:
- /bin/sh
- -c
- ps aux | grep LiteCharmsScheduler.dll | grep -v grep
initialDelaySeconds: 30
periodSeconds: 60
volumes:
- name: storage
persistentVolumeClaim:
claimName: scheduler-data-pvc