From 8d48aa0523d02c78788e6f9afecd6e070735ba26 Mon Sep 17 00:00:00 2001 From: Lorenzo Venerandi Date: Sun, 1 Mar 2026 21:32:37 +0100 Subject: [PATCH] chore: update Helm chart to version 1.1.0 and remove autoscaling configuration --- helm/Chart.yaml | 4 +- helm/README.md | 163 +++--------------------- helm/templates/deployment.yaml | 2 - helm/templates/hpa.yaml | 32 ----- helm/values.yaml | 9 +- kubernetes/manifests/kustomization.yaml | 1 - 6 files changed, 21 insertions(+), 190 deletions(-) delete mode 100644 helm/templates/hpa.yaml diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 15ffe7c..92d530c 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: krawl-chart description: A Helm chart for Krawl honeypot server type: application -version: 1.0.10 -appVersion: 1.0.10 +version: 1.1.0 +appVersion: 1.1.0 keywords: - honeypot - security diff --git a/helm/README.md b/helm/README.md index ae57261..09c2387 100644 --- a/helm/README.md +++ b/helm/README.md @@ -10,103 +10,31 @@ A Helm chart for deploying the Krawl honeypot application on Kubernetes. ## Installation - -### Helm Chart - -Install with default values: +### From OCI Registry ```bash helm install krawl oci://ghcr.io/blessedrebus/krawl-chart \ - --version 1.0.0 \ - --namespace krawl-system \ - --create-namespace -``` - -Or create a minimal `values.yaml` file: - -```yaml -service: - type: LoadBalancer - port: 5000 - -timezone: "Europe/Rome" - -ingress: - enabled: true - className: "traefik" - hosts: - - host: krawl.example.com - paths: - - path: / - pathType: Prefix - -config: - server: - port: 5000 - delay: 100 - dashboard: - secret_path: null # Auto-generated if not set - -database: - persistence: - enabled: true - size: 1Gi -``` - -Install with custom values: - -```bash -helm install krawl oci://ghcr.io/blessedrebus/krawl-chart \ - --version 0.2.2 \ + --version 1.1.0 \ --namespace krawl-system \ --create-namespace \ - -f values.yaml + -f values.yaml # optional ``` -To access the deception server: +### From local chart + +```bash +helm install krawl ./helm -n krawl-system --create-namespace -f values.yaml +``` + +A minimal [values.yaml](values-minimal.yaml) example is provided in this directory. + +Once installed, get your service IP: ```bash kubectl get svc krawl -n krawl-system ``` -Once the EXTERNAL-IP is assigned, access your deception server at `http://:5000` - -### Add the repository (if applicable) - -```bash -helm repo add krawl https://github.com/BlessedRebuS/Krawl -helm repo update -``` - -### Install from OCI Registry - -```bash -helm install krawl oci://ghcr.io/blessedrebus/krawl-chart --version 0.2.1 -``` - -Or with a specific namespace: - -```bash -helm install krawl oci://ghcr.io/blessedrebus/krawl-chart --version 0.2.1 -n krawl --create-namespace -``` - -### Install the chart locally - -```bash -helm install krawl ./helm -``` - -### Install with custom values - -```bash -helm install krawl ./helm -f values.yaml -``` - -### Install in a specific namespace - -```bash -helm install krawl ./helm -n krawl --create-namespace -``` +Then access the deception server at `http://:5000` ## Configuration @@ -221,16 +149,6 @@ The following table lists the main configuration parameters of the Krawl chart a | `resources.requests.cpu` | CPU request | `100m` | | `resources.requests.memory` | Memory request | `64Mi` | -### Autoscaling - -| Parameter | Description | Default | -|-----------|-------------|---------| -| `autoscaling.enabled` | Enable horizontal pod autoscaling | `false` | -| `autoscaling.minReplicas` | Minimum replicas | `1` | -| `autoscaling.maxReplicas` | Maximum replicas | `1` | -| `autoscaling.targetCPUUtilizationPercentage` | Target CPU utilization | `70` | -| `autoscaling.targetMemoryUtilizationPercentage` | Target memory utilization | `80` | - ### Network Policy | Parameter | Description | Default | @@ -248,68 +166,24 @@ kubectl get secret krawl-server -n krawl-system \ ## Usage Examples -### Basic Installation +You can override individual values with `--set` without a values file: ```bash -helm install krawl ./helm -``` - -### Installation with Custom Domain - -```bash -helm install krawl ./helm \ - --set ingress.hosts[0].host=honeypot.example.com -``` - -### Enable Canary Tokens - -```bash -helm install krawl ./helm \ +helm install krawl oci://ghcr.io/blessedrebus/krawl-chart --version 1.1.0 \ + --set ingress.hosts[0].host=honeypot.example.com \ --set config.canary.token_url=https://canarytokens.com/your-token ``` -### Configure Custom API Endpoint - -```bash -helm install krawl ./helm \ - --set config.api.server_url=https://api.example.com \ - --set config.api.server_port=443 -``` - -### Create Values Override File - -Create `custom-values.yaml`: - -```yaml -config: - server: - port: 8080 - delay: 500 - canary: - token_url: https://your-canary-token-url - dashboard: - secret_path: /super-secret-path - crawl: - max_pages_limit: 500 - ban_duration_seconds: 3600 -``` - -Then install: - -```bash -helm install krawl ./helm -f custom-values.yaml -``` - ## Upgrading ```bash -helm upgrade krawl ./helm +helm upgrade krawl oci://ghcr.io/blessedrebus/krawl-chart --version 1.1.0 -f values.yaml ``` ## Uninstalling ```bash -helm uninstall krawl +helm uninstall krawl -n krawl-system ``` ## Troubleshooting @@ -348,7 +222,6 @@ kubectl logs -l app.kubernetes.io/name=krawl - `configmap.yaml` - Application configuration - `pvc.yaml` - Persistent volume claim - `ingress.yaml` - Ingress configuration - - `hpa.yaml` - Horizontal pod autoscaler - `network-policy.yaml` - Network policies ## Support diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 3676817..730f774 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -5,9 +5,7 @@ metadata: labels: {{- include "krawl.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} - {{- end }} strategy: type: Recreate selector: diff --git a/helm/templates/hpa.yaml b/helm/templates/hpa.yaml deleted file mode 100644 index 0f64b10..0000000 --- a/helm/templates/hpa.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "krawl.fullname" . }} - labels: - {{- include "krawl.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "krawl.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index e8dc5bb..8b4a907 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -3,7 +3,7 @@ replicaCount: 1 image: repository: ghcr.io/blessedrebus/krawl pullPolicy: Always - tag: "1.0.0" + tag: "1.1.0" imagePullSecrets: [] nameOverride: "krawl" @@ -54,13 +54,6 @@ resources: # If not set, container will use its default timezone timezone: "" -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 1 - targetCPUUtilizationPercentage: 70 - targetMemoryUtilizationPercentage: 80 - nodeSelector: {} tolerations: [] diff --git a/kubernetes/manifests/kustomization.yaml b/kubernetes/manifests/kustomization.yaml index 4a5fcd9..2fdecc2 100644 --- a/kubernetes/manifests/kustomization.yaml +++ b/kubernetes/manifests/kustomization.yaml @@ -10,6 +10,5 @@ resources: - service.yaml - network-policy.yaml - ingress.yaml - - hpa.yaml namespace: krawl-system