CINC Supermarket
Runs in dev: one API, one worker, one artifact gateway, a separate Zot
app-template release, and a dedicated two-instance PostgreSQL 18 CNPG cluster.
The API, worker, gateway and bootstrap use digest-pinned b2476b7a.
The completed trial import retains its original image. Zot uses 2.1.21
for ARM64, pinned by digest. PostgreSQL 18 is also digest-pinned.
The pinned Cinc image is anonymously pullable; no GitLab pull credential is needed.
The internal routes follow the existing Traefik Gateway configuration:
- API and browse UI:
https://supermarket.ironstone.casa - Download gateway:
https://cinc-artifacts.ironstone.casa - Zot:
zot.dev.svc.cluster.local:5000, ClusterIP only, bearer authenticated.
Zot stores OCI data in RustFS. Downloads use a separate S3 copy through the credential-free artifact gateway. The database stores universe snapshots; the worker regenerates them after ingest. No additional snapshot bucket is needed. Human login and CI publishing are disabled. The gateway checks download permissions over a private mTLS service using a separate cert-manager identity.
The worker indexes public Sous-Chefs cookbook artifacts from GHCR. Provision the
package discovery credential listed below before rollout. Only the worker
receives it.
Check /api/v2/sources for sync status. Artifact bytes remain in GHCR, and client
downloads require no GitHub login.
Secrets required before rollout #
Create these items in the vault exposed by the onepassword-connect
ClusterSecretStore. Never commit their values. Use different random passwords
for each database account and different access keys for each S3 identity.
| Item | Category | Fields | Use |
|---|---|---|---|
cinc-registry-db-owner |
Database | password |
CNPG bootstrap and migrations only |
cinc-registry-db-runtime |
Database | password |
cinc_sm_runtime account |
rustfs-cinc-registry-oci |
API Credential | username, password |
Bucket cinc-registry-oci |
rustfs-cinc-registry-artifacts |
API Credential | username, password |
Bucket cinc-registry-artifacts |
rustfs-cnpg-cinc-registry |
API Credential | username, password |
Bucket cnpg-cinc-registry |
cinc-registry-oci-signing |
Secure Note | signing_key, certificate |
Matching private key and public certificate |
CINC Supermarket - GitHub PAT |
API Credential | credential |
GitHub classic PAT with only read:packages |
API Credential items contain their native credential field plus a concealed
password compatibility field with the same secret, as required by the existing
ExternalSecret property references. Keep both fields consistent when rotating keys.
Generate the signing pair with the pinned Cinc binary:
cinc-supermarket gen-oci-key --out oci-signing-key.pem --cert-out oci-token.crt
Store the file contents in the respective fields. Only Cinc receives the private key; Zot receives the certificate. Keep the private key out of logs and Git. The gateway receives no database, OCI or S3 credentials.
The separate cinc-registry-buckets Flux Kustomization in storage invokes the
existing RustFS provisioner with the new cinc-registry scope. It creates only
these three buckets and their individual IAM users/policies. It does not run
the provisioner’s all scope or change credentials for existing applications.
The existing bucket policy grants object read/write/delete plus bucket listing
and multipart operations, restricted to that identity’s single bucket.
Rollout and acceptance #
Flux orders the work as follows:
- Provision buckets and IAM users, then reconcile CNPG and Zot.
- Reconcile Cinc configuration and ExternalSecrets.
- Run the versioned
supermarket-bootstrapJob: migrate using the owner account in an init container, then generate an initial universe with the runtime account. Artifact delivery is disabled only for the migration process because it has no artifact credentials and does not access artifact storage. - Install the Cinc app-template release and wait for API/worker/gateway probes.
- Retain the completed
cinc-registry-import-trial-fa4e9796Job. It imported the embedded five-cookbook set: nginx, yum, apt, logrotate and cron. No new import is part of this rename.
Jobs have no TTL, so successful reconciliation does not repeatedly recreate them. Do not delete the completed import Job: Flux would recreate its historical template, which references the old application configuration. For a new import, prepare a new Job with the current configuration and an explicitly reviewed cookbook selection. The ingester checks existing versions; verify a new run imports no duplicates.
Check Job completion, all three Deployment readiness conditions, CNPG readiness,
and the first successful scheduled backup. Check both HTTPRoutes are accepted.
Then confirm /healthz, /readyz, /universe, /api/v2/packages and the legacy
nginx version/download endpoints. Follow a download through the artifact hostname
and compare its SHA-256 with the API’s advertised artifact digest. Confirm an
unsigned direct request to Zot /v2/ is rejected and no direct S3 route exists.
Verify each RustFS identity cannot list another application’s bucket.
No publish, data deletion or legacy ownership transfer is part of this trial. The five-cookbook starter list is not the full Sous-Chefs dependency closure.
Updates and recovery #
Application rename #
The application HelmRelease, generated Deployments and Services, ConfigMaps,
runtime Secrets and bootstrap Job use supermarket. The public hostname is
supermarket.ironstone.casa; Zot uses this hostname for its token endpoint and
the matching supermarket token service. The artifact hostname remains
cinc-artifacts.ironstone.casa.
Existing PostgreSQL, bucket and secret-provider identities retain their
cinc-registry names so this rename continues using the existing data.
Flux Kustomization names also remain stable to retain their resource inventories;
their paths now point to kubernetes/apps/dev/supermarket.
The completed trial import is historical and retains its original immutable
template. Do not rerun it; a new import needs a new Job using the current
supermarket ConfigMap and supermarket-runtime Secret.
On rollout, Flux replaces the old application HelmRelease with supermarket.
This can interrupt service while the new Deployments become ready. Zot permits
both old and new pod labels during the transition. Check the new hostname,
token endpoint and artifact download after rollout. A database or bucket rename
requires a separate data migration; do not replace those identifiers in place.
Image updates #
Upstream source watch: main@b2476b7afb3ee628afacb7f4d679950583243ada
Renovate watches the upstream Git ref above and opens a manually reviewed source
notification. It does not change the deployed image from that notification.
Upstream currently publishes only short commit-SHA image tags, with no releases,
ordered version tags or moving main tag. Renovate’s Docker versioning cannot
order commit hashes; switching to gitlab-releases would find no candidates.
The Docker package rule supplies the source URL and groups image digest changes.
The completed import Job is excluded from Renovate.
For each source notification, check the successful default-branch pipeline and
resolve its published tag to a multi-architecture digest with ARM64 support.
Do not assume the branch tip has finished publishing. The current image is
registry.gitlab.com/cinc-project/distribution/cinc-supermarket:b2476b7a@sha256:7988c50e9f56f270a3f12e495fa7b23120b4772129e2ca157e014132e8300cbf,
published by pipeline 3055730506.
For fully automatic image updates, upstream must publish an ordered version or
moving main image tag; a moving tag must still be pinned by digest here.
Refresh the Cinc tag and digest in the HelmRelease and bootstrap Job together.
Update the build identifier in CINC_SM_SYNC_USER_AGENT in the shared ConfigMap.
Rename the bootstrap Job with the new short SHA so migrations run before the upgraded
application. Keep the completed trial Job’s name stable unless a new import is
intentional. The bootstrap Kustomization can replace immutable Jobs; the import
Kustomization deliberately cannot silently replace a completed Job on image edits.
Merge approval is rollout approval: Flux can automatically run provisioning and
migrations after merge. A forced reconciliation is a separate live operation.
Before approving, inspect the source changes and database migrations, then check
the application and bootstrap use the same candidate. The b2476b7a bootstrap
applies migrations before opening the external source catalogue. Keep the
current API and gateway on the same revision so download links use the same
permission protocol.
The bucket provisioner has a resource-level Flux force annotation so an image
update can replace its immutable Job template. Its cinc-registry scope reruns
only the three Cinc bucket identities. Without replacement, a completed Job with
an older image blocks the database, configuration, bootstrap and application
Kustomizations even while the existing application remains healthy.
CNPG uses 10 GiB openebs-hostpath storage per instance, continuous WAL archiving,
and a daily backup with 30-day retention. Zot uses a 1 GiB local PVC for its working
state; OCI payloads reside in RustFS. PostgreSQL backups do not back up the OCI or
artifact buckets. Retain these buckets and the signing pair during recovery.
Do not remove the Flux Kustomizations as a rollback: pruning would remove owned
resources. Suspend the new Kustomizations first and inspect database migrations
before attempting an application image rollback.
Local checks #
kubectl kustomize kubernetes/apps/dev
kubectl kustomize kubernetes/apps/storage
Render both releases with app-template 5.3.0 and validate the output with
kubeconform -strict -summary. Server-side dry-run the rendered workloads and each
app Kustomization against the cluster to validate its installed CRD schemas.
These checks do not prove successful import, backup or artifact delivery; those
require provisioned secrets and the running deployment.
Chart versions and upstream documentation: Helm chart reference.