### Install helm-unittest Plugin Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Installs the helm-unittest plugin required for running unit tests. Use --verify=false to skip signature verification. ```bash helm plugin install https://github.com/helm-unittest/helm-unittest --verify=false ``` -------------------------------- ### Install Engram Cloud (Dev/Local) Source: https://github.com/devops-ia/helm-engram/blob/main/README.md This command is for development or local testing only. It disables authentication for quicker setup. Never use `insecureNoAuth=true` in production. ```bash helm install engram helm-engram/engram \ --set engram.insecureNoAuth=true \ --set engram.allowedProjects="my-project" ``` -------------------------------- ### Install Engram using a Values File Source: https://github.com/devops-ia/helm-engram/blob/main/charts/engram/README.md Install the Engram chart using a custom values file for configuration. This is the recommended approach for managing complex configurations. ```console helm install my-engram helm-engram/engram -f my-values.yaml ``` -------------------------------- ### Quick Install TL;DR Source: https://github.com/devops-ia/helm-engram/blob/main/charts/engram/README.md Quickly add the repository and install Engram in authenticated mode. For local development, use `--set engram.insecureNoAuth=true` and omit authentication secrets. ```console helm repo add helm-engram https://devops-ia.github.io/helm-engram helm repo update # Authenticated mode (production) helm install my-engram helm-engram/engram \ --set engram.jwtSecret="$(openssl rand -hex 32)" \ --set engram.cloudToken="$(openssl rand -hex 32)" \ --set engram.allowedProjects="my-project" \ --set postgresql.auth.password="$(openssl rand -hex 16)" ``` -------------------------------- ### Helm Install/Upgrade Fail-Fast Validation Examples Source: https://context7.com/devops-ia/helm-engram/llms.txt Demonstrates how `helm.validateConfig` enforces configuration constraints at install/upgrade time, surfacing errors before resource creation. Shows examples of missing required values and mutually exclusive settings. ```bash # Missing allowedProjects — hard fail helm install engram helm-engram/engram \ --set engram.jwtSecret="abc" \ --set engram.cloudToken="abc" # Error: INSTALLATION FAILED: # ERROR: engram.allowedProjects is required. # cloudToken set while insecureNoAuth=true — mutually exclusive helm install engram helm-engram/engram \ --set engram.insecureNoAuth=true \ --set engram.cloudToken="abc" \ --set engram.allowedProjects="proj" # Error: INSTALLATION FAILED: # ERROR: engram.cloudToken must be empty when engram.insecureNoAuth=true. # existingSecret bypasses all auth validation — no fail-fast helm install engram helm-engram/engram \ --set engram.existingSecret="my-secret" \ --set engram.allowedProjects="proj" # Released successfully — chart trusts the Secret contents ``` -------------------------------- ### Install Engram with External PostgreSQL Source: https://github.com/devops-ia/helm-engram/blob/main/charts/engram/README.md Install the Engram chart by disabling the bundled PostgreSQL and configuring it to use an external database. Provide the full database URL. ```console helm install my-engram helm-engram/engram \ --set postgresql.enabled=false \ --set engram.databaseUrl="postgres://user:pass@host:5432/engram_cloud?sslmode=require" \ --set engram.jwtSecret="" \ --set engram.cloudToken="" \ --set engram.allowedProjects="my-project" ``` -------------------------------- ### Install Engram with Bundled PostgreSQL Source: https://github.com/devops-ia/helm-engram/blob/main/charts/engram/README.md Install the Engram chart using its default bundled PostgreSQL instance. Ensure you replace placeholder secrets and tokens with actual values. ```console helm install my-engram helm-engram/engram \ --set engram.jwtSecret="" \ --set engram.cloudToken="" \ --set engram.allowedProjects="my-project" \ --set postgresql.auth.password="" ``` -------------------------------- ### Install Engram Cloud (Production) Source: https://github.com/devops-ia/helm-engram/blob/main/README.md Use this command to install Engram Cloud in authenticated mode for production environments. Ensure you generate strong random secrets for security. ```bash helm repo add helm-engram https://devops-ia.github.io/helm-engram helm repo update # Production (authenticated mode) — generate strong random secrets helm install engram helm-engram/engram \ --set engram.jwtSecret="$(openssl rand -hex 32)" \ --set engram.cloudToken="$(openssl rand -hex 32)" \ --set engram.allowedProjects="my-project" \ --set postgresql.auth.password="$(openssl rand -hex 16)" ``` -------------------------------- ### Run npm Convenience Scripts Source: https://context7.com/devops-ia/helm-engram/llms.txt Convenience scripts for linting, testing, and generating documentation using npm. Requires Node.js to be installed. ```bash npm run lint # helm lint charts/engram npm run test # helm unittest charts/engram/ npm run test:verbose npm run docs # regenerate charts/engram/README.md via helm-docs ``` -------------------------------- ### Install Engram with External PostgreSQL Source: https://context7.com/devops-ia/helm-engram/llms.txt Installs Engram Cloud while disabling the bundled PostgreSQL StatefulSet. Requires `engram.databaseUrl` to be set with connection details for an external PostgreSQL instance. ```bash helm install engram helm-engram/engram \ --set postgresql.enabled=false \ --set engram.databaseUrl="postgres://user:pass@rds.example.com:5432/engram_cloud?sslmode=require" \ --set engram.jwtSecret="$(openssl rand -hex 32)" \ --set engram.cloudToken="$(openssl rand -hex 32)" \ --set engram.allowedProjects="my-project" ``` -------------------------------- ### Install Engram Cloud (Authenticated Mode) Source: https://context7.com/devops-ia/helm-engram/llms.txt Adds the Helm repository and installs Engram Cloud in fully authenticated production mode. Requires JWT secret, cloud token, and allowed projects. Bundled PostgreSQL is used by default. ```bash helm repo add helm-engram https://devops-ia.github.io/helm-engram helm repo update helm install engram helm-engram/engram \ --set engram.jwtSecret="$(openssl rand -hex 32)" \ --set engram.cloudToken="$(openssl rand -hex 32)" \ --set engram.allowedProjects="my-project" \ --set postgresql.auth.password="$(openssl rand -hex 16)" # Expected: STATUS: deployed REVISION: 1 # Engram Cloud listens on ClusterIP :18080 # /health endpoint used by all probes ``` -------------------------------- ### Upgrade Engram Installation Source: https://github.com/devops-ia/helm-engram/blob/main/charts/engram/README.md Upgrade an existing Engram installation to a new version or apply configuration changes using a values file. ```console helm upgrade my-engram helm-engram/engram -f my-values.yaml ``` -------------------------------- ### Install Engram Cloud (Insecure Dev Mode) Source: https://context7.com/devops-ia/helm-engram/llms.txt Installs Engram Cloud in development mode, disabling all authentication. Ensure `insecureNoAuth` is set to true and authentication tokens are omitted. Not for production use. ```bash helm install engram helm-engram/engram \ --set engram.insecureNoAuth=true \ --set engram.allowedProjects="dev-project" # WARNING: never use insecureNoAuth=true in production ``` -------------------------------- ### Helm Testing and Linting Commands Source: https://context7.com/devops-ia/helm-engram/llms.txt Details commands for testing and linting the Helm chart using `helm-unittest` and `ct` (Chart Testing). Includes installing the unittest plugin, running tests, updating snapshots, linting with different value sets, and performing template smoke tests. ```bash # Install the helm-unittest plugin once helm plugin install https://github.com/helm-unittest/helm-unittest --verify=false # Run all unit tests helm unittest charts/engram/ # Run with verbose output helm unittest -v charts/engram/ # Update snapshots after modifying snapshot-based tests helm unittest --update-snapshot charts/engram/ # Lint with all CI value sets helm lint charts/engram -f charts/engram/ci/minimal-values.yaml helm lint charts/engram -f charts/engram/ci/full-values.yaml helm lint charts/engram -f charts/engram/ci/ingress-values.yaml # Template smoke tests helm template engram charts/engram -f charts/engram/ci/minimal-values.yaml helm template engram charts/engram -f charts/engram/ci/full-values.yaml ``` -------------------------------- ### Run All Unit Tests Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Executes all unit tests defined for the engram chart. Ensure the helm-unittest plugin is installed. ```bash helm unittest charts/engram/ ``` -------------------------------- ### Engram Cloud Core Configuration Source: https://context7.com/devops-ia/helm-engram/llms.txt Example `production-values.yaml` for configuring Engram Cloud core settings. Required values include `allowedProjects`, `jwtSecret`, and `cloudToken` for authenticated mode. Sensitive values are injected via Kubernetes Secrets. ```yaml engram: # Required — comma-separated list of project names Engram will serve allowedProjects: "project-alpha,project-beta" # Required in authenticated mode — JWT signing key jwtSecret: "" # supply via --set or CI secret; never hardcode # Required in authenticated mode — bearer token for AI agents cloudToken: "" # supply via --set; use `openssl rand -hex 32` # Optional — grants /dashboard/admin access adminToken: "" # Server bind address and port (defaults shown) host: "0.0.0.0" port: "18080" # Dev-only: disable all auth. Mutually exclusive with cloudToken/adminToken insecureNoAuth: false # Use a pre-existing Secret instead of letting the chart create one # (for External Secrets Operator, Sealed Secrets, Vault Agent, etc.) existingSecret: "" ``` -------------------------------- ### Accessing Engram Cloud URL Source: https://github.com/devops-ia/helm-engram/blob/main/charts/engram/templates/NOTES.txt Use this section to get the application URL. If Ingress is enabled, it lists the configured hosts and paths. Otherwise, it provides instructions for port-forwarding and accessing the health check endpoint. ```shell kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "engram.fullname" . }} 18080:{{ .Values.service.port }} curl http://localhost:18080/healthz ``` -------------------------------- ### Run Template Smoke Test (Full) Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Renders the engram chart with full values, including HPA, PDB, and Ingress resources. Verifies complex configurations. ```bash # Full — verify HPA, PDB, Ingress, resources helm template engram charts/engram -f charts/engram/ci/full-values.yaml ``` -------------------------------- ### Deploy and Verify Ingress Source: https://context7.com/devops-ia/helm-engram/llms.txt Command to upgrade the Helm release and verify the Ingress resource. ```bash helm upgrade engram helm-engram/engram -f values.yaml # Verify kubectl get ingress engram # NAME CLASS HOSTS ADDRESS PORTS AGE # engram nginx engram.example.com 10.0.0.1 80, 443 2m ``` -------------------------------- ### Run Template Smoke Test (Minimal) Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Renders the engram chart with minimal values to verify basic template rendering. Useful for quick checks. ```bash # Minimal — verify basic rendering helm template engram charts/engram -f charts/engram/ci/minimal-values.yaml ``` -------------------------------- ### Bundled PostgreSQL Configuration Source: https://context7.com/devops-ia/helm-engram/llms.txt Excerpt from `values.yaml` showing the default configuration for the bundled PostgreSQL StatefulSet. `enabled` defaults to true. `waitForReady` ensures Engram waits for PostgreSQL to be available. ```yaml postgresql: enabled: true # set false to use an external PostgreSQL waitForReady: disabled: false # keeps the wait-for-postgresql init container active image: registry: docker.io repository: postgres tag: "16-alpine" auth: username: engram password: "change-me-in-production" # override with --set database: engram_cloud service: port: 5432 persistence: enabled: true size: 1Gi storageClass: "" # empty = cluster default StorageClass accessMode: ReadWriteOnce resources: requests: cpu: 100m memory: 128Mi limits: cpu: 500m memory: 512Mi ``` -------------------------------- ### Run Linting Commands Source: https://github.com/devops-ia/helm-engram/blob/main/README.md Execute linting checks for the Helm chart. Use `lint:full` for comprehensive CI value checks. ```bash npm run lint # helm lint charts/engram ``` ```bash npm run lint:full # lint with full CI values ``` -------------------------------- ### Kubernetes Health Probes Configuration Source: https://context7.com/devops-ia/helm-engram/llms.txt Configure liveness, readiness, and startup probes for the application. The startup probe is extended to accommodate PostgreSQL migrations. ```yaml livenessProbe: httpGet: path: /health port: http initialDelaySeconds: 10 periodSeconds: 10 readinessProbe: httpGet: path: /health port: http initialDelaySeconds: 5 periodSeconds: 5 startupProbe: httpGet: path: /health port: http periodSeconds: 10 failureThreshold: 30 # 30 × 10s = 300s max startup time ``` -------------------------------- ### Run Template Smoke Tests Source: https://github.com/devops-ia/helm-engram/blob/main/README.md Perform smoke tests on chart templates with different value configurations. Use `template:full` for all features and `template:ingress` for ingress with TLS. ```bash npm run template # minimal values ``` ```bash npm run template:full # all features enabled ``` ```bash npm run template:ingress # ingress with TLS ``` -------------------------------- ### Run Unit Tests with Verbose Output Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Runs unit tests and provides verbose output, useful for debugging test failures. Requires the helm-unittest plugin. ```bash helm unittest -v charts/engram/ ``` -------------------------------- ### Regenerate Chart Documentation Source: https://github.com/devops-ia/helm-engram/blob/main/README.md Update the `charts/engram/README.md` file from its Go template. ```bash npm run docs ``` -------------------------------- ### Run Helm Lint with CI Values Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Lints the engram chart using specific CI value files. Use this to test against different configurations. ```bash # With CI values helm lint charts/engram -f charts/engram/ci/minimal-values.yaml helm lint charts/engram -f charts/engram/ci/full-values.yaml helm lint charts/engram -f charts/engram/ci/ingress-values.yaml ``` -------------------------------- ### Run Unit Tests Source: https://github.com/devops-ia/helm-engram/blob/main/README.md Execute all unit tests for the Helm chart. This includes 99 tests across 9 suites. ```bash npm run test ``` -------------------------------- ### Configure Hardened Security Context Source: https://context7.com/devops-ia/helm-engram/llms.txt Apply a hardened security posture with non-root user, read-only root filesystem, dropped capabilities, and a temporary directory volume. ```yaml # values.yaml — default security settings (shown explicitly) podSecurityContext: fsGroup: 10001 runAsGroup: 10001 runAsUser: 10001 runAsNonRoot: true securityContext: runAsNonRoot: true runAsUser: 10001 allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: - ALL tmpVolume: enabled: true # provides /tmp as emptyDir — required for readOnlyRootFilesystem medium: "" # set to "Memory" for RAM-backed tmpfs sizeLimit: "" # e.g. "64Mi" to cap /tmp size ``` -------------------------------- ### NPM Scripts for Testing Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Convenience npm scripts for running common testing tasks like linting, unit tests, and template rendering. Requires Node.js. ```bash npm run lint # helm lint charts/engram npm run test # helm unittest charts/engram/ npm run test:verbose npm run test:update-snapshot npm run template # smoke test with minimal values npm run docs # generate README.md via helm-docs ``` -------------------------------- ### Helm Upgrade and Uninstall Commands Source: https://context7.com/devops-ia/helm-engram/llms.txt Provides essential Helm commands for managing chart releases, including upgrading to new versions, performing dry-runs to preview changes, and uninstalling releases. Notes that the PostgreSQL PVC is not automatically deleted. ```bash # Upgrade to a new chart version, preserving existing values helm upgrade engram helm-engram/engram -f my-values.yaml # Dry-run upgrade to preview changes helm upgrade engram helm-engram/engram -f my-values.yaml --dry-run # Uninstall the release (note: PostgreSQL PVC is NOT deleted automatically) helm uninstall engram # Manually remove the PVC after uninstall if no longer needed kubectl delete pvc data-engram-postgresql-0 ``` -------------------------------- ### Configure PodDisruptionBudget Source: https://context7.com/devops-ia/helm-engram/llms.txt Set up a PodDisruptionBudget (PDB) to ensure a minimum number of Engram pods are available during voluntary disruptions. `minAvailable` and `maxUnavailable` are mutually exclusive. ```yaml # values.yaml — ensure at least 1 pod survives a drain podDisruptionBudget: enabled: true minAvailable: 1 # maxUnavailable: ~ # set to a number to use maxUnavailable instead # Alternative — allow at most 1 pod to be unavailable podDisruptionBudget: enabled: true minAvailable: ~ # must be null/~ when using maxUnavailable maxUnavailable: 1 ``` -------------------------------- ### Run Template Smoke Test with Existing Secret Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Tests template rendering when an existing secret is specified, verifying that Secret creation is skipped. Requires specific --set arguments. ```bash # Verify existingSecret skips Secret creation helm template engram charts/engram \ --set engram.existingSecret=my-secret \ --set engram.databaseUrl="" \ --set engram.jwtSecret="" ``` -------------------------------- ### Extra Objects Configuration for Custom Manifests Source: https://context7.com/devops-ia/helm-engram/llms.txt Use `extraObjects` to render arbitrary Kubernetes manifests like ServiceMonitors or SealedSecrets alongside the chart release. This leverages Helm's `tpl` function. ```yaml extraObjects: # Prometheus ServiceMonitor - apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: "{{ include \"engram.fullname\" . }}" labels: release: prometheus spec: selector: matchLabels: app.kubernetes.io/name: engram endpoints: - port: http path: /metrics interval: 30s # SealedSecret for credentials - apiVersion: bitnami.com/v1alpha1 kind: SealedSecret metadata: name: engram-existing-secret spec: encryptedData: ENGRAM_DATABASE_URL: AgBy3i4OJSWK+PiTySYZZA==... ENGRAM_JWT_SECRET: AgCNFkGO3syRT... ENGRAM_CLOUD_TOKEN: AgDKm9lP7... ``` -------------------------------- ### Pod Scheduling Configuration (Topology Spread, Affinity, Node Selector) Source: https://context7.com/devops-ia/helm-engram/llms.txt Define topology spread constraints, pod anti-affinity, and node selectors to control pod scheduling for high availability across zones and nodes. ```yaml # values.yaml — spread across availability zones with affinity topologySpreadConstraints: - maxSkew: 1 topologyKey: topology.kubernetes.io/zone whenUnsatisfiable: DoNotSchedule labelSelector: matchLabels: app.kubernetes.io/name: engram affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchLabels: app.kubernetes.io/name: engram topologyKey: kubernetes.io/hostname nodeSelector: kubernetes.io/os: linux tolerations: - key: "dedicated" operator: "Equal" value: "ai-workloads" effect: "NoSchedule" ``` -------------------------------- ### Update Unit Test Snapshots Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Updates snapshot files for tests using `matchSnapshot`. Commit the updated snapshot files after running this command. ```bash helm unittest --update-snapshot charts/engram/ ``` -------------------------------- ### Run Helm Lint with Default Values Source: https://github.com/devops-ia/helm-engram/blob/main/TESTING.md Performs a Helm lint check on the engram chart using default values. This validates chart packaging and syntax. ```bash # Default values helm lint charts/engram ``` -------------------------------- ### Configure Ingress for Engram Cloud Source: https://context7.com/devops-ia/helm-engram/llms.txt Enable and configure Kubernetes Ingress for Engram Cloud. Supports custom ingress controllers, TLS termination, and arbitrary annotations. ```yaml # values.yaml — nginx ingress with TLS ingress: enabled: true className: nginx annotations: nginx.ingress.kubernetes.io/rewrite-target: / cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: engram.example.com paths: - path: / pathType: Prefix tls: - secretName: engram-tls hosts: - engram.example.com ``` -------------------------------- ### Add Engram Helm Repository Source: https://github.com/devops-ia/helm-engram/blob/main/charts/engram/README.md Add the Engram Helm chart repository to your Helm configuration and update your local repository cache. ```console helm repo add helm-engram https://devops-ia.github.io/helm-engram helm repo update ``` -------------------------------- ### Configure External Secret Management with ESO Source: https://context7.com/devops-ia/helm-engram/llms.txt Use `engram.existingSecret` to point to a Secret managed by External Secrets Operator. This skips chart-level Secret creation and reads credentials from the specified Secret. ```yaml # values.yaml — point at a Secret managed by External Secrets Operator engram: existingSecret: "engram-eso-secret" allowedProjects: "my-project" insecureNoAuth: false # Provision the secret via extraObjects (rendered with tpl, supports Helm templating) extraObjects: - apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: engram-eso-secret spec: refreshInterval: 1h secretStoreRef: name: my-vault-store kind: SecretStore target: name: engram-eso-secret data: - secretKey: ENGRAM_DATABASE_URL remoteRef: key: secret/engram property: database_url - secretKey: ENGRAM_JWT_SECRET remoteRef: key: secret/engram property: jwt_secret - secretKey: ENGRAM_CLOUD_TOKEN remoteRef: key: secret/engram property: cloud_token ``` -------------------------------- ### Checking Engram Cloud Pod Status Source: https://github.com/devops-ia/helm-engram/blob/main/charts/engram/templates/NOTES.txt This command retrieves the status of Engram Cloud pods within the specified namespace, filtered by application name and instance. ```shell kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "engram.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" ``` -------------------------------- ### Enable Horizontal Pod Autoscaler Source: https://context7.com/devops-ia/helm-engram/llms.txt Configure Horizontal Pod Autoscaler (HPA) for Engram Deployment based on CPU utilization. When enabled, `replicaCount` is ignored. ```yaml # values.yaml — enable HPA autoscaling: enabled: true minReplicas: 2 maxReplicas: 10 targetCPUUtilizationPercentage: 80 resources: requests: cpu: 100m memory: 128Mi limits: cpu: 500m memory: 256Mi ``` -------------------------------- ### Enable NetworkPolicy for Engram Pods Source: https://context7.com/devops-ia/helm-engram/llms.txt Enforce ingress and egress restrictions on Engram pods using NetworkPolicy. Allows ingress from same-namespace pods and ingress controllers, and egress to PostgreSQL, DNS, and Kubernetes API. ```yaml # values.yaml — enable NetworkPolicy alongside ingress networkPolicy: enabled: true ingress: enabled: true className: nginx hosts: - host: engram.example.com paths: - path: / pathType: Prefix ``` -------------------------------- ### Uninstall Engram Chart Source: https://github.com/devops-ia/helm-engram/blob/main/charts/engram/README.md Uninstall the Engram Helm chart from your Kubernetes cluster. Note that the associated PostgreSQL Persistent Volume Claim (PVC) is not automatically deleted. ```console helm uninstall my-engram ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.