Skip to content

refactor(modelsasservice): [3.5-ea.2] move NetworkPolicy to upstream manifests - #34511

Open
ugiordan wants to merge 1 commit into
rhoai-3.5-ea.2from
cherry-pick/rhoai-3.5-ea.2/maas-networkpolicy-upstream
Open

refactor(modelsasservice): [3.5-ea.2] move NetworkPolicy to upstream manifests#34511
ugiordan wants to merge 1 commit into
rhoai-3.5-ea.2from
cherry-pick/rhoai-3.5-ea.2/maas-networkpolicy-upstream

Conversation

@ugiordan

Copy link
Copy Markdown

Description

Cherry-pick of opendatahub-io/opendatahub-operator#3747 for rhoai-3.5-ea.2.

Moves the payload-processing NetworkPolicy from Go-constructed code to the upstream models-as-a-service kustomize bundle.

What changed

  • Removed payloadProcessingNetworkPolicy() Go builder function
  • The NP now comes from the upstream kustomize bundle and flows through the existing rendering pipeline (kustomize build, namespace transform, restoreGatewayNamespaceResources, label injection, GC cleanup)
  • gatewayNamespaceResources already includes the NP entry for namespace restoration

Why

The payload-processing Deployment, Service, ServiceAccount, and ConfigMap already come from the upstream kustomize bundle. The NP was the only resource the operator was constructing in Go.

Related PRs

Move the payload-processing NetworkPolicy from operator Go code (#3699)
to the upstream models-as-a-service kustomize bundle
(opendatahub-io/models-as-a-service#1084), where it belongs alongside
the other payload-processing resources.

Operator-side changes:
- Remove payloadProcessingNetworkPolicy() raw map[string]any builder
- Add NetworkPolicy to gatewayNamespaceResources so the existing
  kustomize pipeline handles namespace restoration
- The NP now flows through the same rendering pipeline as all other
  payload-processing resources (Deployment, Service, ServiceAccount)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@ugiordan

Copy link
Copy Markdown
Author

/hold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant