Skip to content

Conversation

@xuezhaojun
Copy link
Collaborator

Summary

This PR implements a new service-proxy feature that enables users on the hub cluster to access services in managed clusters through an HTTPS proxy server with authentication and impersonation support.

Key Changes

New Components

  • User Server (pkg/userserver/): HTTPS server on hub that receives user requests and forwards them to ANP proxy-server
  • Service Proxy (pkg/serviceproxy/): HTTP proxy server on managed clusters that forwards requests to target services with impersonation support

Core Features

  1. User Authentication & Impersonation

    • Support for external IDP users, groups, and hub ServiceAccount tokens
    • Automatic user impersonation when accessing kubernetes.default.svc
    • Special handling for hub ServiceAccount tokens with cluster:hub: prefix
  2. Helm Chart Updates

    • New user-server deployment and service templates
    • Updated CRDs for ManagedProxyServiceResolver
    • Additional RBAC permissions for certificate management
  3. Infrastructure Improvements

    • New utility functions for token validation and user extraction
    • Certificate controller for automated cert management
    • Enhanced e2e test framework with better isolation

Requirements

  • MCE (Multicluster Engine) >= 2.9
  • Hub and managed clusters must use the same external IDP for user impersonation

Testing

  • Updated e2e tests with new test infrastructure
  • Added comprehensive unit tests for utility functions
  • Manual testing guide included in pkg/serviceproxy/readme.md

Related Documentation

  • Service proxy architecture and flow diagrams in pkg/serviceproxy/readme.md
  • Detailed testing instructions for impersonation features

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

qiujian16 and others added 13 commits March 18, 2025 04:13
…les to reflect the new version. Adjust formatting for consistency in YAML files. (stolostron#226) (stolostron#227)

Signed-off-by: xuezhaojun <[email protected]>
…g golang.org/x/crypto v0.36.0, golang.org/x/oauth2 v0.28.0, golang.org/x/sys v0.31.0, golang.org/x/term v0.30.0, and golang.org/x/text v0.23.0. This ensures compatibility and security improvements across the project. (stolostron#230)

Signed-off-by: xuezhaojun <[email protected]>
…ctions (stolostron#235)

Update README.md to use the official OCM Helm chart repository URL and correct the namespace for verification commands.

- Change helm repo URL from Azure blob storage to open-cluster-management.io
- Update kubectl namespace from open-cluster-management-cluster-proxy to open-cluster-management-addon

Signed-off-by: Meng Yan <[email protected]>
* chore: upgrade Go to 1.24.0 and update dependencies

- Upgrade Go version from 1.23.6 to 1.24.0 in go.mod
- Update Dockerfile to use golang:1.24.0
- Update GitHub Actions workflows to use Go 1.24
- Upgrade golang.org/x/net from v0.34.0 to v0.46.0
- Upgrade helm.sh/helm/v3 from v3.14.2 to v3.19.0
- Upgrade sigs.k8s.io/controller-runtime from v0.18.4 to v0.22.3
- Update vendor dependencies and run go mod tidy
- All tests passing after upgrades

Signed-off-by: zhujian <[email protected]>
Signed-off-by: zhujian <[email protected]>

* chore: upgrade controller-gen to v0.18.0

Upgrade controller-gen from v0.15.0 to v0.18.0 to resolve compatibility
issues with Kubernetes v0.34.1 APIs and controller-runtime v0.22.3.

The previous version (v0.15.0) was unable to parse the vendored k8s.io/api
package, causing manifest generation failures. This upgrade fixes the
"missing argument" and "unknown type" errors during CRD generation.

Changes:
- Update controller-gen version in Makefile to v0.18.0
- Regenerate CRD manifests with the new controller-gen version

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: zhujian <[email protected]>

---------

Signed-off-by: zhujian <[email protected]>
Signed-off-by: zhujian <[email protected]>
Co-authored-by: Claude <[email protected]>
The linelint check doesn't provide significant value and consistently blocks
code merging. Removing it to streamline the CI/CD pipeline while maintaining
other quality checks through the verify, build, unit, integration, and e2e jobs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: xuezhaojun <[email protected]>
Co-authored-by: Claude <[email protected]>
* Add go vendors.

Signed-off-by: xuezhaojun <[email protected]>

* Remove CHANGELOG-0.3.0.md file

This removes the changelog file for version 0.3.0 as part of the changelog directory cleanup.

Signed-off-by: xuezhaojun <[email protected]>

---------

Signed-off-by: xuezhaojun <[email protected]>
…access managed cluster service on the hub side.

Signed-off-by: xuezhaojun <[email protected]>
@openshift-merge-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci
Copy link

openshift-ci bot commented Nov 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xuezhaojun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Nov 6, 2025
@xuezhaojun
Copy link
Collaborator Author

Wrong repository, moving to upstream PR open-cluster-management-io#244

@xuezhaojun xuezhaojun closed this Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants