diff --git a/.gitignore b/.gitignore index 38de891c..561ce67b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Ignore Visual Studio Code settings -settings.json +.vscode/ .idea/ Chart.lock \ No newline at end of file diff --git a/charts/MINI_RUNTIME_PUBLISHING.md b/charts/MINI_RUNTIME_PUBLISHING.md new file mode 100644 index 00000000..3dcbab6b --- /dev/null +++ b/charts/MINI_RUNTIME_PUBLISHING.md @@ -0,0 +1,125 @@ +# Publishing Mini-Runtime Helm Charts + +## Chart Structure + +The mini-runtime charts use a simple 2-chart structure: + +- **mini-runtime**: Base chart with templates and values + - Runtime & Threat-client: Use `latest` tags + - Kafka, Keel, Redis: Use versioned tags (stable infrastructure) + +- **mini-runtime-versioned**: Wrapper chart that depends on mini-runtime + - Overrides only Runtime & Threat-client to use specific versions + - Inherits all other values from mini-runtime + +## Publishing to Helm Registry + +### Prerequisites + +Both charts must be published to your Helm repository for the dependency resolution to work when users install from the registry. + +### Publishing Steps + +When you're ready to release: + +1. **Update chart versions** (if needed): + - `charts/mini-runtime/Chart.yaml` - version field + - `charts/mini-runtime-versioned/Chart.yaml` - version field and dependency version + +2. **Update image tags** (if needed): + - **For infrastructure updates (Kafka/Keel/Redis)**: Update `charts/mini-runtime/values.yaml` + - **For application version updates**: Update `charts/mini-runtime-versioned/values.yaml` + +3. **Commit and push** to trigger GitHub Actions: + ```bash + git add charts/mini-runtime* + git commit -m "Release mini-runtime charts v0.5.9" + git push origin master + ``` + +4. Your existing GitHub Actions workflow will automatically: + - Package both charts + - Publish to GitHub Pages + - Update the Helm repository index + +### How It Works + +**Local Development:** +- mini-runtime-versioned uses `repository: file://../mini-runtime` in Chart.yaml +- Run `helm dependency update` to link to local mini-runtime chart +- Works perfectly for testing + +**Published to Registry:** +- Users run: `helm repo add akto https://akto-api-security.github.io/helm-charts` +- When installing mini-runtime-versioned, Helm automatically: + - Finds the mini-runtime dependency in the same repo + - Downloads and uses it + +### User Installation + +Users can now choose between two charts: + +```bash +# Add the repo once +helm repo add akto https://akto-api-security.github.io/helm-charts +helm repo update + +# Install with latest application tags (runtime & threat-client) +helm install my-runtime akto/akto-mini-runtime + +# OR install with all versioned tags +helm install my-runtime akto/akto-mini-runtime-versioned +``` + +## Maintenance + +### For Feature/Template Changes +1. Update `charts/mini-runtime/templates/` or `charts/mini-runtime/values.yaml` +2. Bump version in both Chart.yaml files +3. Commit and push + +### For Infrastructure Version Updates (Kafka/Keel/Redis) +1. Update `charts/mini-runtime/values.yaml` with new infrastructure versions +2. Bump version in both Chart.yaml files +3. Commit and push +4. Both charts will use the new infrastructure versions + +### For Application Version Updates (Runtime/Threat-client) +1. Update `charts/mini-runtime-versioned/values.yaml` with new application versions +2. Bump version in mini-runtime-versioned/Chart.yaml +3. Commit and push +4. mini-runtime continues using `latest`, mini-runtime-versioned uses new versions + +### Version Sync +Keep these versions in sync: +- `mini-runtime/Chart.yaml` version X.Y.Z +- `mini-runtime-versioned/Chart.yaml` version X.Y.Z and dependency version X.Y.Z + +## Testing Before Publishing + +Always test locally before pushing: + +```bash +# Test mini-runtime (latest runtime & threat-client, versioned infrastructure) +cd charts/mini-runtime +helm template test . | grep "image:" + +# Expected: +# - akto-api-security-mini-runtime:latest +# - confluentinc-cp-kafka:8.1.1-1-ubi9 +# - keelhq-keel:akto_v1.0.0 +# - akto-threat-detection:latest +# - redis:7.0 + +# Test mini-runtime-versioned (all versioned) +cd charts/mini-runtime-versioned +helm dependency update +helm template test . | grep "image:" + +# Expected: +# - akto-api-security-mini-runtime:1.57.6_local +# - confluentinc-cp-kafka:8.1.1-1-ubi9 +# - keelhq-keel:akto_v1.0.0 +# - akto-threat-detection:1.6.7 +# - redis:7.0 +``` diff --git a/charts/mini-runtime-versioned/Chart.yaml b/charts/mini-runtime-versioned/Chart.yaml new file mode 100644 index 00000000..64aad6f5 --- /dev/null +++ b/charts/mini-runtime-versioned/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v2 +name: akto-mini-runtime-versioned +description: Helm chart for installing Akto hybrid runtime with all versioned image tags +type: application +version: 0.5.9 +appVersion: "0.5.9" +home: https://www.akto.io +icon: https://akto-setup.s3.amazonaws.com/templates/128x128.png +sources: + - https://github.com/akto-api-security/helm-charts/tree/master/charts/mini-runtime-versioned +keywords: + - akto + - api + - api security + - dast +maintainers: + - name: Ankush Jain + email: ankush@akto.io +dependencies: + - name: akto-mini-runtime + version: 0.5.9 + repository: file://../mini-runtime diff --git a/charts/mini-runtime-versioned/charts/akto-mini-runtime-0.5.9.tgz b/charts/mini-runtime-versioned/charts/akto-mini-runtime-0.5.9.tgz new file mode 100644 index 00000000..325e9c76 Binary files /dev/null and b/charts/mini-runtime-versioned/charts/akto-mini-runtime-0.5.9.tgz differ diff --git a/charts/mini-runtime-versioned/values.yaml b/charts/mini-runtime-versioned/values.yaml new file mode 100644 index 00000000..da174755 --- /dev/null +++ b/charts/mini-runtime-versioned/values.yaml @@ -0,0 +1,13 @@ +# This chart uses the mini-runtime chart with all versioned image tags +# Only overrides the runtime and threat-client images (which are "latest" in base chart) + +akto-mini-runtime: + mini_runtime: + aktoApiSecurityRuntime: + image: + tag: 1.57.6_local + + threat_client: + aktoApiSecurityThreatClient: + image: + tag: "1.6.7" diff --git a/charts/mini-runtime/Chart.yaml b/charts/mini-runtime/Chart.yaml index e6f665ff..6c32876c 100644 --- a/charts/mini-runtime/Chart.yaml +++ b/charts/mini-runtime/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: akto-mini-runtime description: Helm chart for installing Akto hybrid runtime type: application -version: 0.5.8 -appVersion: "0.5.8" +version: 0.5.9 +appVersion: "0.5.9" home: https://www.akto.io icon: https://akto-setup.s3.amazonaws.com/templates/128x128.png sources: diff --git a/charts/mini-runtime/values.yaml b/charts/mini-runtime/values.yaml index 438b0bdb..07efc8f2 100644 --- a/charts/mini-runtime/values.yaml +++ b/charts/mini-runtime/values.yaml @@ -66,7 +66,7 @@ mini_runtime: token: "" image: repository: public.ecr.aws/aktosecurity/akto-api-security-mini-runtime - tag: 1.57.7_local + tag: latest imagePullPolicy: Always resources: requests: @@ -210,7 +210,7 @@ threat_client: useHostName: true image: repository: aktosecurity/akto-threat-detection - tag: "1.6.7" + tag: latest imagePullPolicy: Always resources: requests: @@ -235,4 +235,4 @@ redis: persistence: enabled: false size: "2Gi" - storageClass: "" + storageClass: "" \ No newline at end of file