Skip to content

Commit

Permalink
Merge branch 'main' into andrew/only-send-active-nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Dickinson authored Dec 3, 2024
2 parents b029ae4 + a57738f commit 312d04a
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 150 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/publish-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ on:

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
push_to_registry:
name: Push Docker Image to Docker Hub
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out the repo
uses: actions/checkout@v4
Expand Down
59 changes: 3 additions & 56 deletions infra/helm/meshdb/charts/celery/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,62 +44,9 @@ spec:
envFrom:
- configMapRef:
name: meshdbconfig
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: postgres-password
- name: DB_PASSWORD_RO
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: postgres-password-ro
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: aws-access-key-id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: aws-secret-access-key
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: smtp-password
- name: DJANGO_SECRET_KEY
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: django-secret-key
- name: NN_ASSIGN_PSK
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: nn-assign-psk
- name: QUERY_PSK
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: query-psk
- name: PANO_GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: pano-github-token
- name: UISP_PASS
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: uisp-pass
- name: SLACK_ADMIN_NOTIFICATIONS_WEBHOOK_URL
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: slack-webhook
envFrom:
- secretRef:
name: meshdb-secrets
{{- if .livenessProbe }}
livenessProbe:
{{- toYaml .livenessProbe | nindent 12 }}
Expand Down
80 changes: 4 additions & 76 deletions infra/helm/meshdb/templates/meshweb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
selector:
matchLabels:
{{- include "meshdb.selectorLabels" . | nindent 6 }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
template:
metadata:
annotations:
Expand Down Expand Up @@ -39,82 +40,9 @@ spec:
envFrom:
- configMapRef:
name: meshdbconfig
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: postgres-password
- name: DB_PASSWORD_RO
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: postgres-password-ro
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: aws-access-key-id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: aws-secret-access-key
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: smtp-password
- name: DJANGO_SECRET_KEY
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: django-secret-key
- name: NN_ASSIGN_PSK
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: nn-assign-psk
- name: QUERY_PSK
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: query-psk
- name: PANO_GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: pano-github-token
- name: UISP_PASS
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: uisp-pass
- name: SLACK_ADMIN_NOTIFICATIONS_WEBHOOK_URL
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: slack-webhook
- name: SLACK_JOIN_REQUESTS_CHANNEL_WEBHOOK_URL
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: slack-join-webhook
- name: OSTICKET_API_TOKEN
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: osticket-api-token
- name: RECAPTCHA_SERVER_SECRET_KEY_V2
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: recaptcha-v2-secret
- name: RECAPTCHA_SERVER_SECRET_KEY_V3
valueFrom:
secretKeyRef:
name: meshdb-secrets
key: recaptcha-v3-secret
envFrom:
- secretRef:
name: meshdb-secrets
volumeMounts:
- name: static-content-vol
mountPath: /opt/meshdb/static
Expand Down
1 change: 1 addition & 0 deletions infra/helm/meshdb/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
selector:
matchLabels:
{{- include "meshdb.selectorLabels" . | nindent 6 }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand Down
1 change: 1 addition & 0 deletions infra/helm/meshdb/templates/pelias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
selector:
matchLabels:
{{- include "meshdb.selectorLabels" . | nindent 6 }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand Down
1 change: 1 addition & 0 deletions infra/helm/meshdb/templates/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
{{- include "meshdb.selectorLabels" . | nindent 6 }}
strategy:
type: Recreate
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand Down
1 change: 1 addition & 0 deletions infra/helm/meshdb/templates/redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
selector:
matchLabels:
{{- include "meshdb.selectorLabels" . | nindent 6 }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
template:
metadata:
annotations:
Expand Down
30 changes: 15 additions & 15 deletions infra/helm/meshdb/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ metadata:
namespace: {{ .Values.meshdb_app_namespace }}
type: Opaque
data:
postgres-password: {{ .Values.pg.password | b64enc | quote }}
postgres-password-ro: {{ .Values.pg.password_ro | b64enc | quote }}
aws-access-key-id: {{ .Values.aws.access_key_id | b64enc | quote }}
aws-secret-access-key: {{ .Values.aws.secret_access_key | b64enc | quote }}
smtp-password: {{ .Values.email.smtp_password | b64enc | quote }}
django-secret-key: {{ .Values.meshweb.django_secret_key | b64enc | quote }}
nn-assign-psk: {{ .Values.meshweb.nn_assign_psk | b64enc | quote }}
query-psk: {{ .Values.meshweb.query_psk | b64enc | quote }}
uisp-pass: {{ .Values.uisp.psk | b64enc | quote }}
pano-github-token: {{ .Values.meshweb.pano_github_token | b64enc | quote }}
slack-webhook: {{ .Values.meshweb.slack_webhook | b64enc | quote }}
slack-join-webhook: {{ .Values.meshweb.slack_join_webhook | b64enc | quote }}
osticket-api-token: {{ .Values.meshweb.osticket_api_token | b64enc | quote }}
recaptcha-v2-secret: {{ .Values.meshweb.recaptcha_v2_secret | b64enc | quote }}
recaptcha-v3-secret: {{ .Values.meshweb.recaptcha_v3_secret | b64enc | quote }}
DB_PASSWORD: {{ .Values.pg.password | b64enc | quote }}
DB_PASSWORD_RO: {{ .Values.pg.password_ro | b64enc | quote }}
AWS_ACCESS_KEY_ID: {{ .Values.aws.access_key_id | b64enc | quote }}
AWS_SECRET_ACCESS_KEY: {{ .Values.aws.secret_access_key | b64enc | quote }}
SMTP_PASSWORD: {{ .Values.email.smtp_password | b64enc | quote }}
DJANGO_SECRET_KEY: {{ .Values.meshweb.django_secret_key | b64enc | quote }}
NN_ASSIGN_PSK: {{ .Values.meshweb.nn_assign_psk | b64enc | quote }}
QUERY_PSK: {{ .Values.meshweb.query_psk | b64enc | quote }}
PANO_GITHUB_TOKEN: {{ .Values.meshweb.pano_github_token | b64enc | quote }}
UISP_PASS: {{ .Values.uisp.psk | b64enc | quote }}
SLACK_ADMIN_NOTIFICATIONS_WEBHOOK_URL: {{ .Values.meshweb.slack_webhook | b64enc | quote }}
SLACK_JOIN_REQUESTS_CHANNEL_WEBHOOK_URL: {{ .Values.meshweb.slack_join_webhook | b64enc | quote }}
OSTICKET_API_TOKEN: {{ .Values.meshweb.osticket_api_token | b64enc | quote }}
RECAPTCHA_SERVER_SECRET_KEY_V2: {{ .Values.meshweb.recaptcha_v2_secret | b64enc | quote }}
RECAPTCHA_SERVER_SECRET_KEY_V3: {{ .Values.meshweb.recaptcha_v3_secret | b64enc | quote }}
2 changes: 2 additions & 0 deletions infra/helm/meshdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,5 @@ autoscaling:
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

revisionHistoryLimit: 4

0 comments on commit 312d04a

Please sign in to comment.