diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4c1b4c9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto eol=lf +CHANGELOG.md export-ignore diff --git a/.gitignore b/.gitignore index e69de29..4c49bd7 100755 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/Chart.lock b/Chart.lock new file mode 100644 index 0000000..a26a5b2 --- /dev/null +++ b/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: traefik + repository: https://traefik.github.io/charts + version: 36.2.0 +digest: sha256:90390336f074dd887423346a0397fd8adbceec6a8835d803abaa0b21f586da6b +generated: "2025-06-24T16:18:26.388158324+02:00" diff --git a/Chart.yaml b/Chart.yaml new file mode 100644 index 0000000..546b9ec --- /dev/null +++ b/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: laravel-stack +version: 0.1.0 +dependencies: + - name: traefik + version: 36.2.0 + repository: https://traefik.github.io/charts + - name: whoami + version: 0.1.0 + repository: "file://charts/whoami" diff --git a/LICENSE b/LICENSE index a02967e..e69de29 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 Jordy Schreuders - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index 8085883..e17667b 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ -# Kubernetes Base +# kubernetes-base -Similar to how I've set up my Docker containers this repository contains a collection of Helm charts and Kubernetes manifests. +A collection of Helm charts and Kubernetes manifests. -## Contributing to kubernetes-base +## Contributing -Thank you for considering contributing to kubernetes-base. Please review our [Contribution Guidelines](https://github.com/99linesofcode/.github/blob/main/.github/CONTRIBUTING.md). +Please review our [Contribution Guidelines](https://github.com/99linesofcode/.github/blob/main/.github/CONTRIBUTING.md). -## Code of Conduct +## Code of conduct In order to ensure that the community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/99linesofcode/.github?tab=coc-ov-file). -## Security Vulnerabilities +## Security vulnerabilities -Please review [our security policy](https://github.com/99linesofcode/.github?tab=security-ov-file) on how to report security vulnerabilities. +Please review [the security policy](https://github.com/99linesofcode/.github?tab=security-ov-file) on how to report security vulnerabilities. ## License -kubernetes-base is open-sourced software licensed under the [MIT license](https://github.com/99linesofcode/kubernetes-base?tab=MIT-1-ov-file) +This software is open source and licensed under the [MIT license](https://github.com/99linesofcode/kubernetes-base?tab=MIT-1-ov-file). diff --git a/charts/traefik-36.2.0.tgz b/charts/traefik-36.2.0.tgz new file mode 100644 index 0000000..62f7ac0 Binary files /dev/null and b/charts/traefik-36.2.0.tgz differ diff --git a/charts/whoami/Chart.yaml b/charts/whoami/Chart.yaml new file mode 100644 index 0000000..f0fa70b --- /dev/null +++ b/charts/whoami/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +name: whoami +version: 0.1.0 diff --git a/charts/whoami/templates/deployment.yaml b/charts/whoami/templates/deployment.yaml new file mode 100644 index 0000000..9262d97 --- /dev/null +++ b/charts/whoami/templates/deployment.yaml @@ -0,0 +1,18 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ .Release.Name }}-{{ .Chart.Name }}-deployment" + namespace: {{ .Values.namespace }} +spec: + replicas: 1 + selector: + matchLabels: + app: "{{ .Release.Name }}-{{ .Chart.Name }}-pod" + template: + metadata: + labels: + app: "{{ .Release.Name }}-{{ .Chart.Name }}-pod" + spec: + containers: + - name: "{{ .Release.Name }}-{{ .Chart.Name }}-pod" + image: traefik/whoami diff --git a/charts/whoami/templates/httproute.yaml b/charts/whoami/templates/httproute.yaml new file mode 100644 index 0000000..512b093 --- /dev/null +++ b/charts/whoami/templates/httproute.yaml @@ -0,0 +1,13 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: "{{ .Release.Name }}-{{ .Chart.Name }}-httproute" + namespace: {{ .Values.namespace }} +spec: + parentRefs: + - name: {{ .Values.global.gateway.name }} + namespace: {{ .Values.global.gateway.namespace }} + rules: + - backendRefs: + - name: "{{ .Release.Name }}-{{ .Chart.Name }}-service" + port: {{ .Values.service.port }} diff --git a/charts/whoami/templates/service.yaml b/charts/whoami/templates/service.yaml new file mode 100644 index 0000000..8a0e2b2 --- /dev/null +++ b/charts/whoami/templates/service.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Release.Name }}-{{ .Chart.Name }}-service" + namespace: {{ .Values.namespace }} +spec: + selector: + app: "{{ .Release.Name }}-{{ .Chart.Name }}-pod" + ports: + - port: {{ .Values.service.port }} diff --git a/charts/whoami/values.yaml b/charts/whoami/values.yaml new file mode 100644 index 0000000..5039c29 --- /dev/null +++ b/charts/whoami/values.yaml @@ -0,0 +1,4 @@ +namespace: default + +service: + port: 80 diff --git a/values.yaml b/values.yaml new file mode 100644 index 0000000..8fa73db --- /dev/null +++ b/values.yaml @@ -0,0 +1,15 @@ +global: + gateway: + name: traefik-gateway + namespace: default + +traefik: + gateway: + name: traefik-gateway + namespace: default + hostNetwork: true + providers: + kubernetesGateway: + enabled: true + kubernetesIngress: + enabled: false