Skip to content

When using [alpha] feature registry-mode, OCIRepo resource not properly mutated to intra-cluster endpoint #4474

@a1994sc

Description

@a1994sc

Environment

OS: Rocky Linux 9.6
App version: v0.67.0
Kubernetes distro being used: k0s
Other: --features=registry-proxy=true --registry-mode=proxy

Steps to reproduce

  1. zarf init --features=registry-proxy=true --registry-mode=proxy --confirm
  2. Deploy fluxcd
  3. Deploy fluxcd OCI repo resource

Expected result

Webhook mutates to intra-cluster docker registry

Actual Result

Webhook mutates to "original address", or 127.0.0.1:5000

Visual Proof (screenshots, videos, text, etc)

2025-12-14 02:24:05 DBG registry appears to not be a nodeport service, using original address address=127.0.0.1:5000

Code links

registryAddress, err := cluster.GetServiceInfoFromRegistryAddress(ctx, zarfState.RegistryInfo.Address)

func (c *Cluster) GetServiceInfoFromRegistryAddress(ctx context.Context, stateRegistryAddress string) (string, error) {
serviceList, err := c.Clientset.CoreV1().Services("").List(ctx, metav1.ListOptions{})
if err != nil {
return "", err
}
// If this is an internal service then we need to look it up and
svc, port, err := serviceInfoFromNodePortURL(serviceList.Items, stateRegistryAddress)
if err != nil {
logger.From(ctx).Debug("registry appears to not be a nodeport service, using original address", "address", stateRegistryAddress)
return stateRegistryAddress, nil
}
return fmt.Sprintf("%s:%d", svc.Spec.ClusterIP, port), nil
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions