Skip to content

Commit

Permalink
Merge pull request #3 from ns1labs/feature/sinker
Browse files Browse the repository at this point in the history
add sinker service, expose other gRPC services
  • Loading branch information
weyrick authored Nov 11, 2021
2 parents 01dd971 + cc0ebf4 commit e71e2dd
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/orb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: orb
description: Orb Observability Platform
icon: https://avatars1.githubusercontent.com/u/13207490
type: application
version: 1.0.4
version: 1.0.5
appVersion: "0.9.0"
home: https://getorb.io
sources:
Expand Down
2 changes: 2 additions & 0 deletions charts/orb/templates/fleet-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ spec:
- name: ORB_FLEET_ES_URL
value:
{{ .Release.Name }}-redis-streams-master:{{ .Values.fleet.redisESPort }}
- name: ORB_FLEET_GRPC_PORT
value: "{{ .Values.fleet.grpcPort }}"
- name: ORB_FLEET_HTTP_PORT
value: "{{ .Values.fleet.httpPort }}"
- name: ORB_FLEET_LOG_LEVEL
Expand Down
6 changes: 6 additions & 0 deletions charts/orb/templates/policies-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ spec:
- name: ORB_POLICIES_ES_URL
value:
{{ .Release.Name }}-redis-streams-master:{{ .Values.policies.redisESPort }}
- name: ORB_FLEET_GRPC_URL
value:
{{ .Release.Name }}-envoy:{{ .Values.fleet.grpcPort }}
- name: ORB_SINKS_GRPC_URL
value:
{{ .Release.Name }}-envoy:{{ .Values.sinks.grpcPort }}
- name: ORB_POLICIES_HTTP_PORT
value: "{{ .Values.policies.httpPort }}"
- name: ORB_POLICIES_GRPC_PORT
Expand Down
56 changes: 56 additions & 0 deletions charts/orb/templates/sinker-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-sinker
spec:
replicas: {{ .Values.defaults.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}
component: sinker
template:
metadata:
annotations:
commit_sha: {{ .Values.defaults.image.commitHash }}
labels:
app: {{ .Release.Name }}
component: sinker
spec:
containers:
- env:
- name: MF_JAEGER_URL
value:
{{ .Release.Name }}-jaeger-operator-jaeger-agent:{{ .Values.defaults.jaegerPort }}
- name: ORB_SINKER_ES_URL
value:
{{ .Release.Name }}-redis-streams-master:{{ .Values.sinker.redisESPort }}
- name: ORB_FLEET_GRPC_URL
value:
{{ .Release.Name }}-envoy:{{ .Values.fleet.grpcPort }}
- name: ORB_SINKS_GRPC_URL
value:
{{ .Release.Name }}-envoy:{{ .Values.sinks.grpcPort }}
- name: ORB_POLICIES_GRPC_URL
value:
{{ .Release.Name }}-envoy:{{ .Values.policies.grpcPort }}
- name: ORB_SINKER_HTTP_PORT
value: "{{ .Values.sinker.httpPort }}"
- name: ORB_SINKER_LOG_LEVEL
value: {{ default .Values.defaults.logLevel .Values.sinker.logLevel }}
- name: ORB_SINKER_NATS_URL
value:
nats://{{ .Release.Name }}-nats-client:{{ .Values.defaults.natsPort }}
- name: MF_AUTH_GRPC_URL
value:
{{ .Release.Name }}-envoy:{{ .Values.auth.grpcPort }}
image: "{{ default .Values.defaults.image.repository }}/orb-sinker:{{ default .Values.defaults.image.tag }}"
imagePullPolicy: {{ default .Values.defaults.image.pullPolicy .Values.sinker.image.pullPolicy }}
name: {{ .Release.Name }}-sinker
ports:
- containerPort: {{ .Values.sinker.httpPort }}
protocol: TCP
dnsPolicy: ClusterFirst
restartPolicy: Always
15 changes: 15 additions & 0 deletions charts/orb/templates/sinker-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-sinker
spec:
selector:
app: {{ .Release.Name }}
component: sinker
ports:
- protocol: TCP
port: {{ .Values.sinker.httpPort }}
name: {{ .Release.Name }}-sinker-http
2 changes: 2 additions & 0 deletions charts/orb/templates/sinks-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ spec:
value: "{{ .Values.sinks.dbSSL }}"
- name: ORB_SINKS_DB_USER
value: {{ index .Values "postgresql-sinks" "postgresqlUsername" }}
- name: ORB_SINKS_GRPC_PORT
value: "{{ .Values.sinks.grpcPort }}"
- name: ORB_SINKS_ES_URL
value:
{{ .Release.Name }}-redis-streams-master:{{ .Values.sinks.redisESPort }}
Expand Down
7 changes: 7 additions & 0 deletions charts/orb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ fleet:
image: { }
dbPort: 5432
dbSSL: "disable"
grpcPort: 8283
httpPort: 8203
redisESPort: 6379

Expand All @@ -73,9 +74,15 @@ sinks:
image: { }
dbPort: 5432
dbSSL: "disable"
grpcPort: 8280
httpPort: 8200
redisESPort: 6379

sinker:
image: { }
httpPort: 8201
redisESPort: 6379

things:
image: { }
dbPort: 5432
Expand Down

0 comments on commit e71e2dd

Please sign in to comment.