-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
8a6d819
commit 40f7aa4
Showing
14 changed files
with
540 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:18 | ||
|
||
WORKDIR /app | ||
|
||
COPY ./src/package*.json ./ | ||
COPY ./src/tsconfig*.json ./ | ||
|
||
RUN npm install | ||
RUN npm install typescript -g | ||
|
||
COPY ./src/app.ts ./ | ||
COPY ./src/types.ts ./ | ||
COPY ./src/providers/karapace.ts ./providers/ | ||
|
||
RUN tsc | ||
|
||
EXPOSE 3000 | ||
|
||
CMD [ "node", "app.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
build: | ||
docker build -t schema-registry-manager . | ||
|
||
release: build | ||
docker tag schema-registry-manager ghcr.io/airyhq/backend/schema-registry-manager:release | ||
docker push ghcr.io/airyhq/backend/schema-registry-manager:release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
load("//tools/build:helm.bzl", "helm_ruleset_core_version") | ||
|
||
helm_ruleset_core_version() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v2 | ||
appVersion: "1.0" | ||
description: Schema registry component to manage different providers | ||
name: schema-registry-manager | ||
version: 1.0 |
10 changes: 10 additions & 0 deletions
10
backend/components/schema-registry-manager/helm/templates/configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Values.component }} | ||
labels: | ||
core.airy.co/managed: "true" | ||
core.airy.co/mandatory: "{{ .Values.mandatory }}" | ||
core.airy.co/component: "{{ .Values.component }}" | ||
annotations: | ||
core.airy.co/enabled: "{{ .Values.enabled }}" |
48 changes: 48 additions & 0 deletions
48
backend/components/schema-registry-manager/helm/templates/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.component }} | ||
labels: | ||
app: {{ .Values.component }} | ||
core.airy.co/managed: "true" | ||
core.airy.co/mandatory: "{{ .Values.mandatory }}" | ||
core.airy.co/component: {{ .Values.component }} | ||
spec: | ||
replicas: {{ if .Values.enabled }} 1 {{ else }} 0 {{ end }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.component }} | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 1 | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.component }} | ||
spec: | ||
containers: | ||
- name: app | ||
image: "ghcr.io/airyhq/{{ .Values.image }}:{{ .Values.imageTag }}" | ||
imagePullPolicy: Always | ||
envFrom: | ||
- configMapRef: | ||
name: security | ||
- configMapRef: | ||
name: kafka-config | ||
- configMapRef: | ||
name: {{ .Values.component }} | ||
env: | ||
- name: KAFKA_TOPIC_NAME | ||
value: {{ .Values.kafka.topic }} | ||
livenessProbe: | ||
httpGet: | ||
path: /actuator/health | ||
port: {{ .Values.port }} | ||
httpHeaders: | ||
- name: Health-Check | ||
value: health-check | ||
initialDelaySeconds: 43200 | ||
periodSeconds: 10 | ||
failureThreshold: 3 |
15 changes: 15 additions & 0 deletions
15
backend/components/schema-registry-manager/helm/templates/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Values.component }} | ||
labels: | ||
app: {{ .Values.component }} | ||
spec: | ||
type: ClusterIP | ||
clusterIP: None | ||
ports: | ||
- name: {{ .Values.component }} | ||
port: 80 | ||
targetPort: {{ .Values.port }} | ||
selector: | ||
app: {{ .Values.component }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
component: schema-registry-manager | ||
mandatory: false | ||
enabled: false | ||
image: backend/schema-registry-manager | ||
imageTag: release | ||
port: 3000 | ||
resources: | ||
kafka: | ||
topic: application.communication.messages |
Oops, something went wrong.