From cc56f03607ab4aede805e07fa7e6eefb4d9b1209 Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 08:53:58 -0500 Subject: [PATCH 01/10] Create values.yaml --- helm-chart/values.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 helm-chart/values.yaml diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml new file mode 100644 index 0000000..7c46af8 --- /dev/null +++ b/helm-chart/values.yaml @@ -0,0 +1,20 @@ +image: + RELEASE: ghcr.io/kubero-dev/ladder:v0.0.11 + +env: + PORT: 8080 + PREFORK: "false" + USER_AGENT: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" + X_FORWARDED_FOR: + USERPASS: "" + LOG_URLS: "true" + DISABLE_FORM: "false" + FORM_PATH: "" + RULESET: "https://raw.githubusercontent.com/kubero-dev/ladder/main/ruleset.yaml" + EXPOSE_RULESET: "true" + ALLOWED_DOMAINS: "" + ALLOWED_DOMAINS_RULESET: "false" + +ingress: + HOST: "ladder.domain.com" + PORT: 80 From a2f909501c403625976bfe96b8f3c3da97334f8e Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 08:54:26 -0500 Subject: [PATCH 02/10] Create Chart.yaml --- helm-chart/Chart.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 helm-chart/Chart.yaml diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml new file mode 100644 index 0000000..27d35a8 --- /dev/null +++ b/helm-chart/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: ladder +description: A helm chart to deploy kubero-dev/ladder +type: application +version: "1.0" +appVersion: "v0.0.11" From cdcbfd4ee92a7b1c3945c4520634b30f4abf8c87 Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 08:54:52 -0500 Subject: [PATCH 03/10] Create ingress.yaml --- helm-chart/templates/ingress.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 helm-chart/templates/ingress.yaml diff --git a/helm-chart/templates/ingress.yaml b/helm-chart/templates/ingress.yaml new file mode 100644 index 0000000..44b0871 --- /dev/null +++ b/helm-chart/templates/ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: ladder-ingress +spec: + rules: + - host: "{{ .Values.ingress.HOST }}" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: ladder-service + port: + number: {{ .Values.ingress.PORT }} From 945f499e880fae2361b92bf2911a350e9852be3d Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 08:55:13 -0500 Subject: [PATCH 04/10] Update ingress.yaml --- helm-chart/templates/ingress.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/helm-chart/templates/ingress.yaml b/helm-chart/templates/ingress.yaml index 44b0871..d11fb54 100644 --- a/helm-chart/templates/ingress.yaml +++ b/helm-chart/templates/ingress.yaml @@ -1,3 +1,4 @@ +--- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: From 5df9a937c5ae57e88aab8cf240740a21a3d45f63 Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 08:55:25 -0500 Subject: [PATCH 05/10] Create service.yaml --- helm-chart/templates/service.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 helm-chart/templates/service.yaml diff --git a/helm-chart/templates/service.yaml b/helm-chart/templates/service.yaml new file mode 100644 index 0000000..38ca95e --- /dev/null +++ b/helm-chart/templates/service.yaml @@ -0,0 +1,14 @@ +--- +kind: Service +apiVersion: v1 +metadata: + name: ladder-service +spec: + type: ClusterIP + selector: + app: ladder + ports: + - name: http + port: {{ .Values.ingress.PORT }} + protocol: TCP + targetPort: {{ .Values.env.PORT }} From 46c91a05d0a742ca53aacb600a3da18f015efb07 Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 08:55:52 -0500 Subject: [PATCH 06/10] Create deployment.yaml --- helm-chart/templates/deployment.yaml | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 helm-chart/templates/deployment.yaml diff --git a/helm-chart/templates/deployment.yaml b/helm-chart/templates/deployment.yaml new file mode 100644 index 0000000..9986e21 --- /dev/null +++ b/helm-chart/templates/deployment.yaml @@ -0,0 +1,55 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: ladder + name: ladder +spec: + replicas: 1 + selector: + matchLabels: + app: ladder + template: + metadata: + labels: + app: ladder + spec: + containers: + - image: "{{ .Values.image.RELEASE }}" + imagePullPolicy: Always + name: ladder + resources: + limits: + cpu: 250m + memory: 128Mi + requests: + cpu: 250m + memory: 128Mi + env: + - name: PORT + value: "{{ .Values.env.PORT }}" + - name: PREFORK + value: "{{ .Values.env.PREFORK }}" + - name: USER_AGENT + value: "{{ .Values.env.USER_AGENT }}" + - name: X_FORWARDED_FOR + value: "{{ .Values.env.X_FORWARDED_FOR }}" + - name: USERPASS + value: "{{ .Values.env.USERPASS }}" + - name: LOG_URLS + value: "{{ .Values.env.LOG_URLS }}" + - name: DISABLE_FORM + value: "{{ .Values.env.DISABLE_FORM }}" + - name: FORM_PATH + value: "{{ .Values.env.FORM_PATH }}" + - name: RULESET + value: "{{ .Values.env.RULESET }}" + - name: EXPOSE_RULESET + value: "{{ .Values.env.EXPOSE_RULESET }}" + - name: ALLOWED_DOMAINS + value: "{{ .Values.env.ALLOWED_DOMAINS }}" + - name: ALLOWED_DOMAINS_RULESET + value: "{{ .Values.env.ALLOWED_DOMAINS_RULESET }}" + restartPolicy: Always + terminationGracePeriodSeconds: 30 From a7299049c3726650d03abbf397d8ae9a278909c5 Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 09:05:42 -0500 Subject: [PATCH 07/10] Create README.md --- helm-chart/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 helm-chart/README.md diff --git a/helm-chart/README.md b/helm-chart/README.md new file mode 100644 index 0000000..2a647a5 --- /dev/null +++ b/helm-chart/README.md @@ -0,0 +1,27 @@ +# Basic Helm Chart for deployment of Ladder +This folder contains a basic helm chart deployment for the ladder app. + +# Deployment pre-reqs +## Values +Edit the values to your own preferences, with the only minimum requirement being `ingress.HOST` (line 19) being updated to your intended domain name. + +Other variables in values.yaml can be updated as to your preferences, with details on each variable being listed in the main [README.md](https://github.com/kubero-dev/ladder/blob/e3eb866d483f521b2bfbb4bbfd642f6d3f6ee5a4/README.md) in the root of this repo. + +## Defaults in K8s +No ingress default has been specified. +You can set this manually by adding an annotation to the ingress.yaml - if needed. +For example, to use Traefik - +```yaml +metadata: + name: ladder-ingress + annotations: + kubernetes.io/ingress.class: traefik +``` + +## Helm Install +`helm install -n --create-namespace` +`helm install ladder .\ladder\ -n ladder --create-namespace` + +## Helm Upgrade +`helm upgrade -n ` +`helm upgrade ladder .\ladder\ -n ladder` From 1f89661ed9b06ff028b07f1dd2db4beee92b951a Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 09:06:57 -0500 Subject: [PATCH 08/10] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b5d249b..7a56131 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,9 @@ curl https://raw.githubusercontent.com/kubero-dev/ladder/main/docker-compose.yam docker-compose up -d ``` +### Helm +See [README.md](/helm-chart/README.md) in helm-chart sub-directory for more information. + ## Usage ### Browser @@ -136,4 +139,4 @@ See in [ruleset.yaml](ruleset.yaml) for an example. - position: .left-content article # Position where to inject the code into DOM prepend: |

Suptitle

-``` \ No newline at end of file +``` From 1a708959f78966f9163e1878d0df54726383a47b Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 09:07:26 -0500 Subject: [PATCH 09/10] Update README.md --- helm-chart/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-chart/README.md b/helm-chart/README.md index 2a647a5..26244d5 100644 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -1,11 +1,11 @@ -# Basic Helm Chart for deployment of Ladder +# Helm Chart for deployment of Ladder This folder contains a basic helm chart deployment for the ladder app. # Deployment pre-reqs ## Values Edit the values to your own preferences, with the only minimum requirement being `ingress.HOST` (line 19) being updated to your intended domain name. -Other variables in values.yaml can be updated as to your preferences, with details on each variable being listed in the main [README.md](https://github.com/kubero-dev/ladder/blob/e3eb866d483f521b2bfbb4bbfd642f6d3f6ee5a4/README.md) in the root of this repo. +Other variables in values.yaml can be updated as to your preferences, with details on each variable being listed in the main [README.md](/README.md) in the root of this repo. ## Defaults in K8s No ingress default has been specified. From 51476759da541e6a9aa3d9f8726478da9928204a Mon Sep 17 00:00:00 2001 From: boomam <37086258+boomam@users.noreply.github.com> Date: Mon, 6 Nov 2023 09:12:07 -0500 Subject: [PATCH 10/10] Formatting of readme.md --- helm-chart/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/README.md b/helm-chart/README.md index 26244d5..050cbc3 100644 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -5,7 +5,7 @@ This folder contains a basic helm chart deployment for the ladder app. ## Values Edit the values to your own preferences, with the only minimum requirement being `ingress.HOST` (line 19) being updated to your intended domain name. -Other variables in values.yaml can be updated as to your preferences, with details on each variable being listed in the main [README.md](/README.md) in the root of this repo. +Other variables in `values.yaml` can be updated as to your preferences, with details on each variable being listed in the main [README.md](/README.md) in the root of this repo. ## Defaults in K8s No ingress default has been specified.