Skip to content

Implement Real Upstream Reader for Cluster in Gloo Edge Provider #112

@shivansh-source

Description

@shivansh-source

Description

Currently, the readUpstreamsFromCluster function in the Gloo Edge provider is a stub and returns no Upstreams when reading from a Kubernetes cluster. To support full fidelity conversion and UX parity with file input, implement readUpstreamsFromCluster using the Kubernetes dynamic client to read Upstream custom resources from the cluster and properly populate serviceName, serviceNamespace, and servicePort fields.

File Upstream reading has already been completed and is fully functional.

Acceptance Criteria

  • Gloo Edge provider reads Upstream custom resources from the cluster using the controller-runtime client
  • Extracts all relevant fields: name, namespace, spec.kube.serviceName, serviceNamespace, and servicePort
  • Populates the provider's storage with discovered Upstreams for use during translation
  • Adds and passes unit tests and integration tests for this behavior
  • Proper error handling for missing or malformed upstream definitions

Context

At present, the cluster loader code returns empty results, meaning cluster-driven conversions do not resolve upstream ports or service metadata. This is inconsistent with file-based conversion, which does parse and resolve upstreams.

References

  • See readUpstreamsFromFile implementation in pkg/i2gw/providers/glooedge/resource_reader.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions