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

Hotfix/remote state logs #170

Merged
merged 20 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
13 changes: 13 additions & 0 deletions play-with-sld/kubernetes/k8s/add-env-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# add-env-patch.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: ""
spec:
template:
spec:
containers:
- name: ""
env:
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
2 changes: 1 addition & 1 deletion play-with-sld/kubernetes/k8s/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ resources:
- sld-schedule-service.yml
- db-secret.yml
- dashboard-secret.yml
- rabbit-secret.yml
- rabbit-secret.yml
33 changes: 18 additions & 15 deletions play-with-sld/kubernetes/k8s/sld-api-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ spec:
spec:
subdomain: primary
containers:
- name: api-backend
image: d10s0vsky/sld-api:latest
imagePullPolicy: Always
command: ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
ports:
- containerPort: 8000
livenessProbe:
httpGet:
path: /api/v1/
port: 8000
httpHeaders:
- name: status
value: healthy
initialDelaySeconds: 60
periodSeconds: 60
- name: api-backend
image: d10s0vsky/sld-api:2.18.0
imagePullPolicy: Always
command: ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
ports:
- containerPort: 8000
livenessProbe:
httpGet:
path: /api/v1/
port: 8000
httpHeaders:
- name: status
value: healthy
initialDelaySeconds: 60
periodSeconds: 60
env:
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
4 changes: 3 additions & 1 deletion play-with-sld/kubernetes/k8s/sld-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ spec:
- name: sld-dashboard
image: d10s0vsky/sld-dashboard:latest
env:
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- name: DEBUG
value: "True"
- name: SECRET_KEY
Expand All @@ -42,6 +44,6 @@ spec:
name: db
key: password
imagePullPolicy: Always
command: ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]
command: ["python", "-m", "gunicorn", "--config", "gunicorn-cfg.py", "run:app"]
ports:
- containerPort: 5000
4 changes: 3 additions & 1 deletion play-with-sld/kubernetes/k8s/sld-remote-state.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ spec:
subdomain: primary
containers:
- name: remote-state
image: d10s0vsky/sld-remote-state:latest
image: d10s0vsky/sld-remote-state:2.11.0
env:
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- name: SLD_STORAGE_BACKEND
value: mongodb
- name: SLD_MONGODB_URL
Expand Down
6 changes: 4 additions & 2 deletions play-with-sld/kubernetes/k8s/sld-worker-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ spec:
subdomain: primary
containers:
- name: stack-deploy-worker-default
image: d10s0vsky/sld-api:latest
image: d10s0vsky/sld-api:2.18.0
imagePullPolicy: Always
env:
- name: TF_WARN_OUTPUT_ERRORS
value: "1"
command: ["celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "10", "-E", "-Q", "squad"]
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
command: ["python", "-m", "celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "squad"]
6 changes: 4 additions & 2 deletions play-with-sld/kubernetes/k8s/sld-worker-squad1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ spec:
subdomain: primary
containers:
- name: stack-deploy-worker-squad1
image: d10s0vsky/sld-api:latest
image: d10s0vsky/sld-api:2.18.0
imagePullPolicy: Always
env:
- name: TF_WARN_OUTPUT_ERRORS
value: "1"
command: ["celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "any,squad1"]
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
command: ["python", "-m", "celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "any,squad1"]
6 changes: 4 additions & 2 deletions play-with-sld/kubernetes/k8s/sld-worker-squad2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ spec:
subdomain: primary
containers:
- name: stack-deploy-worker-squad2
image: d10s0vsky/sld-api:latest
image: d10s0vsky/sld-api:2.18.0
imagePullPolicy: Always
env:
- name: TF_WARN_OUTPUT_ERRORS
value: "1"
command: ["celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "any,squad2"]
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
command: ["python", "-m", "celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "any,squad2"]
3 changes: 2 additions & 1 deletion sld-remote-state/configs/azure_blob_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import os

from pydantic import BaseSettings
from pydantic_settings import BaseSettings



class Settings(BaseSettings):
Expand Down
2 changes: 1 addition & 1 deletion sld-remote-state/configs/bucket_s3.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from pydantic import BaseSettings
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand Down
2 changes: 1 addition & 1 deletion sld-remote-state/configs/gcp_cloud_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os

from pydantic import BaseSettings
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand Down
2 changes: 1 addition & 1 deletion sld-remote-state/configs/mongo_db.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from pydantic import BaseSettings
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand Down
Loading