Skip to content

Commit

Permalink
Merge pull request #202 from kruzaavn/clear_out_old_items
Browse files Browse the repository at this point in the history
Clear out old items
  • Loading branch information
kruzaavn authored Jun 27, 2023
2 parents 3716d09 + 587a302 commit 1706fe1
Show file tree
Hide file tree
Showing 13 changed files with 134 additions and 150 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
strategy:
matrix:
# listed here are the resources to be restarted
component: [ gci-relay, api-relay, rq-worker, munitions-relay, api-server, bot, ui ]
component: [ gci-relay, api-relay, rq-worker, api-server, bot, ui ]
steps:
# Checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v1
Expand Down
4 changes: 4 additions & 0 deletions helm/db/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
global:
postgresql:
auth:
database: database
4 changes: 4 additions & 0 deletions helm/ingress/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
controller:
service:
annotations:
service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path: "/healthz"
2 changes: 1 addition & 1 deletion helm/templates/api-relay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Service
metadata:
annotations:
service.beta.kubernetes.io/azure-load-balancer-resource-group: jtf191.app.server_group
service.beta.kubernetes.io/azure-load-balancer-ipv4: {{.Values.relayIp}}
name: api-relay
spec:
loadBalancerIP: {{.Values.relayIp}}
type: LoadBalancer
ports:
- protocol: TCP
Expand Down
4 changes: 1 addition & 3 deletions helm/templates/api-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ spec:
selector:
app: api-server


---


apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -68,7 +66,7 @@ spec:
valueFrom:
secretKeyRef:
name: db-postgresql
key: postgresql-password
key: postgres-password
- name: AZURE_STORAGE_KEY
valueFrom:
secretKeyRef:
Expand Down
33 changes: 0 additions & 33 deletions helm/templates/bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,3 @@ spec:
key: apiServerBotPassword
- name: API_SERVER_USER
value: jp5bot

---

apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: schedule-reminder
spec:
schedule: "0 5 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: bot
image: "{{.Values.image.registryUrl}}/bot:{{.Values.image.tag}}"
imagePullPolicy: Always
command: ["python"]
args: ["-u", "cron.py"]
env:
- name: DISCORD_TOKEN
valueFrom:
secretKeyRef:
name: secret
key: discordToken
- name: API_SERVER_PASSWORD
valueFrom:
secretKeyRef:
name: secret
key: apiServerBotPassword
- name: API_SERVER_USER
value: jp5bot
restartPolicy: Never
39 changes: 39 additions & 0 deletions helm/templates/certificates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-staging
spec:
acme:
# The ACME server URL
server: https://acme-staging-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: [email protected]
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-staging
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
ingressClassName: nginx

---

apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-prod
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: [email protected]
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-prod
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
ingressClassName: nginx
57 changes: 0 additions & 57 deletions helm/templates/gateway.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions helm/templates/gci-relay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Service
metadata:
annotations:
service.beta.kubernetes.io/azure-load-balancer-resource-group: jtf191.app.server_group
service.beta.kubernetes.io/azure-load-balancer-ipv4: {{.Values.relayIp}}
name: gci-relay
spec:
loadBalancerIP: {{.Values.relayIp}}
type: LoadBalancer
ports:
- protocol: TCP
Expand All @@ -25,7 +25,7 @@ metadata:
labels:
app: gci-relay
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app: gci-relay
Expand Down
56 changes: 56 additions & 0 deletions helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: api
annotations:
cert-manager.io/issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
nginx.ingress.kubernetes.io/server-snippets: |
location /ws {
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
spec:
ingressClassName: nginx
tls:
- hosts:
- www.jtf191.com
secretName: tls-cert
rules:
- host: www.jtf191.com
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: api-server
port:
number: 8000
- path: /admin
pathType: Prefix
backend:
service:
name: api-server
port:
number: 8000
- path: /
pathType: Prefix
backend:
service:
name: ui
port:
number: 443
- path: /ws
pathType: Prefix
backend:
service:
name: api-server
port:
number: 8000
52 changes: 0 additions & 52 deletions helm/templates/munitions-relay.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion helm/templates/rq-workers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
app: rq-worker
spec:
replicas: 3
replicas: 1
selector:
matchLabels:
app: rq-worker
Expand Down
25 changes: 25 additions & 0 deletions helm/volumes/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: api-server-gci-migrations-pvc
spec:
storageClassName: default
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 0.1Gi

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: api-server-roster-migrations-pvc
spec:
storageClassName: default
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 0.1Gi

0 comments on commit 1706fe1

Please sign in to comment.