Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zarf-agent does not maintain mutate after it already has zarf-agent: patched label applied #3146

Open
a1994sc opened this issue Oct 25, 2024 · 0 comments · May be fixed by #3166
Open

Zarf-agent does not maintain mutate after it already has zarf-agent: patched label applied #3146

a1994sc opened this issue Oct 25, 2024 · 0 comments · May be fixed by #3166

Comments

@a1994sc
Copy link
Contributor

a1994sc commented Oct 25, 2024

Environment

Device and OS: RHEL 9.4
App version: `v0.42.0
Kubernetes distro being used: RKE2, 1.31.1+rke2r2

Steps to reproduce

  1. Install fluxcd
  2. Create gitrepo with the blow manifests
  3. Wait for flux to re-apply the kustomization

Expected result

The .spec.url to point to the zarf docker registry

Actual Result

The .spec.url reverts back to the url to oci://registry1.dso.mil/bigbang

Comments

We do not have a builtin template for the registry IP, but I'd like to solve this without one.
Looks like the issue is that the Zarf agent checks for the zarf-agent: patched which is added during the initial mutation, and exits if it already exists. see this block.
I believe the mutation of every resource in the mutating webhook is idempotent, so we can just delete that check.

  • Austin Abro, on Slack

Manifests

kustomization.yml

---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: bigbang
  namespace: flux-system
spec:
  interval: 2m0s
  path: ./.
  prune: true
  sourceRef:
    kind: GitRepository
    name: flux-system

bigbang.yml

---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
  name: registry1
  namespace: flux-system
spec:
  interval: 2m
  type: oci
  url: oci://registry1.dso.mil/bigbang
@a1994sc a1994sc changed the title Zarf-agent does not maintain mutate after it alread has zarf-agent: patched label applied Zarf-agent does not maintain mutate after it already has zarf-agent: patched label applied Oct 30, 2024
@a1994sc a1994sc linked a pull request Oct 31, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

Successfully merging a pull request may close this issue.

1 participant