Skip to content

Commit

Permalink
Autoindent
Browse files Browse the repository at this point in the history
  • Loading branch information
jveski committed Mar 20, 2024
1 parent 4babbb5 commit 50084d1
Show file tree
Hide file tree
Showing 17 changed files with 422 additions and 454 deletions.
31 changes: 16 additions & 15 deletions configs/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ global:
scrape_configs:
- job_name: ingress-caddy
static_configs:
- targets: ['10.13.13.2:9101']
- targets: ["10.13.13.2:9101"]

- job_name: k8s-nodes
scheme: https
Expand All @@ -25,17 +25,18 @@ scrape_configs:
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep
regex: .*(prometheus|metrics|true).*
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
action: replace
target_label: __metrics_path__
regex: (.+)
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
target_label: __address__
- source_labels: [__meta_kubernetes_pod_node_name]
target_label: node
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep
regex: .*(prometheus|metrics|true).*
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
action: replace
target_label: __metrics_path__
regex: (.+)
- source_labels:
[__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
target_label: __address__
- source_labels: [__meta_kubernetes_pod_node_name]
target_label: node
27 changes: 11 additions & 16 deletions manifests/cert-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ spec:
privateKeySecretRef:
name: letsencrypt-prod
solvers:
- dns01:
azureDNS:
hostedZoneName: thelab.ms
resourceGroupName: thelab-ms
subscriptionID: 4eec622b-7eef-44e4-96e4-2b9fa2f21f07
environment: AzurePublicCloud
tenantID: f4ba79ec-fe30-424f-a96e-2de98f58f9b8
clientID: 846d6a2c-6fa0-48f5-b810-f997cf8d8e50
clientSecretSecretRef:
name: azure-sp
key: secret
- dns01:
azureDNS:
hostedZoneName: thelab.ms
resourceGroupName: thelab-ms
subscriptionID: 4eec622b-7eef-44e4-96e4-2b9fa2f21f07
environment: AzurePublicCloud
tenantID: f4ba79ec-fe30-424f-a96e-2de98f58f9b8
clientID: 846d6a2c-6fa0-48f5-b810-f997cf8d8e50
clientSecretSecretRef:
name: azure-sp
key: secret

---

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand All @@ -39,7 +38,6 @@ spec:
- "*.thelab.ms"

---

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand All @@ -56,7 +54,6 @@ spec:
- "*.apps.thelab.ms"

---

apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
Expand All @@ -65,7 +62,6 @@ spec:
selfSigned: {}

---

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand All @@ -84,7 +80,6 @@ spec:
group: cert-manager.io

---

apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
Expand Down
96 changes: 46 additions & 50 deletions manifests/frigate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,36 @@ spec:
runtimeClassName: nvidia

containers:
- name: oauth2proxy
env:
- name: OAUTH2_PROXY_UPSTREAMS
value: "http://127.0.0.1:5000"
- name: OAUTH2_PROXY_REDIRECT_URL
value: "https://frigate.apps.thelab.ms/oauth2/callback"
- name: OAUTH2_PROXY_ALLOWED_GROUPS
value: "thelab-leadership"
- name: oauth2proxy
env:
- name: OAUTH2_PROXY_UPSTREAMS
value: "http://127.0.0.1:5000"
- name: OAUTH2_PROXY_REDIRECT_URL
value: "https://frigate.apps.thelab.ms/oauth2/callback"
- name: OAUTH2_PROXY_ALLOWED_GROUPS
value: "thelab-leadership"

- name: frigate
image: frigate
volumeMounts:
- name: cache
mountPath: /tmp/cache
- name: devshm
mountPath: /dev/shm
- name: media
mountPath: /media/frigate
- name: config
mountPath: /config/config.yml
subPath: frigate.yml
readinessProbe:
initialDelaySeconds: 2
periodSeconds: 5
httpGet:
path: /api/
port: 5000
resources:
limits:
nvidia.com/gpu: "1"
- name: frigate
image: frigate
volumeMounts:
- name: cache
mountPath: /tmp/cache
- name: devshm
mountPath: /dev/shm
- name: media
mountPath: /media/frigate
- name: config
mountPath: /config/config.yml
subPath: frigate.yml
readinessProbe:
initialDelaySeconds: 2
periodSeconds: 5
httpGet:
path: /api/
port: 5000
resources:
limits:
nvidia.com/gpu: "1"

volumes:
- name: cache
Expand All @@ -70,39 +70,36 @@ spec:
name: frigate-config

---

apiVersion: v1
kind: Service
metadata:
name: frigate
spec:
type: ClusterIP
selector:
app: frigate
app: frigate
ports:
- name: http
protocol: TCP
port: 80
targetPort: 8880

---

apiVersion: v1
kind: Service
metadata:
name: frigate-unauthenticated
spec:
type: ClusterIP
selector:
app: frigate
app: frigate
ports:
- name: http
protocol: TCP
port: 80
targetPort: 5000

---

apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -122,23 +119,22 @@ spec:
app: frigate-exporter
spec:
containers:
- name: frigate-exporter
image: ghcr.io/thelab-ms/frigate-exporter:main-8bf970e
env:
- name: POSTGRES_HOST
value: "psql-reporting.default.svc.cluster.local"
- name: FRIGATE_URL
value: http://frigate-unauthenticated.default.svc.cluster.local
- name: CAMERAS
value: Vent1,Vent2,Atrium1,Atrium2,Woodshop1,Woodshop2,Classroom1,Classroom2,Cleanroom
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: reporting-psql
key: password
- name: frigate-exporter
image: ghcr.io/thelab-ms/frigate-exporter:main-8bf970e
env:
- name: POSTGRES_HOST
value: "psql-reporting.default.svc.cluster.local"
- name: FRIGATE_URL
value: http://frigate-unauthenticated.default.svc.cluster.local
- name: CAMERAS
value: Vent1,Vent2,Atrium1,Atrium2,Woodshop1,Woodshop2,Classroom1,Classroom2,Cleanroom
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: reporting-psql
key: password

---

apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
Expand All @@ -155,7 +151,7 @@ spec:
secretName: apps-wildcard-cert
routes:
- conditions:
- prefix: /
- prefix: /
services:
- name: frigate
port: 80
Expand Down
92 changes: 46 additions & 46 deletions manifests/gliderbot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,49 +17,49 @@ spec:
app: gliderbot
spec:
containers:
- name: gliderbot
# Image is set in the deploy github action
env:
- name: "DISCORD_MEMBERSHIP_ROLE"
value: "814348587424022528"
- name: "DISCORD_LEADERSHIP_ROLE"
value: "814154862777335876"
- name: "CLIENT_ID"
value: "810302178455322645"
- name: "GUILD_ID"
value: "690314626289631294"
- name: "CHANNEL_ID"
value: "1017100056886784061"
- name: "KEYCLOAK_URL"
value: "https://keycloak.apps.thelab.ms"
- name: "KEYCLOAK_REALM"
value: "master"
- name: "KEYCLOAK_USER"
value: "discordbot"
- name: "KEYCLOAK_MEMBERSHIP_GROUP"
value: "4eea9c17-f9b1-41eb-8f25-721ae04b66f6"
- name: "KEYCLOAK_LEADERSHIP_GROUP"
value: "29146cfe-15d2-46dc-9b3b-3a176b74afbb"
- name: "HOMEASSISTANT_URL"
value: "https://homeassistant.apps.thelab.ms"
- name: CONFIG
valueFrom:
secretKeyRef:
name: gliderbot
key: config
- name: DISCORD_TOKEN
valueFrom:
secretKeyRef:
name: gliderbot
key: discord-token
# TODO: Update the gliderbot to support the k8s injected keycloak creds
- name: KEYCLOAK_PASSWORD
valueFrom:
secretKeyRef:
name: gliderbot
key: keycloak-pass
- name: "HOMEASSISTANT_API_TOKEN"
valueFrom:
secretKeyRef:
name: gliderbot
key: homeassistant-api-token
- name: gliderbot
# Image is set in the deploy github action
env:
- name: "DISCORD_MEMBERSHIP_ROLE"
value: "814348587424022528"
- name: "DISCORD_LEADERSHIP_ROLE"
value: "814154862777335876"
- name: "CLIENT_ID"
value: "810302178455322645"
- name: "GUILD_ID"
value: "690314626289631294"
- name: "CHANNEL_ID"
value: "1017100056886784061"
- name: "KEYCLOAK_URL"
value: "https://keycloak.apps.thelab.ms"
- name: "KEYCLOAK_REALM"
value: "master"
- name: "KEYCLOAK_USER"
value: "discordbot"
- name: "KEYCLOAK_MEMBERSHIP_GROUP"
value: "4eea9c17-f9b1-41eb-8f25-721ae04b66f6"
- name: "KEYCLOAK_LEADERSHIP_GROUP"
value: "29146cfe-15d2-46dc-9b3b-3a176b74afbb"
- name: "HOMEASSISTANT_URL"
value: "https://homeassistant.apps.thelab.ms"
- name: CONFIG
valueFrom:
secretKeyRef:
name: gliderbot
key: config
- name: DISCORD_TOKEN
valueFrom:
secretKeyRef:
name: gliderbot
key: discord-token
# TODO: Update the gliderbot to support the k8s injected keycloak creds
- name: KEYCLOAK_PASSWORD
valueFrom:
secretKeyRef:
name: gliderbot
key: keycloak-pass
- name: "HOMEASSISTANT_API_TOKEN"
valueFrom:
secretKeyRef:
name: gliderbot
key: homeassistant-api-token
Loading

0 comments on commit 50084d1

Please sign in to comment.