-
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.
- Loading branch information
1 parent
4a7ccd3
commit 551539c
Showing
13 changed files
with
144 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
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 -g typescript | ||
|
||
RUN npm install -g ts-node | ||
|
||
COPY ./src/app.ts ./ | ||
|
||
EXPOSE 3000 | ||
|
||
CMD [ "ts-node", "app.ts" ] |
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,32 @@ | ||
load("@rules_pkg//:pkg.bzl", "pkg_tar") | ||
load("@com_github_airyhq_bazel_tools//helm:helm.bzl", "helm_template_test") | ||
load("//tools/build:helm.bzl", "helm_push_develop", "helm_push_release") | ||
|
||
filegroup( | ||
name = "files", | ||
srcs = glob( | ||
["**/*"], | ||
exclude = ["BUILD"], | ||
), | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
pkg_tar( | ||
name = "package", | ||
srcs = [":files"], | ||
extension = "tgz", | ||
strip_prefix = "./", | ||
) | ||
|
||
helm_template_test( | ||
name = "template", | ||
chart = ":package", | ||
) | ||
|
||
helm_push_develop( | ||
chart = ":package", | ||
) | ||
|
||
helm_push_release( | ||
chart = ":package", | ||
) |
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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.