add uwu ingress
ci / build (push) Waiting to run Details

This commit is contained in:
CJ_Clippy 2024-05-28 15:10:29 -08:00
parent 5894fca0df
commit 8a591c4928
2 changed files with 117 additions and 6 deletions

View File

@ -0,0 +1,93 @@
---
apiVersion: v1
kind: Service
metadata:
name: piko
labels:
app: piko
spec:
ports:
- port: 8000
name: proxy
- port: 8001
name: upstream
- port: 8002
name: admin
- port: 8003
name: gossip
clusterIP: None
selector:
app: piko
---
apiVersion: v1
kind: ConfigMap
metadata:
name: server-config
data:
server.yaml: |
cluster:
node_id_prefix: ${POD_NAME}-
join:
- piko
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: piko
spec:
selector:
matchLabels:
app: piko
serviceName: "piko"
replicas: 3
template:
metadata:
labels:
app: piko
spec:
terminationGracePeriodSeconds: 60
containers:
- name: piko
image: my-repo/piko:latest
ports:
- containerPort: 8000
name: proxy
- containerPort: 8001
name: upstream
- containerPort: 8002
name: admin
- containerPort: 8003
name: gossip
args:
- server
- --config.path
- /config/server.yaml
- --config.expand-env
resources:
limits:
cpu: 250m
ephemeral-storage: 1Gi
memory: 1Gi
requests:
cpu: 250m
ephemeral-storage: 1Gi
memory: 1Gi
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
volumeMounts:
- name: config
mountPath: "/config"
readOnly: true
volumes:
- name: config
configMap:
name: server-config
items:
- key: "server.yaml"
path: "server.yaml"

View File

@ -1,10 +1,19 @@
## Utility ingress is used for several backend or development services.
## We do this to save money, as every ingress cost us $10/month
## We route to different services by path
{{ if eq .Values.managedBy "Helm" }} {{ if eq .Values.managedBy "Helm" }}
---
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: windmill-ingress name: uwu-ingress
namespace: default namespace: futureporn
annotations: annotations:
cert-manager.io/cluster-issuer: "letsencrypt-staging" cert-manager.io/cluster-issuer: "letsencrypt-staging"
nginx.ingress.kubernetes.io/ssl-passthrough: "true" nginx.ingress.kubernetes.io/ssl-passthrough: "true"
@ -14,10 +23,17 @@ metadata:
spec: spec:
ingressClassName: nginx ingressClassName: nginx
rules: rules:
- host: windmill2.sbtp.xyz - host: uwu.sbtp.xyz
http: http:
paths: paths:
- path: / - path: /piko
pathType: Prefix
backend:
service:
name: piko
port:
name: https
- path: /windmill
pathType: Prefix pathType: Prefix
backend: backend:
service: service:
@ -26,7 +42,9 @@ spec:
name: https name: https
tls: tls:
- hosts: - hosts:
- windmill2.sbtp.xyz - uwu.sbtp.xyz
secretName: windmill-tls secretName: uwu-tls
{{ end }} {{ end }}