mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 18:29:07 +00:00
helm mongo db deployment
This commit is contained in:
@@ -23,6 +23,9 @@ spec:
|
|||||||
- containerPort: 4000
|
- containerPort: 4000
|
||||||
env:
|
env:
|
||||||
{{- range $key, $value := .Values.secrets }}
|
{{- range $key, $value := .Values.secrets }}
|
||||||
|
{{- if eq $value "MUST_REPLACE" }}
|
||||||
|
{{ fail "Environment variables are not set. Please set all environment variables to continue." }}
|
||||||
|
{{ end }}
|
||||||
- name: {{ $key }}
|
- name: {{ $key }}
|
||||||
value: {{ $value }}
|
value: {{ $value }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{ if .Values.ingress.enabled }}
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
@@ -22,17 +23,18 @@ spec:
|
|||||||
- host: {{ .Values.ingress.hostName}}
|
- host: {{ .Values.ingress.hostName}}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: {{ .Values.ingress.frontend.path }}
|
||||||
pathType: Prefix
|
pathType: {{ .Values.ingress.frontend.pathType }}
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: infisical-frontend-service
|
name: infisical-frontend-service
|
||||||
port:
|
port:
|
||||||
number: 3000
|
number: 3000
|
||||||
- path: /api
|
- path: {{ .Values.ingress.backend.path }}
|
||||||
pathType: Prefix
|
pathType: {{ .Values.ingress.backend.pathType }}
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: infisical-backend-service
|
name: infisical-backend-service
|
||||||
port:
|
port:
|
||||||
number: 4000
|
number: 4000
|
||||||
|
{{ end }}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mongodb-deployment
|
||||||
|
namespace: {{ .Values.namespace }}
|
||||||
|
labels:
|
||||||
|
app: mongodb
|
||||||
|
spec:
|
||||||
|
replicas: 1 # Cannot be scaled. To scale, you must set up Stateful Set
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongodb
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mongodb
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mongodb
|
||||||
|
image: mongo
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
env:
|
||||||
|
- name: MONGO_INITDB_ROOT_USERNAME
|
||||||
|
value: root
|
||||||
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||||
|
value: root
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mongodb-service
|
||||||
|
namespace: {{ .Values.namespace }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mongodb
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 27017
|
||||||
|
targetPort: 27017 # container port
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
#####
|
||||||
|
# INFISICAL K8 DEFAULT VALUES FIL
|
||||||
|
# PLEASE REPLACE VALUES/EDIT AS REQUIRED
|
||||||
|
#####
|
||||||
|
|
||||||
namespace: infisical
|
namespace: infisical
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
@@ -15,22 +20,57 @@ backend:
|
|||||||
tag: "latest"
|
tag: "latest"
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: true
|
||||||
annotations: []
|
annotations: {}
|
||||||
hostName: example.com
|
hostName: example.com
|
||||||
tls: {}
|
frontend:
|
||||||
|
path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
path: /api
|
||||||
|
pathType: Prefix
|
||||||
|
tls: []
|
||||||
|
|
||||||
|
## Complete Ingress example
|
||||||
|
# ingress:
|
||||||
|
# enabled: true
|
||||||
|
# annotations:
|
||||||
|
# kubernetes.io/ingress.class: "nginx"
|
||||||
|
# cert-manager.io/issuer: letsencrypt-nginx
|
||||||
|
# hostName: example.com
|
||||||
|
# frontend:
|
||||||
|
# path: /
|
||||||
|
# pathType: Prefix
|
||||||
|
# backend:
|
||||||
|
# path: /api
|
||||||
|
# pathType: Prefix
|
||||||
|
# tls:
|
||||||
|
# hosts:
|
||||||
|
# - k8.infisical.com
|
||||||
|
# secretName: letsencrypt-nginx
|
||||||
|
|
||||||
|
###
|
||||||
|
### YOU MUST FILL IN ALL SECRETS BELOW
|
||||||
|
###
|
||||||
secrets:
|
secrets:
|
||||||
PRIVATE_KEY: REQUIRED
|
# Required keys for platform encryption/decryption ops. Replace with nacl sk keys
|
||||||
PUBLIC_KEY: REQUIRED
|
PRIVATE_KEY: MUST_REPLACE
|
||||||
ENCRYPTION_KEY: REQUIRED
|
PUBLIC_KEY: MUST_REPLACE
|
||||||
JWT_SIGNUP_SECRET: REQUIRED
|
ENCRYPTION_KEY: MUST_REPLACE
|
||||||
JWT_REFRESH_SECRET: REQUIRED
|
|
||||||
JWT_AUTH_SECRET: REQUIRED
|
# JWT
|
||||||
NODE_ENV: development
|
# Required secrets to sign JWT tokens
|
||||||
SMTP_HOST: REQUIRED
|
JWT_SIGNUP_SECRET: MUST_REPLACE
|
||||||
SMTP_NAME: REQUIRED
|
JWT_REFRESH_SECRET: MUST_REPLACE
|
||||||
SMTP_USERNAME: REQUIRED
|
JWT_AUTH_SECRET: MUST_REPLACE
|
||||||
SMTP_PASSWORD: REQUIRED
|
|
||||||
MONGO_URL: REQUIRED
|
# Mail/SMTP
|
||||||
|
# Required to send emails
|
||||||
|
SMTP_HOST: MUST_REPLACE
|
||||||
|
SMTP_NAME: MUST_REPLACE
|
||||||
|
SMTP_USERNAME: MUST_REPLACE
|
||||||
|
SMTP_PASSWORD: MUST_REPLACE
|
||||||
|
|
||||||
|
# You may replace with Mongo Cloud URI
|
||||||
|
MONGO_URL: mongodb://root:root@mongodb-service:27017/
|
||||||
|
|
||||||
Reference in New Issue
Block a user