Skip to content

kedify-agent: multitenant keda config#424

Merged
wozniakjan merged 4 commits into
kedify:mainfrom
wozniakjan:agent_mt
Jun 12, 2026
Merged

kedify-agent: multitenant keda config#424
wozniakjan merged 4 commits into
kedify:mainfrom
wozniakjan:agent_mt

Conversation

@wozniakjan

@wozniakjan wozniakjan commented Mar 16, 2026

Copy link
Copy Markdown
Member

Enable the multitenant KEDA feature for kedify-agent

agent:
  features:
    multitenantKEDAEnabled: true

This means that kedify-agent will watch for KEDA tenant helm installations and connect them to a single multitenant KEDA deployment.

see also: #423

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces initial Helm-chart wiring for a multitenant KEDA setup in the kedify-agent chart: a feature flag in values, additional RBAC needed for tenant discovery/cert/config management, and CRD/schema + default CR changes to represent multitenancy configuration.

Changes:

  • Add agent.features.multitenantKEDAEnabled flag and an agent.multitenant values block placeholder.
  • Gate additional ClusterRole permissions (configmaps + specific secrets) behind the multitenancy feature flag.
  • Extend KedifyConfiguration CRD schema with multitenancy fields/validations and surface multitenancy in the default KedifyConfiguration CR when enabled.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
kedify-agent/values.yaml Adds multitenancy-related values (multitenantKEDAEnabled, multitenant).
kedify-agent/templates/agent-rbac.yaml Adds conditional RBAC rules for multitenant tenant discovery/config/certs.
kedify-agent/files/crs/default-kedifyconfig.yaml Enables emitting multitenancy config in the default KedifyConfiguration CR when feature is on.
kedify-agent/files/crds/kedify-configuration.yaml Extends CRD schema for multitenancy, adds validations and requires name/namespace in installations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread kedify-agent/files/crs/default-kedifyconfig.yaml
Comment thread kedify-agent/values.yaml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread kedify-agent/files/crs/default-kedifyconfig.yaml
Comment thread kedify-agent/templates/agent-rbac.yaml Outdated
Comment thread kedify-agent/templates/agent-rbac.yaml
Comment thread kedify-agent/values.yaml Outdated
@wozniakjan wozniakjan marked this pull request as ready for review June 10, 2026 08:32
@wozniakjan wozniakjan requested a review from Copilot June 10, 2026 08:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread kedify-agent/templates/agent-rbac.yaml
Comment thread kedify-agent/files/crds/kedify-configuration.yaml
wozniakjan and others added 3 commits June 12, 2026 13:22
ConfigMap-based self-registration: enable multitenancy on the default
KEDA installation and grant the agent RBAC to sync tenant certs and the
shared multitenancy config. Ported onto the hookless CR install (kedacore#462):
the multitenancy toggle now lives in files/crs/default-kedifyconfig.yaml.

Squashes the two original PR kedacore#424 commits (the second reverted the
verbose per-tenant CR templating of the first).

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
…tenant value

- The updated KedifyConfiguration CRD requires a non-empty name on each
  kedaInstallations entry, but the default CR only set namespace, so CR
  creation/upgrade would fail validation. Set name to the release namespace.
- Remove agent.multitenant (was an empty value wired to nothing); multitenancy
  is driven by features.multitenantKEDAEnabled and dynamic tenant registration.
The multitenant ClusterRole granted the agent cluster-wide `get` on Secrets
named `kedaorg-certs`. That is redundant and hardcodes the secret name: the keda
chart already grants the agent per-tenant access via namespaced, resourceName-
scoped Roles created in each tenant namespace (kedify-agent-secret-rbac.yaml),
bound to the agent ServiceAccount and keyed on each tenant's own configurable
certificates.secretName. The cluster-wide rule only ever matched the default
name and broadened secret read unnecessarily.

Keep the cluster-wide ConfigMap discovery (RBAC can't label-filter list/watch)
and the resourceName-scoped get/patch/update on the kedify-multitenancy-config
secret the agent owns.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
@wozniakjan wozniakjan merged commit 6e7f976 into kedify:main Jun 12, 2026
@github-actions github-actions Bot added this to the kedify-agent/next milestone Jun 12, 2026
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.

3 participants