diff --git a/apps/kbve.com/src/content/journal/01-09.mdx b/apps/kbve.com/src/content/journal/01-09.mdx index e206617ee..688f32f7b 100644 --- a/apps/kbve.com/src/content/journal/01-09.mdx +++ b/apps/kbve.com/src/content/journal/01-09.mdx @@ -12,7 +12,25 @@ tags: ## Notes -### 2024 +## 2025 + +- 04:53PM + + **Helm** + + Going to finish up the helm chart and then we can move forward. + The `pydiscordsh-main.yaml` is almost done, we just need to fix the ingress. + +- 07:10PM + + **WoW** + + Some quick hardcore afk game play! + I am thinking that it will be a bit rough to do on the side, while still programming. + +- TODO - 09:00PM - Car battery should be charged. + +## 2024 - 3:03pm - `erust` library After test casing the `apps/rust_wasm_embed` , I want to move some of the `egui` functions into the `erust` library / packages / crate, so that I can use them in multiple applictions. diff --git a/migrations/kube/charts/discordsh/discord/Chart.yaml b/migrations/kube/charts/discordsh/discord/Chart.yaml new file mode 100644 index 000000000..36cdf4f58 --- /dev/null +++ b/migrations/kube/charts/discordsh/discord/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: discordsh +description: The DiscordSH Application +type: application +version: 0.0.1 +icon: https://avatars.githubusercontent.com/u/5571997?s=280&v=4 \ No newline at end of file diff --git a/migrations/kube/charts/discordsh/discord/templates/pydiscordsh-main.yaml b/migrations/kube/charts/discordsh/discord/templates/pydiscordsh-main.yaml new file mode 100644 index 000000000..04f83508f --- /dev/null +++ b/migrations/kube/charts/discordsh/discord/templates/pydiscordsh-main.yaml @@ -0,0 +1,93 @@ +# PyDiscord Main Deployment +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pydiscordsh-main + namespace: discordsh + labels: + app: pydiscordsh +spec: + replicas: {{ .Values.pydiscordsh.replicaCount }} + selector: + matchLabels: + app: discordsh + tier: pydiscordsh + template: + metadata: + labels: + app: discordsh + tier: pydiscordsh + spec: + containers: + - name: pydiscordsh + image: "{{ .Values.pydiscordsh.image.repository }}:{{ .Values.pydiscordsh.image.tag }}" + ports: + {{- range .Values.pydiscordsh.service.ports }} + - name: {{ .name }} + containerPort: {{ .targetPort }} + protocol: {{ .protocol }} + {{- end }} + resources: + {{- toYaml .Values.pydiscordsh.resources | nindent 12 }} + +--- + +# Service (TCP) +apiVersion: v1 +kind: Service +metadata: + name: pydiscordsh-service + namespace: discordsh + labels: + app: pydiscordsh +spec: + selector: + app: pydiscordsh + ports: + {{- range .Values.pydiscordsh.service.ports }} + - name: {{ .name }} + protocol: {{ .protocol }} + port: {{ .port }} + targetPort: {{ .targetPort }} + {{- end }} + type: ClusterIP + +--- + +## Nginx Ingress + +{{- if .Values.pydiscordsh.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: pydiscordsh-ingress + namespace: discordsh + annotations: + nginx.ingress.kubernetes.io/enable-websocket: "true" + nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" + nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" + #nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + nginx.ingress.kubernetes.io/proxy-http-version: "1.1" + nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" + #nginx.ingress.kubernetes.io/keepalive: "on" + #nginx.ingress.kubernetes.io/http2-push-preload: "true" +spec: + rules: + - host: {{ .Values.pydiscordsh.ingress.host }} + http: + paths: + - path: /ws + pathType: Prefix + backend: + service: + name: pydiscordsh-service + port: + number: 8086 + - path: / + pathType: Prefix + backend: + service: + name: pydiscordsh-service + port: + number: 3000 +{{- end }} \ No newline at end of file diff --git a/migrations/kube/charts/discordsh/discord/values.yaml b/migrations/kube/charts/discordsh/discord/values.yaml new file mode 100644 index 000000000..bd2c7fec6 --- /dev/null +++ b/migrations/kube/charts/discordsh/discord/values.yaml @@ -0,0 +1,38 @@ +pydiscordsh: + nameOverride: pydiscordsh + name: pydiscordsh-app + replicaCount: 1 + image: + repository: kbve/pydiscordsh + tag: 1.42.0 + digest: 'sha256:sha256:cc49e2b2fede31eb242b9b7fe981c4a594e9cec797144816267f9b02e9630630' + service: + name: pydiscordsh + ports: + - name: tcp + protocol: TCP + port: 3000 + targetPort: 3000 + - name: ws + protocol: TCP + port: 8086 + targetPort: 8086 + webscoket: + enabled: true + udp: + enabled: false + ingress: + enabled: true + host: api.discord.sh + paths: + - path: / + backend: html + - path: /ws/ + backend: websocket + resources: + requests: + memory: '1Gi' + cpu: '500m' + limits: + memory: '2Gi' + cpu: '900m' diff --git a/migrations/kube/charts/discordsh/fleet.yml b/migrations/kube/charts/discordsh/fleet.yml new file mode 100644 index 000000000..1924774a9 --- /dev/null +++ b/migrations/kube/charts/discordsh/fleet.yml @@ -0,0 +1,6 @@ +defaultNamespace: discordsh +helm: + chart: ./discord + releaseName: discord-release + valuesFiles: + - discord/values.yaml