Skip to content

fix(deployment): apply the image tag override in the default kustomization - #308

Merged
saidsef merged 1 commit into
fix/default-portfrom
fix/kustomize-image-override
Oct 19, 2026
Merged

saidsef merged 1 commit into
fix/default-portfrom
fix/kustomize-image-override

Conversation

@saidsef

@saidsef saidsef commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Summary

The image override in deployment/kustomization.yml is now a single entry, so its newTag reaches the Deployment.

Related Issues

Fixes #302.

Testing

  • kubectl kustomize deployment/ - docker.io/saidsef/ml-classifier:v2026.05, as before
  • the same with newTag: vTEST - docker.io/saidsef/ml-classifier:vTEST

@saidsef saidsef added bug Something isn't working mcp labels Oct 16, 2026
@saidsef saidsef self-assigned this Oct 16, 2026
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

…ation

The images override in the default kustomization was three list items
where kustomize expects one, so it matched no image and dropped the
tag. Changing newTag had no effect, and the tag pinned in the base
Deployment always won. The override is now a single entry.

- deployment/kustomization.yml joins name, newName and newTag into one
  item.
- Rendered output stays the same at the current tag, and a different
  newTag now reaches the Deployment.
@saidsef
saidsef force-pushed the fix/kustomize-image-override branch from 907ca1a to cc06447 Compare October 16, 2026 23:50
@saidsef
saidsef changed the base branch from main to fix/default-port October 16, 2026 23:51
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@saidsef
saidsef merged commit 25cb84f into fix/default-port Oct 19, 2026
8 checks passed
@saidsef
saidsef deleted the fix/kustomize-image-override branch October 19, 2026 08:39
saidsef added a commit that referenced this pull request Oct 19, 2026
* fix(api): report the predicted category's probability as the score

The score in every classification response was the string "1". It came
from comparing the article text with the predicted label, which never
match. The handler now takes the class probabilities from the
soft-voting ensemble and returns the highest one with its category.

- classifier-ml.py picks the category from the model's classes at the
  highest probability, which agrees with predict.
- Responses carry the score as a number between 0 and 1.
- Classification returns the same categories as before, and nothing
  else broke.

* fix(api): retrain the served model from the train endpoint

The train endpoint never trained anything. Its payload indexing raised
a KeyError that went back to the caller with a 200, and the fit would
have run on a fresh classifier that served nothing. The endpoint now
fits a copy of the served pipeline on 80% of the posted documents,
scores it on the rest and swaps it in once the fit succeeds.

- classifier.py clones the pipeline, so predictions never see a
  half-fitted model.
- A lock turns a second request during a fit into a 409, since each
  fit holds another copy of the model in memory.
- Malformed or undersized payloads get a 400 with the reason.
- Training on 500 articles swaps the new model in while predictions
  keep serving, and nothing else broke.

* fix(api): listen on port 7070 by default

The service fell back to port 8080 when PORT was unset, while the
image, the manifests and the probes all use 7070. A checkout started
without PORT came up on the wrong port. The default now matches the
rest of the project.

- classifier-ml.py defaults PORT to 7070.
- The comment above the setting goes, since it only restated the
  default.
- With PORT unset the server listens on 7070, and nothing else broke.

* fix(deployment): apply the image tag override in the default kustomization (#308)

The images override in the default kustomization was three list items
where kustomize expects one, so it matched no image and dropped the
tag. Changing newTag had no effect, and the tag pinned in the base
Deployment always won. The override is now a single entry.

- deployment/kustomization.yml joins name, newName and newTag into one
  item.
- Rendered output stays the same at the current tag, and a different
  newTag now reaches the Deployment.

* docs(site): publish the documentation on Read the Docs (#310)

* fix(deployment): apply the image tag override in the default kustomization

The images override in the default kustomization was three list items
where kustomize expects one, so it matched no image and dropped the
tag. Changing newTag had no effect, and the tag pinned in the base
Deployment always won. The override is now a single entry.

- deployment/kustomization.yml joins name, newName and newTag into one
  item.
- Rendered output stays the same at the current tag, and a different
  newTag now reaches the Deployment.

* docs: add pages on training, running and deploying the classifier

The project's documentation was a handful of usage commands. Eight
pages now cover how the model is trained, how to run and call
the service, how to deploy and operate it, and what CI builds.

- docs/README.md serves as the home page on GitHub and on the site.
- Architecture opens with a diagram of the path from dataset to
  cluster.
- Image tags, resource limits and other values that drift stay in the
  files that set them, and the pages link there.
- Every link and anchor resolves, and nothing broke.

* docs(site): publish the documentation on Read the Docs

The documentation pages are now a Material-themed site that Read the
Docs builds with MkDocs. Read the Docs installs the tooling from a
docs dependency group in the uv lock file, which keeps it out of the
image and lets Dependabot update it with everything else.

- .readthedocs.yaml syncs the docs group with uv on Python 3.14.
- pyproject.toml pins MkDocs, Material, pymdown-extensions and Pygments
  by major version.
- mkdocs.yml runs in strict mode, so a broken link fails the build.
- README.md links to the published site and carries its badge.
- The site builds without warnings, and the image still installs only
  the runtime dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working mcp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(deployment): apply the image tag override in the default kustomization

1 participant