feat: implement Remote WinBox worker, API, frontend integration, OpenBao persistence, and supporting docs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.name" -}}
|
||||
{{- define "the-other-dude.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
@@ -10,7 +10,7 @@ Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.fullname" -}}
|
||||
{{- define "the-other-dude.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.chart" -}}
|
||||
{{- define "the-other-dude.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels applied to all resources.
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.labels" -}}
|
||||
helm.sh/chart: {{ include "mikrotik-portal.chart" . }}
|
||||
{{ include "mikrotik-portal.selectorLabels" . }}
|
||||
{{- define "the-other-dude.labels" -}}
|
||||
helm.sh/chart: {{ include "the-other-dude.chart" . }}
|
||||
{{ include "the-other-dude.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
@@ -45,81 +45,81 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{/*
|
||||
Selector labels — used in Deployments/Services to match pods.
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "mikrotik-portal.name" . }}
|
||||
{{- define "the-other-dude.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "the-other-dude.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
API component labels
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.apiLabels" -}}
|
||||
{{ include "mikrotik-portal.labels" . }}
|
||||
{{- define "the-other-dude.apiLabels" -}}
|
||||
{{ include "the-other-dude.labels" . }}
|
||||
app.kubernetes.io/component: api
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
API selector labels
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.apiSelectorLabels" -}}
|
||||
{{ include "mikrotik-portal.selectorLabels" . }}
|
||||
{{- define "the-other-dude.apiSelectorLabels" -}}
|
||||
{{ include "the-other-dude.selectorLabels" . }}
|
||||
app.kubernetes.io/component: api
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Frontend component labels
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.frontendLabels" -}}
|
||||
{{ include "mikrotik-portal.labels" . }}
|
||||
{{- define "the-other-dude.frontendLabels" -}}
|
||||
{{ include "the-other-dude.labels" . }}
|
||||
app.kubernetes.io/component: frontend
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Frontend selector labels
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.frontendSelectorLabels" -}}
|
||||
{{ include "mikrotik-portal.selectorLabels" . }}
|
||||
{{- define "the-other-dude.frontendSelectorLabels" -}}
|
||||
{{ include "the-other-dude.selectorLabels" . }}
|
||||
app.kubernetes.io/component: frontend
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
PostgreSQL component labels
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.postgresLabels" -}}
|
||||
{{ include "mikrotik-portal.labels" . }}
|
||||
{{- define "the-other-dude.postgresLabels" -}}
|
||||
{{ include "the-other-dude.labels" . }}
|
||||
app.kubernetes.io/component: postgres
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
PostgreSQL selector labels
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.postgresSelectorLabels" -}}
|
||||
{{ include "mikrotik-portal.selectorLabels" . }}
|
||||
{{- define "the-other-dude.postgresSelectorLabels" -}}
|
||||
{{ include "the-other-dude.selectorLabels" . }}
|
||||
app.kubernetes.io/component: postgres
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Redis component labels
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.redisLabels" -}}
|
||||
{{ include "mikrotik-portal.labels" . }}
|
||||
{{- define "the-other-dude.redisLabels" -}}
|
||||
{{ include "the-other-dude.labels" . }}
|
||||
app.kubernetes.io/component: redis
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Redis selector labels
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.redisSelectorLabels" -}}
|
||||
{{ include "mikrotik-portal.selectorLabels" . }}
|
||||
{{- define "the-other-dude.redisSelectorLabels" -}}
|
||||
{{ include "the-other-dude.selectorLabels" . }}
|
||||
app.kubernetes.io/component: redis
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use.
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.serviceAccountName" -}}
|
||||
{{- define "the-other-dude.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "mikrotik-portal.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- default (include "the-other-dude.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
@@ -129,9 +129,9 @@ Create the name of the service account to use.
|
||||
Database URL for the API service (constructed from service names).
|
||||
Uses external URL if postgres.enabled=false.
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.databaseUrl" -}}
|
||||
{{- define "the-other-dude.databaseUrl" -}}
|
||||
{{- if .Values.postgres.enabled }}
|
||||
{{- printf "postgresql+asyncpg://%s:%s@%s-postgres:%d/%s" .Values.postgres.auth.username .Values.secrets.dbPassword (include "mikrotik-portal.fullname" .) (int .Values.postgres.service.port) .Values.postgres.auth.database }}
|
||||
{{- printf "postgresql+asyncpg://%s:%s@%s-postgres:%d/%s" .Values.postgres.auth.username .Values.secrets.dbPassword (include "the-other-dude.fullname" .) (int .Values.postgres.service.port) .Values.postgres.auth.database }}
|
||||
{{- else }}
|
||||
{{- .Values.postgres.externalUrl }}
|
||||
{{- end }}
|
||||
@@ -140,9 +140,9 @@ Uses external URL if postgres.enabled=false.
|
||||
{{/*
|
||||
App user database URL (RLS enforced).
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.appUserDatabaseUrl" -}}
|
||||
{{- define "the-other-dude.appUserDatabaseUrl" -}}
|
||||
{{- if .Values.postgres.enabled }}
|
||||
{{- printf "postgresql+asyncpg://%s:%s@%s-postgres:%d/%s" .Values.postgres.auth.appUsername .Values.secrets.dbAppPassword (include "mikrotik-portal.fullname" .) (int .Values.postgres.service.port) .Values.postgres.auth.database }}
|
||||
{{- printf "postgresql+asyncpg://%s:%s@%s-postgres:%d/%s" .Values.postgres.auth.appUsername .Values.secrets.dbAppPassword (include "the-other-dude.fullname" .) (int .Values.postgres.service.port) .Values.postgres.auth.database }}
|
||||
{{- else }}
|
||||
{{- .Values.postgres.externalUrl }}
|
||||
{{- end }}
|
||||
@@ -151,9 +151,9 @@ App user database URL (RLS enforced).
|
||||
{{/*
|
||||
Sync database URL for Alembic migrations.
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.syncDatabaseUrl" -}}
|
||||
{{- define "the-other-dude.syncDatabaseUrl" -}}
|
||||
{{- if .Values.postgres.enabled }}
|
||||
{{- printf "postgresql+psycopg2://%s:%s@%s-postgres:%d/%s" .Values.postgres.auth.username .Values.secrets.dbPassword (include "mikrotik-portal.fullname" .) (int .Values.postgres.service.port) .Values.postgres.auth.database }}
|
||||
{{- printf "postgresql+psycopg2://%s:%s@%s-postgres:%d/%s" .Values.postgres.auth.username .Values.secrets.dbPassword (include "the-other-dude.fullname" .) (int .Values.postgres.service.port) .Values.postgres.auth.database }}
|
||||
{{- else }}
|
||||
{{- .Values.postgres.externalUrl | replace "asyncpg" "psycopg2" }}
|
||||
{{- end }}
|
||||
@@ -162,9 +162,9 @@ Sync database URL for Alembic migrations.
|
||||
{{/*
|
||||
Redis URL (constructed from service name).
|
||||
*/}}
|
||||
{{- define "mikrotik-portal.redisUrl" -}}
|
||||
{{- define "the-other-dude.redisUrl" -}}
|
||||
{{- if .Values.redis.enabled }}
|
||||
{{- printf "redis://%s-redis:%d/0" (include "mikrotik-portal.fullname" .) (int .Values.redis.service.port) }}
|
||||
{{- printf "redis://%s-redis:%d/0" (include "the-other-dude.fullname" .) (int .Values.redis.service.port) }}
|
||||
{{- else }}
|
||||
{{- .Values.redis.externalUrl | default "redis://localhost:6379/0" }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-api
|
||||
name: {{ include "the-other-dude.fullname" . }}-api
|
||||
labels:
|
||||
{{- include "mikrotik-portal.apiLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.apiLabels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.api.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mikrotik-portal.apiSelectorLabels" . | nindent 6 }}
|
||||
{{- include "the-other-dude.apiSelectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "mikrotik-portal.apiSelectorLabels" . | nindent 8 }}
|
||||
{{- include "the-other-dude.apiSelectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
@@ -29,28 +29,28 @@ spec:
|
||||
# Load non-sensitive config from ConfigMap
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-config
|
||||
name: {{ include "the-other-dude.fullname" . }}-config
|
||||
# Load secrets as individual environment variables
|
||||
env:
|
||||
- name: JWT_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-secrets
|
||||
name: {{ include "the-other-dude.fullname" . }}-secrets
|
||||
key: JWT_SECRET_KEY
|
||||
- name: CREDENTIAL_ENCRYPTION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-secrets
|
||||
name: {{ include "the-other-dude.fullname" . }}-secrets
|
||||
key: CREDENTIAL_ENCRYPTION_KEY
|
||||
- name: FIRST_ADMIN_EMAIL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-secrets
|
||||
name: {{ include "the-other-dude.fullname" . }}-secrets
|
||||
key: FIRST_ADMIN_EMAIL
|
||||
- name: FIRST_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-secrets
|
||||
name: {{ include "the-other-dude.fullname" . }}-secrets
|
||||
key: FIRST_ADMIN_PASSWORD
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-api
|
||||
name: {{ include "the-other-dude.fullname" . }}-api
|
||||
labels:
|
||||
{{- include "mikrotik-portal.apiLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.apiLabels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.api.service.type }}
|
||||
ports:
|
||||
@@ -12,4 +12,4 @@ spec:
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "mikrotik-portal.apiSelectorLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.apiSelectorLabels" . | nindent 4 }}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-config
|
||||
name: {{ include "the-other-dude.fullname" . }}-config
|
||||
labels:
|
||||
{{- include "mikrotik-portal.labels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.labels" . | nindent 4 }}
|
||||
data:
|
||||
DATABASE_URL: {{ include "mikrotik-portal.databaseUrl" . | quote }}
|
||||
SYNC_DATABASE_URL: {{ include "mikrotik-portal.syncDatabaseUrl" . | quote }}
|
||||
APP_USER_DATABASE_URL: {{ include "mikrotik-portal.appUserDatabaseUrl" . | quote }}
|
||||
REDIS_URL: {{ include "mikrotik-portal.redisUrl" . | quote }}
|
||||
NATS_URL: {{ printf "nats://%s-nats:%d" (include "mikrotik-portal.fullname" .) (int .Values.nats.service.port) | quote }}
|
||||
DATABASE_URL: {{ include "the-other-dude.databaseUrl" . | quote }}
|
||||
SYNC_DATABASE_URL: {{ include "the-other-dude.syncDatabaseUrl" . | quote }}
|
||||
APP_USER_DATABASE_URL: {{ include "the-other-dude.appUserDatabaseUrl" . | quote }}
|
||||
REDIS_URL: {{ include "the-other-dude.redisUrl" . | quote }}
|
||||
NATS_URL: {{ printf "nats://%s-nats:%d" (include "the-other-dude.fullname" .) (int .Values.nats.service.port) | quote }}
|
||||
JWT_ALGORITHM: "HS256"
|
||||
JWT_ACCESS_TOKEN_EXPIRE_MINUTES: {{ .Values.api.env.jwtAccessTokenExpireMinutes | quote }}
|
||||
JWT_REFRESH_TOKEN_EXPIRE_DAYS: {{ .Values.api.env.jwtRefreshTokenExpireDays | quote }}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-frontend
|
||||
name: {{ include "the-other-dude.fullname" . }}-frontend
|
||||
labels:
|
||||
{{- include "mikrotik-portal.frontendLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.frontendLabels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.frontend.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mikrotik-portal.frontendSelectorLabels" . | nindent 6 }}
|
||||
{{- include "the-other-dude.frontendSelectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "mikrotik-portal.frontendSelectorLabels" . | nindent 8 }}
|
||||
{{- include "the-other-dude.frontendSelectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: frontend
|
||||
@@ -42,9 +42,9 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-frontend
|
||||
name: {{ include "the-other-dude.fullname" . }}-frontend
|
||||
labels:
|
||||
{{- include "mikrotik-portal.frontendLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.frontendLabels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.frontend.service.type }}
|
||||
ports:
|
||||
@@ -53,4 +53,4 @@ spec:
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "mikrotik-portal.frontendSelectorLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.frontendSelectorLabels" . | nindent 4 }}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}
|
||||
name: {{ include "the-other-dude.fullname" . }}
|
||||
labels:
|
||||
{{- include "mikrotik-portal.labels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
@@ -16,11 +16,11 @@ spec:
|
||||
{{- if .Values.ingress.tls.enabled }}
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.ingress.host | default "mikrotik-portal.local" | quote }}
|
||||
secretName: {{ .Values.ingress.tls.secretName | default (printf "%s-tls" (include "mikrotik-portal.fullname" .)) | quote }}
|
||||
- {{ .Values.ingress.host | default "the-other-dude.local" | quote }}
|
||||
secretName: {{ .Values.ingress.tls.secretName | default (printf "%s-tls" (include "the-other-dude.fullname" .)) | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.ingress.host | default "mikrotik-portal.local" | quote }}
|
||||
- host: {{ .Values.ingress.host | default "the-other-dude.local" | quote }}
|
||||
http:
|
||||
paths:
|
||||
# API routes — send /api/* to the FastAPI service
|
||||
@@ -28,7 +28,7 @@ spec:
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-api
|
||||
name: {{ include "the-other-dude.fullname" . }}-api
|
||||
port:
|
||||
number: {{ .Values.api.service.port }}
|
||||
# Docs routes — proxy /docs and /redoc to API as well
|
||||
@@ -36,14 +36,14 @@ spec:
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-api
|
||||
name: {{ include "the-other-dude.fullname" . }}-api
|
||||
port:
|
||||
number: {{ .Values.api.service.port }}
|
||||
- path: /redoc
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-api
|
||||
name: {{ include "the-other-dude.fullname" . }}-api
|
||||
port:
|
||||
number: {{ .Values.api.service.port }}
|
||||
# Frontend SPA — all other routes go to nginx
|
||||
@@ -51,7 +51,7 @@ spec:
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-frontend
|
||||
name: {{ include "the-other-dude.fullname" . }}-frontend
|
||||
port:
|
||||
number: {{ .Values.frontend.service.port }}
|
||||
{{- end }}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-nats-headless
|
||||
name: {{ include "the-other-dude.fullname" . }}-nats-headless
|
||||
labels:
|
||||
{{- include "mikrotik-portal.labels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: nats
|
||||
spec:
|
||||
clusterIP: None
|
||||
@@ -15,16 +15,16 @@ spec:
|
||||
port: 4222
|
||||
targetPort: 4222
|
||||
selector:
|
||||
{{- include "mikrotik-portal.selectorLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: nats
|
||||
---
|
||||
# NATS ClusterIP service for client access
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-nats
|
||||
name: {{ include "the-other-dude.fullname" . }}-nats
|
||||
labels:
|
||||
{{- include "mikrotik-portal.labels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: nats
|
||||
spec:
|
||||
type: ClusterIP
|
||||
@@ -36,28 +36,28 @@ spec:
|
||||
port: 8222
|
||||
targetPort: 8222
|
||||
selector:
|
||||
{{- include "mikrotik-portal.selectorLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: nats
|
||||
---
|
||||
# NATS JetStream StatefulSet (needs stable storage)
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-nats
|
||||
name: {{ include "the-other-dude.fullname" . }}-nats
|
||||
labels:
|
||||
{{- include "mikrotik-portal.labels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: nats
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: {{ include "mikrotik-portal.fullname" . }}-nats-headless
|
||||
serviceName: {{ include "the-other-dude.fullname" . }}-nats-headless
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mikrotik-portal.selectorLabels" . | nindent 6 }}
|
||||
{{- include "the-other-dude.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: nats
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "mikrotik-portal.selectorLabels" . | nindent 8 }}
|
||||
{{- include "the-other-dude.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: nats
|
||||
spec:
|
||||
containers:
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-poller
|
||||
name: {{ include "the-other-dude.fullname" . }}-poller
|
||||
labels:
|
||||
{{- include "mikrotik-portal.labels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: poller
|
||||
spec:
|
||||
replicas: {{ .Values.poller.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mikrotik-portal.selectorLabels" . | nindent 6 }}
|
||||
{{- include "the-other-dude.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: poller
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "mikrotik-portal.selectorLabels" . | nindent 8 }}
|
||||
{{- include "the-other-dude.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: poller
|
||||
spec:
|
||||
containers:
|
||||
@@ -26,32 +26,32 @@ spec:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-secrets
|
||||
name: {{ include "the-other-dude.fullname" . }}-secrets
|
||||
key: POLLER_DATABASE_URL
|
||||
- name: CREDENTIAL_ENCRYPTION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-secrets
|
||||
name: {{ include "the-other-dude.fullname" . }}-secrets
|
||||
key: CREDENTIAL_ENCRYPTION_KEY
|
||||
- name: NATS_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-config
|
||||
name: {{ include "the-other-dude.fullname" . }}-config
|
||||
key: NATS_URL
|
||||
- name: REDIS_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-config
|
||||
name: {{ include "the-other-dude.fullname" . }}-config
|
||||
key: REDIS_URL
|
||||
- name: POLL_INTERVAL_SECONDS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-config
|
||||
name: {{ include "the-other-dude.fullname" . }}-config
|
||||
key: POLL_INTERVAL_SECONDS
|
||||
- name: LOG_LEVEL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-config
|
||||
name: {{ include "the-other-dude.fullname" . }}-config
|
||||
key: POLLER_LOG_LEVEL
|
||||
resources:
|
||||
requests:
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-postgres
|
||||
name: {{ include "the-other-dude.fullname" . }}-postgres
|
||||
labels:
|
||||
{{- include "mikrotik-portal.postgresLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.postgresLabels" . | nindent 4 }}
|
||||
spec:
|
||||
serviceName: {{ include "mikrotik-portal.fullname" . }}-postgres
|
||||
serviceName: {{ include "the-other-dude.fullname" . }}-postgres
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mikrotik-portal.postgresSelectorLabels" . | nindent 6 }}
|
||||
{{- include "the-other-dude.postgresSelectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "mikrotik-portal.postgresSelectorLabels" . | nindent 8 }}
|
||||
{{- include "the-other-dude.postgresSelectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
@@ -32,14 +32,14 @@ spec:
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-secrets
|
||||
name: {{ include "the-other-dude.fullname" . }}-secrets
|
||||
key: DB_PASSWORD
|
||||
- name: APP_USER
|
||||
value: {{ .Values.postgres.auth.appUsername | quote }}
|
||||
- name: APP_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-secrets
|
||||
name: {{ include "the-other-dude.fullname" . }}-secrets
|
||||
key: DB_APP_PASSWORD
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
@@ -74,7 +74,7 @@ spec:
|
||||
volumes:
|
||||
- name: init-scripts
|
||||
configMap:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-postgres-init
|
||||
name: {{ include "the-other-dude.fullname" . }}-postgres-init
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: postgres-data
|
||||
@@ -90,9 +90,9 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-postgres
|
||||
name: {{ include "the-other-dude.fullname" . }}-postgres
|
||||
labels:
|
||||
{{- include "mikrotik-portal.postgresLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.postgresLabels" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
@@ -102,14 +102,14 @@ spec:
|
||||
protocol: TCP
|
||||
name: postgres
|
||||
selector:
|
||||
{{- include "mikrotik-portal.postgresSelectorLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.postgresSelectorLabels" . | nindent 4 }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-postgres-init
|
||||
name: {{ include "the-other-dude.fullname" . }}-postgres-init
|
||||
labels:
|
||||
{{- include "mikrotik-portal.postgresLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.postgresLabels" . | nindent 4 }}
|
||||
data:
|
||||
init.sql: |
|
||||
-- Create non-superuser app_user role for RLS enforcement
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-redis
|
||||
name: {{ include "the-other-dude.fullname" . }}-redis
|
||||
labels:
|
||||
{{- include "mikrotik-portal.redisLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.redisLabels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mikrotik-portal.redisSelectorLabels" . | nindent 6 }}
|
||||
{{- include "the-other-dude.redisSelectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "mikrotik-portal.redisSelectorLabels" . | nindent 8 }}
|
||||
{{- include "the-other-dude.redisSelectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
@@ -45,9 +45,9 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-redis
|
||||
name: {{ include "the-other-dude.fullname" . }}-redis
|
||||
labels:
|
||||
{{- include "mikrotik-portal.redisLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.redisLabels" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
@@ -56,5 +56,5 @@ spec:
|
||||
protocol: TCP
|
||||
name: redis
|
||||
selector:
|
||||
{{- include "mikrotik-portal.redisSelectorLabels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.redisSelectorLabels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "mikrotik-portal.fullname" . }}-secrets
|
||||
name: {{ include "the-other-dude.fullname" . }}-secrets
|
||||
labels:
|
||||
{{- include "mikrotik-portal.labels" . | nindent 4 }}
|
||||
{{- include "the-other-dude.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
JWT_SECRET_KEY: {{ .Values.secrets.jwtSecretKey | quote }}
|
||||
@@ -12,4 +12,4 @@ stringData:
|
||||
FIRST_ADMIN_PASSWORD: {{ .Values.secrets.firstAdminPassword | quote }}
|
||||
DB_PASSWORD: {{ .Values.secrets.dbPassword | quote }}
|
||||
DB_APP_PASSWORD: {{ .Values.secrets.dbAppPassword | quote }}
|
||||
POLLER_DATABASE_URL: {{ printf "postgres://poller_user:%s@%s-postgres:%d/%s" .Values.secrets.dbPollerPassword (include "mikrotik-portal.fullname" .) (int .Values.postgres.service.port) .Values.postgres.auth.database | quote }}
|
||||
POLLER_DATABASE_URL: {{ printf "postgres://poller_user:%s@%s-postgres:%d/%s" .Values.secrets.dbPollerPassword (include "the-other-dude.fullname" .) (int .Values.postgres.service.port) .Values.postgres.auth.database | quote }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Default values for mikrotik-portal.
|
||||
# Default values for the-other-dude.
|
||||
# These values should work with `helm install` out of the box for development.
|
||||
# Production deployments MUST override secrets.jwtSecretKey, secrets.credentialEncryptionKey,
|
||||
# and secrets.firstAdminPassword.
|
||||
@@ -10,7 +10,7 @@ api:
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: mikrotik-portal/api
|
||||
repository: the-other-dude/api
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
@@ -54,7 +54,7 @@ frontend:
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: mikrotik-portal/frontend
|
||||
repository: the-other-dude/frontend
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
@@ -161,7 +161,7 @@ poller:
|
||||
replicaCount: 2
|
||||
|
||||
image:
|
||||
repository: mikrotik-portal/poller
|
||||
repository: the-other-dude/poller
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
@@ -191,7 +191,7 @@ ingress:
|
||||
|
||||
tls:
|
||||
enabled: false
|
||||
# secretName: mikrotik-portal-tls
|
||||
# secretName: the-other-dude-tls
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Secrets
|
||||
@@ -206,7 +206,7 @@ secrets:
|
||||
credentialEncryptionKey: ""
|
||||
|
||||
# First admin account (created on first startup)
|
||||
firstAdminEmail: "admin@mikrotik-portal.local"
|
||||
firstAdminEmail: "admin@the-other-dude.local"
|
||||
firstAdminPassword: ""
|
||||
|
||||
# PostgreSQL superuser password
|
||||
|
||||
Reference in New Issue
Block a user