Skip to content

ModelOps GitOps Architecture and Rationale

Interactive Diagram

새 탭 ↗

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.

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 repository

Components 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.

CategoryTargetReason
VendoringSome third-party manifests related to Argo WorkflowsVendor the manifests into the repository instead of referencing remote URLs to support air-gapped deployment
VendoringThird-party manifests related to JobSetLikewise reference local manifests instead of remote URLs
Component removalSome upstream components outside this deployment scopeNot a current GitOps deployment target
Metadata removalMaintainership-related files in the vendor treeUnnecessary 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”.

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.

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.

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.

The minimum verification sequence this repository follows for upstream synchronization or the addition of a new component is as follows.

  1. Replace the vendor snapshot with the new version and confirm with diff that only the intentional deviations remain.
  2. Render every overlay with kustomize build and confirm that no overlay fails.
  3. Compare the previous render output with the new render output to isolate only the overlays that actually changed.
  4. Update the image inventory and the mirror target list.
  5. 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.