diff --git a/apps/base/piko/release.yaml b/apps/base/piko/release.yaml new file mode 100644 index 0000000..f2cb261 --- /dev/null +++ b/apps/base/piko/release.yaml @@ -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" \ No newline at end of file diff --git a/charts/fp/templates/windmill-ingress.yaml b/charts/fp/templates/uwu-ingress.yaml similarity index 58% rename from charts/fp/templates/windmill-ingress.yaml rename to charts/fp/templates/uwu-ingress.yaml index 4ebaaad..bac4b28 100644 --- a/charts/fp/templates/windmill-ingress.yaml +++ b/charts/fp/templates/uwu-ingress.yaml @@ -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" }} +--- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: windmill-ingress - namespace: default + name: uwu-ingress + namespace: futureporn annotations: cert-manager.io/cluster-issuer: "letsencrypt-staging" nginx.ingress.kubernetes.io/ssl-passthrough: "true" @@ -14,10 +23,17 @@ metadata: spec: ingressClassName: nginx rules: - - host: windmill2.sbtp.xyz + - host: uwu.sbtp.xyz http: paths: - - path: / + - path: /piko + pathType: Prefix + backend: + service: + name: piko + port: + name: https + - path: /windmill pathType: Prefix backend: service: @@ -26,7 +42,9 @@ spec: name: https tls: - hosts: - - windmill2.sbtp.xyz - secretName: windmill-tls + - uwu.sbtp.xyz + secretName: uwu-tls + + {{ end }} \ No newline at end of file