Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add NATS service #6

Merged
merged 2 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions ocis/templates/nats/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nats
namespace: {{ $.Release.Namespace }}
labels:
{{- include "ocis.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
app: nats
{{- if and (not .Values.autoscaling.enabled) (.Values.replicas) }}
replicas: {{ .Values.replicas }}
{{- end }}
template:
metadata:
labels:
app: nats
spec:
containers:
- name: nats
{{- if .Values.image.sha }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}@sha256:{{ .Values.image.sha }}"
{{- else }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- end }}
command: ["ocis"]
args: ["nats-server", "server"]
env:
- name: NATS_LOG_COLOR
value: "{{ $.Values.logging.color }}"
- name: NATS_LOG_LEVEL
value: "{{ $.Values.logging.level }}"
- name: NATS_LOG_PRETTY
value: "{{ $.Values.logging.pretty }}"

- name: NATS_NATS_HOST
value: "0.0.0.0"
- name: NATS_NATS_PORT
value: "9233"

resources: {{ toYaml .Values.resources | nindent 12 }}
ports:
- containerPort: 9233 # NATS
14 changes: 14 additions & 0 deletions ocis/templates/nats/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: nats
namespace: {{ $.Release.Namespace }}
labels:
{{- include "ocis.labels" . | nindent 4 }}
spec:
ports:
- name: nats
port: 9233
protocol: TCP
selector:
app: nats
2 changes: 1 addition & 1 deletion ocis/templates/storage-metadata/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:

- name: STORAGE_HOME_DATAPROVIDER_INSECURE
value: "true"
- name: STORAGE_METADATA_GRPC_PROVIDER_ADDR
- name: STORAGE_METADATA_GRPC_ADDR
value: 0.0.0.0:9215
- name: STORAGE_METADATA_HTTP_ADDR
value: 0.0.0.0:9216
Expand Down