Skip to content

Commit

Permalink
Merge branch 'nmshdb-68-improve-availability-of-consumer-api' of gith…
Browse files Browse the repository at this point in the history
…ub.com:nmshd/backbone into nmshdb-68-improve-availability-of-consumer-api
  • Loading branch information
tnotheis committed Apr 22, 2024
2 parents bc02de1 + 178bc05 commit a5e80e8
Show file tree
Hide file tree
Showing 11 changed files with 275 additions and 138 deletions.
2 changes: 1 addition & 1 deletion .ci/ehs/buildContainerImage.js → .ci/eh/buildContainerImage.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const tag = getRequiredEnvVar("TAG");
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64";
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : "";

await $`docker buildx build --file ./EventHandlerService/src/EventHandlerService/Dockerfile --tag ghcr.io/nmshd/backbone-event-handler-service:${tag} --platform ${platforms} ${push} .`;
await $`docker buildx build --file ./EventHandlerService/src/EventHandlerService/Dockerfile --tag ghcr.io/nmshd/backbone-event-handler:${tag} --platform ${platforms} ${push} .`;
6 changes: 3 additions & 3 deletions .github/workflows/publish-ehs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Publish Event Handler Service Container Image
on:
push:
tags:
- "ehs/*"
- "eh/*"

jobs:
publish-ehs-container-image:
publish-eh-container-image:
name: Publish Event Handler Service Container Image
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
driver: cloud
endpoint: "jssoft/js-soft"
- name: Build and Push Container Image
run: ./.ci/ehs/buildContainerImage.js
run: ./.ci/eh/buildContainerImage.js
env:
TAG: ${{ steps.extract-version-from-git-tag.outputs.VERSION }}
PUSH: 1
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:
TAG: test
PLATFORMS: linux/amd64

build-ehs-container-image:
build-eh-container-image:
name: Build Event Handler Service Container Image
runs-on: ubuntu-latest
steps:
Expand All @@ -216,7 +216,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
run: ./.ci/ehs/buildContainerImage.js
run: ./.ci/eh/buildContainerImage.js
env:
TAG: test
PLATFORMS: linux/amd64
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# mono
.mono

# Build results
[Dd]ebug/
[Dd]ebugPublic/
Expand Down
232 changes: 116 additions & 116 deletions AdminApi/src/AdminApi/ClientApp/package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions AdminApi/src/AdminApi/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.4",
"@angular/cdk": "^17.3.4",
"@angular/common": "^17.3.4",
"@angular/compiler": "^17.3.4",
"@angular/core": "^17.3.4",
"@angular/forms": "^17.3.4",
"@angular/material": "^17.3.4",
"@angular/platform-browser": "^17.3.4",
"@angular/platform-browser-dynamic": "^17.3.4",
"@angular/platform-server": "^17.3.4",
"@angular/router": "^17.3.4",
"@angular/animations": "^17.3.5",
"@angular/cdk": "^17.3.5",
"@angular/common": "^17.3.5",
"@angular/compiler": "^17.3.5",
"@angular/core": "^17.3.5",
"@angular/forms": "^17.3.5",
"@angular/material": "^17.3.5",
"@angular/platform-browser": "^17.3.5",
"@angular/platform-browser-dynamic": "^17.3.5",
"@angular/platform-server": "^17.3.5",
"@angular/router": "^17.3.5",
"@ngx-env/builder": "^17.3.0",
"bootstrap": "^5.3.3",
"jquery": "^3.7.1",
Expand All @@ -38,9 +38,9 @@
"zone.js": "~0.14.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.4",
"@angular/cli": "^17.3.4",
"@angular/compiler-cli": "^17.3.4",
"@angular-devkit/build-angular": "^17.3.5",
"@angular/cli": "^17.3.5",
"@angular/compiler-cli": "^17.3.5",
"@js-soft/eslint-config-ts": "^1.6.7",
"@js-soft/license-check": "^1.0.9",
"@types/jasmine": "~5.1.4",
Expand Down
2 changes: 1 addition & 1 deletion EventHandlerService/src/EventHandlerService/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ RUN dotnet publish -c Release -o /app/publish --no-restore "EventHandlerService.

FROM base AS final

RUN apt install libicu
RUN apk add icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=0

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion Jobs/src/Job.IdentityDeletion/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ RUN dotnet publish -c Release --output /app/publish --no-restore "Job.IdentityDe

FROM base AS final

RUN apt install libicu
RUN apk add icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=0

WORKDIR /app
Expand Down
9 changes: 9 additions & 0 deletions helm/charts/eventhandler/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v2
name: eventhandler
description: A Helm chart for Kubernetes

type: application

version: "1.0.0"

appVersion: "v1.0.0"
77 changes: 77 additions & 0 deletions helm/charts/eventhandler/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "global.name" . }}
labels:
{{- include "global.labels" . | nindent 4 }}
app: {{ include "global.name" . }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ include "global.name" . }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
app: {{ include "global.name" . }}
spec:
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
{{- with .Values.image.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: settings-override
configMap:
name: configuration
containers:
- name: {{ include "global.name" . }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
image: "{{ .Values.image.repository }}:{{- default .Chart.AppVersion .Values.image.tagOverride }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: settings-override
mountPath: /app/appsettings.override.json
subPath: appsettings.override.json
readOnly: true
env:
{{- if .Values.global.useBuiltInEventbus }}
- name: infrastructure__eventBus__vendor
value: RabbitMQ
- name: infrastructure__eventBus__connectionInfo
value: "rabbitmq"
- name: infrastructure__eventBus__rabbitMQUsername
value: "admin"
- name: infrastructure__eventBus__rabbitMQPassword
valueFrom:
secretKeyRef:
name: rabbitmq-password
key: "VALUE"
{{- end }}
{{- with .Values.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
48 changes: 48 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,54 @@ adminui:
# unhealthyThreshold - the number of consecutive failed checks required to mark a backend as unhealthy
unhealthyThreshold: 2

eventhandler:
nameOverride: ""
replicas: 1
maxSurge: 2
maxUnavailable: 0

image:
repository: "ghcr.io/nmshd/backbone-event-handler"
tagOverride: ""
pullPolicy: "IfNotPresent"
imagePullSecrets: []

# resources - the resources for the Event Handler container (see https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources)
resources:
requests:
cpu: "50m"
memory: "64Mi"
limits:
cpu: "200m"
memory: "512Mi"

# securityContext - securityContext for the Consumer API container (see https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1)
securityContext: {}

# podSecurityContext - securityContext for the pods deployed by the Deployment (see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
podSecurityContext: {}

podAnnotations: {}

# env - environment variables for the Event Handler container (see https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/)
env: []

# the nodeSelector for the pods deployed by the Deployment (see https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
nodeSelector: {}

# the tolerations for the pods deployed by the Deployment (see https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
tolerations: []

# the affinity for the pods deployed by the Deployment (see https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#NodeAffinity)
affinity: {}

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: ""

admincli:
nameOverride: ""

Expand Down

0 comments on commit a5e80e8

Please sign in to comment.