refactor(tekton): own shared CI policies in platform
This commit is contained in:
1 parent
67356b1489
commit
083eae7f8c
5 files changed
+91
-8
No files matched your search
@@ -87,6 +87,50 @@ service-state/
|
||||
Tekton controllers stay in `tekton-pipelines`. Application PipelineRuns and
|
||||
their credentials run in the isolated `tekton-ci` namespace.
|
||||
|
||||
The `tekton-ci` namespace is shared by all service CI applications. Its
|
||||
ResourceQuota and LimitRange are owned by the `tekton-config` Argo CD Application
|
||||
from `platform/tekton/config/ci-resource-policy.yaml`. Their legacy resource name
|
||||
`lolympus-ci` is retained to transfer ownership without recreating either object;
|
||||
it does not restrict the policies to the lolympus service. The service `ci`
|
||||
AppProject does not permit ResourceQuota or LimitRange resources.
|
||||
|
||||
The shared quota permits at most 15 PipelineRuns, 15 PVCs requesting a total of
|
||||
150 GiB, and 150 TaskRuns. The job-based pruner runs at minute 00, 15, 30, and 45
|
||||
of every hour and retains the newest 10 completed PipelineRuns per namespace,
|
||||
across pipeline names and success/failure outcomes. Running and pending runs are
|
||||
protected and are additional to the retained completed history. Child TaskRuns,
|
||||
Pods, and workspace PVCs follow their owning PipelineRun's deletion; TaskRuns
|
||||
are not pruned independently. If 15 runs accumulate before pruning frees a slot,
|
||||
the quota rejects further PipelineRun creation.
|
||||
|
||||
### Transferring the shared resource policies
|
||||
|
||||
This transfer spans two repositories with independent automatic synchronization.
|
||||
Do not rely on Application sync waves to order commits across the repositories.
|
||||
For an existing cluster where `lolympus-tournament-support-ci` owns the policies:
|
||||
|
||||
1. Wait for active sync operations to finish. Temporarily disable automated sync
|
||||
on `platform-root`, `tekton-config`, and `lolympus-tournament-support-ci`,
|
||||
preserving their existing sync policy for restoration.
|
||||
2. Record the UID and tracking annotation of both existing `lolympus-ci` objects
|
||||
in `tekton-ci`. Add the temporary resource annotation
|
||||
`argocd.argoproj.io/sync-options: Prune=false` to both objects.
|
||||
3. Publish the service-state removal and platform-state adoption commits. Sync
|
||||
`lolympus-tournament-support-ci` to the removal commit first. The protected
|
||||
policies must remain present even though they are no longer desired there.
|
||||
4. Sync `tekton-config` to the adoption commit. Verify both objects retain their
|
||||
UIDs and now have tracking IDs beginning with `tekton-config:`. Verify the
|
||||
quota values and the generated pruner CronJob's schedule and keep arguments.
|
||||
5. Refresh the old Application and confirm it no longer tracks either policy.
|
||||
Remove only the temporary `Prune=false` annotation after adoption succeeds.
|
||||
6. Restore automated sync on the child Applications, then sync `platform-root`
|
||||
to apply the tightened `ci` AppProject permissions and restore its automation.
|
||||
Confirm all three Applications are Synced and Healthy.
|
||||
|
||||
If adoption fails, leave the existing policies protected and avoid syncing the
|
||||
new AppProject restrictions until ownership is resolved. Do not delete and
|
||||
recreate the policies or remove unrelated sync-option annotations.
|
||||
|
||||
## Registering Additional Service CI
|
||||
|
||||
CI directories in `service-state` are registered explicitly; the service
|
||||
|
||||
Reference in new issue
Block a user