Skip to content

policy: expand rancher-ai selinux policy to microOS and Fedora42 and add e2e#144

Open
andypitcher wants to merge 4 commits into
rancher:mainfrom
andypitcher:add-rancher-ai-nonrhel
Open

policy: expand rancher-ai selinux policy to microOS and Fedora42 and add e2e#144
andypitcher wants to merge 4 commits into
rancher:mainfrom
andypitcher:add-rancher-ai-nonrhel

Conversation

@andypitcher
Copy link
Copy Markdown
Contributor

@andypitcher andypitcher commented May 21, 2026

Parent:

  1. rancher-ai SELinux policy was validated against Centos9/10, so expanding to our remaining supported distributions to cut a new Production release.
  2. Add e2e for rancher-ai

Signed-off-by: Andy Pitcher <andy.pitcher@suse.com>
@andypitcher andypitcher requested a review from a team as a code owner May 21, 2026 08:30
@andypitcher andypitcher requested a review from Copilot May 21, 2026 08:31
Copy link
Copy Markdown

Copilot AI left a comment

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 expands the existing Rancher AI SELinux policy coverage to additional supported distributions (MicroOS and Fedora 42) and updates the repository’s documented coverage/status accordingly.

Changes:

  • Mark Rancher AI components (rancher-ai-agent, rancher-ai-mcp) as covered on MicroOS and Fedora 42 in the README coverage matrix.
  • Add SELinux policy blocks for rancher_aiagent_container_t and rancher_aimcp_container_t to the MicroOS policy.
  • Add SELinux policy blocks for rancher_aiagent_container_t and rancher_aimcp_container_t to the Fedora 42 policy.

Reviewed changes

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

File Description
README.md Updates coverage/status matrix entries for Rancher AI across supported distros.
policy/microos/rancher.te Adds Rancher AI container domain templates and network permissions for MicroOS builds.
policy/fedora42/rancher.te Adds Rancher AI container domain templates and network permissions for Fedora 42 builds.

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

Comment thread README.md Outdated
Comment thread policy/microos/rancher.te Outdated
Comment thread policy/fedora42/rancher.te Outdated
Refactors the E2E testing script framework to accommodate advanced
charts like `rancher-ai-agent`. Transitioning from a rigid, single
DaemonSet HTTP workflow into a flexible multi-workload validation matrix.

- Support Multi-Workload Deployments: Extended `installRancherChart`
  to handle generic workload kinds (Deployments/DaemonSets), multiple
  workload names, and independent pod label selectors.
- OCI Registry Integration: Enabled OCI chart references alongside
  legacy HTTP charts, making CRD sibling installations conditional.
- Robust SELinux Verification: Upgraded `e2eSELinuxVerification` with a
  jq fallback (`//`) to seamlessly target both Pod-level and
  Container-level `seLinuxOptions`.
- Decoupled Policy Validation: Re-architected verification tracks
  into semicolon-delimited `pod:container:type` triplets, decoupling
  the host package checks from individual workload counts.
- Add Rancher AI Agent: Added automated test mapping for the
  `rancher-ai-agent` chart components and their associated SELinux
  security contexts (`rancher_aiagent_container_t` / `rancher_aimcp_container_t`).
- Bug Fixes: Repaired an environment defect in `installDependencies`
  that incorrectly wrote literal nested echo syntax to `.bashrc`.

Signed-off-by: Andy Pitcher <andy.pitcher@suse.com>
@andypitcher andypitcher force-pushed the add-rancher-ai-nonrhel branch from 5822f82 to 5568b7c Compare May 27, 2026 12:58
@andypitcher andypitcher changed the title policy: expand rancher-ai selinux policy to microOS and Fedora42 policy: expand rancher-ai selinux policy to microOS and Fedora42 and add e2e May 27, 2026
@andypitcher andypitcher requested a review from Copilot May 27, 2026 13:34
Copy link
Copy Markdown

Copilot AI left a comment

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 6 changed files in this pull request and generated 2 comments.

Comment thread hack/e2e/setup-vm.sh Outdated
Comment thread hack/e2e/setup-vm.sh Outdated
[rancher-logging]="cattle-logging-system rancher-logging-root-fluentbit app.kubernetes.io/name=fluentbit fluentbit fluent-bit rke_logreader_t"
[rancher-monitoring]="cattle-monitoring-system daemonset rancher-monitoring-prometheus-node-exporter app.kubernetes.io/name=prometheus-node-exporter node-exporter:node-exporter:prom_node_exporter_t rancher-charts/rancher-monitoring --set global.seLinux.enabled=true --set prometheus-node-exporter.hostRootFsMount.enabled=false"
[rancher-logging]="cattle-logging-system daemonset rancher-logging-root-fluentbit app.kubernetes.io/name=fluentbit fluentbit:fluent-bit:rke_logreader_t rancher-charts/rancher-logging --set global.seLinux.enabled=true"
[rancher-ai-agent]="cattle-ai-agent-system deployment rancher-ai-agent,rancher-mcp-server app=rancher-ai-agent,app=rancher-mcp-server rancher-ai-agent:agent:rancher_aiagent_container_t;rancher-mcp-server:mcp-server:rancher_aimcp_container_t oci://stgregistry.suse.com/rancher/charts/rancher-ai-agent --set seLinux.enabled=true --set insecureSkipTls=true"
macedogm
macedogm previously approved these changes May 27, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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