rebrand: Switchboard Core → Armature
- Rename Go module switchboard-core → armature (155+ files) - Rename Docker image → gobha/armature - Rename K8s resources, secrets, deployments - Rename Prometheus metrics switchboard_* → armature_* - Rename env vars SWITCHBOARD_ADMIN_* → ARMATURE_ADMIN_* - Rename DB names switchboard_core* → armature* - Update all frontend branding, notification templates, docs - Update CI scripts, e2e tests, Keycloak realm, nginx conf - Rename scripts/switchboard-ca.sh → scripts/armature-ca.sh - Rename k8s/switchboard.yaml → k8s/armature.yaml - Rename chart alerting/dashboard files - Fix: DockerHub push uses env: binding for secret injection - Helm chart updated (name, labels, template functions, dashboard, alerting) - Replace favicon/icon assets with Armature brand No functional changes. Pure mechanical rename + CI fix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
Chat Switchboard {{ .Chart.AppVersion }} deployed.
|
||||
Armature {{ .Chart.AppVersion }} deployed.
|
||||
|
||||
{{- if .Values.ingress.enabled }}
|
||||
Access the application at:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "switchboard.labels" -}}
|
||||
{{- define "armature.labels" -}}
|
||||
app.kubernetes.io/name: {{ .Chart.Name }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
@@ -12,23 +12,23 @@ helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
{{/*
|
||||
Backend selector labels
|
||||
*/}}
|
||||
{{- define "switchboard.backend.labels" -}}
|
||||
{{- define "armature.backend.labels" -}}
|
||||
app.kubernetes.io/component: backend
|
||||
{{ include "switchboard.labels" . }}
|
||||
{{ include "armature.labels" . }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Frontend selector labels
|
||||
*/}}
|
||||
{{- define "switchboard.frontend.labels" -}}
|
||||
{{- define "armature.frontend.labels" -}}
|
||||
app.kubernetes.io/component: frontend
|
||||
{{ include "switchboard.labels" . }}
|
||||
{{ include "armature.labels" . }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Secret name
|
||||
*/}}
|
||||
{{- define "switchboard.secretName" -}}
|
||||
{{- define "armature.secretName" -}}
|
||||
{{- if .Values.existingSecret -}}
|
||||
{{ .Values.existingSecret }}
|
||||
{{- else -}}
|
||||
@@ -39,21 +39,21 @@ Secret name
|
||||
{{/*
|
||||
Backend image
|
||||
*/}}
|
||||
{{- define "switchboard.backend.image" -}}
|
||||
{{- define "armature.backend.image" -}}
|
||||
{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag | default .Chart.AppVersion }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Frontend image
|
||||
*/}}
|
||||
{{- define "switchboard.frontend.image" -}}
|
||||
{{- define "armature.frontend.image" -}}
|
||||
{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag | default .Chart.AppVersion }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Database URL — assembled from postgres.* if url is empty
|
||||
*/}}
|
||||
{{- define "switchboard.databaseURL" -}}
|
||||
{{- define "armature.databaseURL" -}}
|
||||
{{- if .Values.database.url -}}
|
||||
{{ .Values.database.url }}
|
||||
{{- else if eq .Values.database.driver "sqlite" -}}
|
||||
|
||||
@@ -3,7 +3,7 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-config
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
data:
|
||||
PORT: {{ .Values.backend.port | quote }}
|
||||
BASE_PATH: {{ .Values.basePath | quote }}
|
||||
|
||||
@@ -4,7 +4,7 @@ kind: CronJob
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-backup
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: backup
|
||||
spec:
|
||||
schedule: {{ .Values.backup.schedule | quote }}
|
||||
@@ -35,7 +35,7 @@ spec:
|
||||
- |
|
||||
set -e
|
||||
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
|
||||
FILENAME="switchboard-${TIMESTAMP}.sql.gz"
|
||||
FILENAME="armature-${TIMESTAMP}.sql.gz"
|
||||
|
||||
echo "Starting backup: ${FILENAME}"
|
||||
pg_dump "${DATABASE_URL}" | gzip > "/backup/${FILENAME}"
|
||||
@@ -58,22 +58,22 @@ spec:
|
||||
|
||||
# Prune old local backups beyond retention
|
||||
cd /backup
|
||||
ls -t switchboard-*.sql.gz 2>/dev/null | tail -n +{{ add1 .Values.backup.retention }} | xargs -r rm -v
|
||||
ls -t armature-*.sql.gz 2>/dev/null | tail -n +{{ add1 .Values.backup.retention }} | xargs -r rm -v
|
||||
echo "Backup complete"
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
value: {{ include "switchboard.databaseURL" . | quote }}
|
||||
value: {{ include "armature.databaseURL" . | quote }}
|
||||
{{- if .Values.backup.s3.enabled }}
|
||||
- name: S3_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "switchboard.secretName" . }}
|
||||
name: {{ include "armature.secretName" . }}
|
||||
key: BACKUP_S3_ACCESS_KEY
|
||||
optional: true
|
||||
- name: S3_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "switchboard.secretName" . }}
|
||||
name: {{ include "armature.secretName" . }}
|
||||
key: BACKUP_S3_SECRET_KEY
|
||||
optional: true
|
||||
{{- end }}
|
||||
|
||||
@@ -3,7 +3,7 @@ kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-backend
|
||||
labels:
|
||||
{{- include "switchboard.backend.labels" . | nindent 4 }}
|
||||
{{- include "armature.backend.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.backend.replicaCount }}
|
||||
selector:
|
||||
@@ -38,7 +38,7 @@ spec:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
containers:
|
||||
- name: backend
|
||||
image: {{ include "switchboard.backend.image" . }}
|
||||
image: {{ include "armature.backend.image" . }}
|
||||
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
@@ -48,10 +48,10 @@ spec:
|
||||
- configMapRef:
|
||||
name: {{ .Release.Name }}-config
|
||||
- secretRef:
|
||||
name: {{ include "switchboard.secretName" . }}
|
||||
name: {{ include "armature.secretName" . }}
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
value: {{ include "switchboard.databaseURL" . | quote }}
|
||||
value: {{ include "armature.databaseURL" . | quote }}
|
||||
resources:
|
||||
{{- toYaml .Values.backend.resources | nindent 12 }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
|
||||
@@ -3,7 +3,7 @@ kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-frontend
|
||||
labels:
|
||||
{{- include "switchboard.frontend.labels" . | nindent 4 }}
|
||||
{{- include "armature.frontend.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.frontend.replicaCount }}
|
||||
selector:
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: frontend
|
||||
image: {{ include "switchboard.frontend.image" . }}
|
||||
image: {{ include "armature.frontend.image" . }}
|
||||
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "switchboard.fullname" . }}-grafana-dashboard
|
||||
name: {{ include "armature.fullname" . }}-grafana-dashboard
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
{{- with .Values.monitoring.grafanaDashboard.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
switchboard-overview.json: |-
|
||||
{{- .Files.Get "dashboards/switchboard-overview.json" | nindent 4 }}
|
||||
armature-overview.json: |-
|
||||
{{- .Files.Get "dashboards/armature-overview.json" | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -4,7 +4,7 @@ kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-ingress
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
{{- if or .Values.ingress.annotations (and (eq (default "traefik" .Values.ingress.className) "traefik") .Values.ingress.retry.annotateIngress) }}
|
||||
annotations:
|
||||
{{- with .Values.ingress.annotations }}
|
||||
|
||||
@@ -5,7 +5,7 @@ kind: Middleware
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-retry
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
spec:
|
||||
retry:
|
||||
attempts: {{ .Values.ingress.retry.attempts | default 2 }}
|
||||
|
||||
@@ -2,57 +2,57 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: {{ include "switchboard.fullname" . }}-alerts
|
||||
name: {{ include "armature.fullname" . }}-alerts
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
{{- with .Values.monitoring.prometheusRule.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
groups:
|
||||
- name: switchboard.rules
|
||||
- name: armature.rules
|
||||
rules:
|
||||
- alert: SwitchboardPodRestart
|
||||
- alert: ArmaturePodRestart
|
||||
expr: increase(kube_pod_container_status_restarts_total{container="backend"}[1h]) > 0
|
||||
for: 0m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: "Switchboard backend pod restarted (possible OOM)"
|
||||
- alert: SwitchboardProviderDown
|
||||
expr: switchboard_provider_status > 2
|
||||
summary: "Armature backend pod restarted (possible OOM)"
|
||||
- alert: ArmatureProviderDown
|
||||
expr: armature_provider_status > 2
|
||||
for: 5m
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
summary: "Provider {{`{{ $labels.provider_config_id }}`}} is down"
|
||||
- alert: SwitchboardDBPoolExhaustion
|
||||
expr: switchboard_db_in_use_connections / switchboard_db_open_connections > 0.8
|
||||
- alert: ArmatureDBPoolExhaustion
|
||||
expr: armature_db_in_use_connections / armature_db_open_connections > 0.8
|
||||
for: 5m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: "DB connection pool >80% utilized"
|
||||
- alert: SwitchboardHighErrorRate
|
||||
- alert: ArmatureHighErrorRate
|
||||
expr: |
|
||||
sum(rate(switchboard_http_requests_total{status=~"5.."}[5m]))
|
||||
/ sum(rate(switchboard_http_requests_total[5m])) > 0.05
|
||||
sum(rate(armature_http_requests_total{status=~"5.."}[5m]))
|
||||
/ sum(rate(armature_http_requests_total[5m])) > 0.05
|
||||
for: 5m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: "HTTP 5xx error rate exceeds 5%"
|
||||
- alert: SwitchboardTaskFailureRate
|
||||
- alert: ArmatureTaskFailureRate
|
||||
expr: |
|
||||
rate(switchboard_task_executions_total{status="error"}[15m])
|
||||
/ rate(switchboard_task_executions_total[15m]) > 0.25
|
||||
rate(armature_task_executions_total{status="error"}[15m])
|
||||
/ rate(armature_task_executions_total[15m]) > 0.25
|
||||
for: 10m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: "Task failure rate exceeds 25%"
|
||||
- alert: SwitchboardNoCompletions
|
||||
expr: sum(rate(switchboard_completions_total[10m])) == 0
|
||||
- alert: ArmatureNoCompletions
|
||||
expr: sum(rate(armature_completions_total[10m])) == 0
|
||||
for: 15m
|
||||
labels:
|
||||
severity: critical
|
||||
|
||||
@@ -4,7 +4,7 @@ kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-backup
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: backup
|
||||
spec:
|
||||
accessModes:
|
||||
|
||||
@@ -4,7 +4,7 @@ kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-data
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode }}
|
||||
|
||||
@@ -4,7 +4,7 @@ kind: Secret
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-secrets
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
JWT_SECRET: {{ required "jwtSecret is required" .Values.jwtSecret | quote }}
|
||||
@@ -15,11 +15,11 @@ stringData:
|
||||
POSTGRES_PASSWORD: {{ .Values.database.postgres.password | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.admin.password }}
|
||||
SWITCHBOARD_ADMIN_USERNAME: {{ .Values.admin.username | quote }}
|
||||
SWITCHBOARD_ADMIN_PASSWORD: {{ .Values.admin.password | quote }}
|
||||
ARMATURE_ADMIN_USERNAME: {{ .Values.admin.username | quote }}
|
||||
ARMATURE_ADMIN_PASSWORD: {{ .Values.admin.password | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.admin.email }}
|
||||
SWITCHBOARD_ADMIN_EMAIL: {{ .Values.admin.email | quote }}
|
||||
ARMATURE_ADMIN_EMAIL: {{ .Values.admin.email | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.storage.s3.accessKey }}
|
||||
S3_ACCESS_KEY: {{ .Values.storage.s3.accessKey | quote }}
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "switchboard.fullname" . }}
|
||||
name: {{ include "armature.fullname" . }}
|
||||
labels:
|
||||
{{- include "switchboard.labels" . | nindent 4 }}
|
||||
{{- include "armature.labels" . | nindent 4 }}
|
||||
{{- with .Values.monitoring.serviceMonitor.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "switchboard.selectorLabels" . | nindent 6 }}
|
||||
{{- include "armature.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: backend
|
||||
endpoints:
|
||||
- port: http
|
||||
|
||||
@@ -3,7 +3,7 @@ kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-backend
|
||||
labels:
|
||||
{{- include "switchboard.backend.labels" . | nindent 4 }}
|
||||
{{- include "armature.backend.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: {{ .Values.backend.port | quote }}
|
||||
@@ -25,7 +25,7 @@ kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-frontend
|
||||
labels:
|
||||
{{- include "switchboard.frontend.labels" . | nindent 4 }}
|
||||
{{- include "armature.frontend.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user