ModelOps GitOps Architecture and Rationale
The ModelOps platform manages the Kubeflow-based layer and the platform-owned layer in a single GitOps repository. The two layers have different characteristics, so ownership and change flow must be separated even inside the same repository.
Separating vendor snapshots from overlays
Section titled “Separating vendor snapshots from overlays”The applications/ and common/ directories are not Git submodules or subtrees. They are vendor snapshots that copy the manifests of a specific release point of Kubeflow upstream (kubeflow/community-distribution) as-is. These directories are never modified directly. Every required configuration change is implemented only as a Kustomize patch under overlays/<env>/.
The reason for this split is to make upstream synchronization predictable. If the vendor directories are edited directly, then when moving to the next upstream version you cannot tell which lines were deliberately changed by us and which lines are simply merge omissions. If only overlays accumulate patches, you can replace the entire vendor snapshot with a new version and then reapply the overlays unchanged.
applications/ <- upstream vendor snapshot (do not modify directly)common/ <- upstream vendor snapshot (do not modify directly)overlays/<env>/ <- the patch layer owned by this repositoryComponents such as Percona MySQL, SeaweedFS, MLflow, JupyterHub, Prometheus/Kiali, and Argo CD are a repository-owned layer that is not part of this upstream snapshot to begin with. Version updates and migrations for these components are managed as change units completely separate from Kubeflow vendor synchronization.
What upstream synchronization actually does
Section titled “What upstream synchronization actually does”Bumping upstream to a new version is not a matter of hand-merging a few files. It means replacing the entire vendor snapshot with the new version and then restoring the deviations this repository deliberately introduced. For example, one synchronization pass had to preserve the following intentional deviations.
| Category | Target | Reason |
|---|---|---|
| Vendoring | Some third-party manifests related to Argo Workflows | Vendor the manifests into the repository instead of referencing remote URLs to support air-gapped deployment |
| Vendoring | Third-party manifests related to JobSet | Likewise reference local manifests instead of remote URLs |
| Component removal | Some upstream components outside this deployment scope | Not a current GitOps deployment target |
| Metadata removal | Maintainership-related files in the vendor tree | Unnecessary for GitOps deployment |
After synchronization, compare against the new snapshot with diff to confirm that the only remaining differences are these intentional deviations. This deviation list is kept in the repository’s AGENTS document so that the next person does not have to re-investigate “why is only this file different from upstream”.
Air-gap image management
Section titled “Air-gap image management”No workload image references a remote registry directly; every image goes through an internal mirror registry. Two image inventory files are maintained for this purpose.
- The list of original images extracted from the upstream render output
- The list of images actually targeted for air-gap mirroring
When the upstream version goes up, newly added images or images whose tags changed must be reflected in the mirror targets. If this list is not updated, the related workloads stall at the image pull stage. Some images do not use the upstream tag directly but are replaced with separately patched images to address vulnerabilities, and these patched images must be rebuilt every time the upstream tag changes.
The image patching and promotion Pipeline explains how to generate a new OS-patched Artifact, distinguish verification from Registry transfer, and update the approved GitOps reference.
Why server-side apply is required
Section titled “Why server-side apply is required”Some CRDs are large enough (on the order of hundreds of KB) that client-side apply fails. Client-side apply records the full applied manifest in the kubectl.kubernetes.io/last-applied-configuration annotation, and that annotation has a limit of roughly 256KB. If a large CRD cannot fit within that limit, the apply itself fails.
This problem is worked around in manual deployment with kubectl apply --server-side --force-conflicts, and for Applications deployed by ArgoCD the ServerSideApply=true sync option must be set explicitly. Without this setting, enabling automatic synchronization can cause the initial deployment or update of a component containing a large CRD to fail silently.
Observable changes in GitOps deployment
Section titled “Observable changes in GitOps deployment”When bumping upstream, you must review not only manifest differences but also runtime behavior differences. For example, if the default policy of the workflow engine changes, completed workflows may be cleaned up much sooner than before, or the automatic retry count on failure may differ. Such changes are not visible from a manifest diff alone; they only surface by observing behavior after an actual deployment.
Verification principles
Section titled “Verification principles”The minimum verification sequence this repository follows for upstream synchronization or the addition of a new component is as follows.
- Replace the vendor snapshot with the new version and confirm with
diffthat only the intentional deviations remain. - Render every overlay with
kustomize buildand confirm that no overlay fails. - Compare the previous render output with the new render output to isolate only the overlays that actually changed.
- Update the image inventory and the mirror target list.
- After deployment, confirm that the core user flows (login, workload creation, artifact storage and retrieval) actually work.
The boundary between the vendor directories and the overlay directories, together with this verification sequence, is the core of this platform’s GitOps structure. The next articles (ModelOps Authentication Boundaries, Multi-tenancy and Permission Boundaries) cover how requests are actually authenticated and isolated on top of this structure.