Skip to content

Add automation engine to stack - #196

Merged
pgarousi merged 20 commits into
masterfrom
add-automation-engine-to-stack
Aug 19, 2026
Merged

Add automation engine to stack#196
pgarousi merged 20 commits into
masterfrom
add-automation-engine-to-stack

Conversation

@pgarousi

Copy link
Copy Markdown
Member

No description provided.

pgarousi and others added 4 commits August 13, 2026 15:14
… dependency

Add kubex-automation-engine v1.9.1 as an optional dependency to the
kubex-automation-stack chart. This enables automated workload rightsizing
as part of the stack while maintaining backward compatibility with existing
standalone installations.

Changes:
- Added kubex-automation-engine v1.9.1 dependency with condition flag (disabled by default)
- Enhanced densify-api-secret to include 'url' field for automation engine compatibility
- Updated kubex-connector-configmap to create when automation-engine is enabled
- Added comprehensive configuration in values.yaml with clear documentation
- Updated README.md with installation and migration instructions
- Added CHANGELOG entry for version 1.0.22

Benefits:
- New customers can install automation engine as part of the stack
- Existing customers can continue using standalone installation
- Shared credentials reduce configuration overhead
- Consistent cluster identity across all stack components

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@pgarousi
pgarousi requested a review from a team as a code owner August 13, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the optional kubex-automation-engine subchart to kubex-automation-stack, wiring it into the stack’s shared configuration and documenting how to enable it (including required CRDs).

Changes:

  • Add kubex-automation-engine as an optional chart dependency (disabled by default) and expose its values in values.yaml.
  • Update example values-edit.yaml to use YAML anchors for sharing Kubex host and cluster name with the automation engine.
  • Extend stack templates/docs to support the automation engine (runtime ConfigMap creation logic, shared credential Secret keys, README + changelog updates).

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
charts/kubex-automation-stack/values.yaml Introduces kubex-automation-engine values block and defaults (disabled, uses shared secret).
charts/kubex-automation-stack/values-edit.yaml Adds YAML anchors for host/cluster name and documents how to enable the automation engine.
charts/kubex-automation-stack/templates/kubex-connector-configmap.yaml Ensures kubex-connector-runtime ConfigMap is created when automation engine is enabled.
charts/kubex-automation-stack/templates/densify-api-secret.yaml Adds url and DENSIFY_BASE_URL keys to the shared Secret for automation-engine compatibility.
charts/kubex-automation-stack/README.md Documents CRD prerequisite and detailed enablement/migration instructions for the automation engine.
charts/kubex-automation-stack/Chart.yaml Bumps chart version and adds the kubex-automation-engine dependency with a conditional enable flag.
charts/kubex-automation-stack/Chart.lock Updates dependency lock metadata to include the new subchart.
charts/kubex-automation-stack/CHANGELOG.md Records the 1.1.0 release notes for adding the automation engine integration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread charts/kubex-automation-stack/README.md Outdated
Comment thread charts/kubex-automation-stack/CHANGELOG.md
Comment thread charts/kubex-automation-stack/templates/densify-api-secret.yaml Outdated
Comment thread charts/kubex-automation-stack/CHANGELOG.md Outdated
Comment thread charts/kubex-automation-stack/README.md Outdated
@gasarekubex

Copy link
Copy Markdown
Member

So these changes, do not break backwards compatibility?

pgarousi and others added 2 commits August 14, 2026 17:40
…R_NAME from it

- Rename kubex-automation-stack template and ConfigMap from kubex-connector-runtime
  to kubex-stack-runtime.
- Update stack-managed connector, CDI, and automation-engine defaults to consume
  kubex-stack-runtime.
- Add kubex.clusterNameFrom to kubex-automation-engine; deployment uses valueFrom
  when set, otherwise falls back to kubex.clusterName. Schema and values updated.
- Drop the YAML-anchor guidance from values-edit.yaml and README; add a rename
  migration note and refresh docs/CHANGELOG.
@gasarekubex

Copy link
Copy Markdown
Member

Live Test Summary

Verified this PR end-to-end on a fresh Kind cluster (Kubernetes v1.34.0). Engine subchart wired locally via file://../kubex-automation-engine so the in-flight engine changes are exercised alongside the stack changes.

Test 1 — Stack install with connector + CDI + engine enabled

  • Only kubex-stack-runtime ConfigMap is created; kubex-connector-runtime does not exist.
  • ConfigMap data: kubex_host, kubex_tenant_id, kubex_cluster_name.
  • densify-api-secret contains all four keys: username, epassword, url, DENSIFY_BASE_URL.
  • Connector env KUBEX_HOST, CONNECTOR_TENANT_ID, CONNECTOR_CLUSTER_ID all reference kubex-stack-runtime.
  • CDI worker.clusterNameConfigMap.name resolves to kubex-stack-runtime.
  • Engine deployment renders:
    - name: CLUSTER_NAME
      valueFrom:
        configMapKeyRef:
          name: kubex-stack-runtime
          key: kubex_cluster_name
  • Engine manager container started, acquired leader lease.
  • Gateway and relay crashed only because the test used a dummy epassword (fails hex-decode). That confirms both containers correctly read the required secret keys.

Test 2 — Standalone engine with legacy kubex.clusterName

  • Installed the engine chart standalone with:
    kubex:
      clusterName: legacy-cluster
  • Deployment renders CLUSTER_NAME.value: legacy-cluster (literal), unchanged from previous behavior.
  • Chart-generated kubex-gateway-config secret has all four keys.
  • No regression for existing standalone customers.

Test 3 — Explicit user override to the old ConfigMap name

  • Installed the stack with:
    kubex-connector:
      forwarderConfigMap:
        name: kubex-connector-runtime
    kubex-ai-cdi:
      worker:
        clusterNameConfigMap:
          name: kubex-connector-runtime
          key: kubex_cluster_name
  • Stack still creates only kubex-stack-runtime.
  • Connector and CDI pods enter CreateContainerConfigError with the actionable message configmap "kubex-connector-runtime" not found.
  • Matches the migration note in the README: users with explicit overrides must update them to kubex-stack-runtime.

Outcome

Backward compatibility is preserved for both standalone engine installs and default stack installs. Users who explicitly pinned the old ConfigMap name get a clear failure that points at the migration step.

@gasarekubex

Copy link
Copy Markdown
Member

Data collection regression check: rendered the stack before and after the PR change with identical values. DENSIFY_USER and DENSIFY_EPASSWORD stayed the same in the forwarder, and there was no data-collection manifest drift. The only secret change is the extra url and DENSIFY_BASE_URL keys in densify-api-secret for automation-engine compatibility.

Comment thread charts/kubex-automation-stack/CHANGELOG.md
tsipo
tsipo previously approved these changes Aug 17, 2026
kubexautomation Bot and others added 2 commits August 18, 2026 16:14
* Sync kubex charts from automation-controller main @ d84b5b2

* chore: limit sync to cluster name wiring

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Geoffrey Asare <gasare@kubex.ai>
@gasarekubex

Copy link
Copy Markdown
Member

Conflict resolution complete.

  • PR 200 engine-chart changes are inherited from master and are no longer part of PR 196's diff.
  • Stack dependency updated to kubex-automation-engine 1.10.1.
  • Chart.lock regenerated for 1.10.1.
  • helm dependency build passed.
  • helm lint passed with automation engine, connector, and CDI enabled.
  • Stack template rendered CLUSTER_NAME from kubex-stack-runtime using only the forwarder cluster-name setting.

GitHub reports the PR as mergeable; any remaining blocked state is required checks.

tsipo
tsipo previously approved these changes Aug 18, 2026
@pgarousi
pgarousi merged commit 4544442 into master Aug 19, 2026
2 checks passed
@pgarousi
pgarousi deleted the add-automation-engine-to-stack branch August 19, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants