Correct operations monitoring, backup, and upgrade guidance
Summary
Correct the three operations guides identified by #3080 using the current umbrella contract, pinned package charts, and current customer-template layout. Preserve executable administrator examples and distinguish umbrella values, Kubernetes resources, and patch fragments.
Related issue: #3080
Related open MR: !8385. This is a separate draft implementation of the same review findings, with source-grounded justifications and locally rendered examples. Please coordinate the overlapping changes before merging either MR.
Reviewed baseline: 84fe6baa432e14aa9856dc20495534f751dd1469 (current master when the branch was created). Package-path guidance targets the Big Bang 4.0 code on master; the guides distinguish it from older 3.x releases.
Document-by-document justification and code examples
1. docs/operations/monitoring.md
Replace rejected discovery switches with rendered upstream scrape jobs
Why: The original top-level monitoring example fails current schema validation. Moving the same switches below packages.monitoring also fails: the schema does not admit either discovery switch, although the template still references them. The supported passthrough parent is packages.monitoring.values.upstream, backed by the monitoring package's upstream dependency alias.
These reproductions fail on the reviewed baseline:
helm template audit chart --set monitoring.globalServiceEndpointMetrics.enabled=true
# additional properties 'monitoring' not allowed
helm template audit chart \
--set packages.monitoring.globalServiceEndpointMetrics.enabled=true \
--set packages.monitoring.globalPodEndpointMetrics.enabled=true
# additional properties 'globalServiceEndpointMetrics', 'globalPodEndpointMetrics' not allowedThe replacement retains annotation discovery through explicit jobs. The guide includes the complete Service and Pod jobs; this excerpt shows the configuration layer and port-selection behavior:
packages:
monitoring:
values:
upstream:
prometheus:
prometheusSpec:
additionalScrapeConfigs:
- job_name: annotated-services
kubernetes_sd_configs:
- role: endpointslice
namespaces:
names: [my-application]
relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
action: keep
regex: "true"
- source_labels: [__meta_kubernetes_endpointslice_port_name]
action: keep
regex: metricsEvidence: umbrella discovery template, umbrella schema, monitoring 91.4.1-bb.2 dependency alias, and upstream 91.4.1 EndpointSlice RBAC.
Make protocol, port selection, and Pod placement explicit
Why: The old generated Service job defaults to HTTPS, while its example never identifies a scheme. Its annotation-port rewrite accepts digits, despite the prose permitting named annotation ports. The replacement uses the discovered port named metrics, explicitly shows HTTP annotations, and explains that prometheus.io/port is not consumed by these jobs. Namespace scoping and named-port selection avoid unintentionally scraping every annotated namespace or every application port. The Pod example now shows the actual Deployment nesting.
# Service fragment: actual port configuration, not a named prometheus.io/port annotation.
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/scheme: "http"
prometheus.io/path: "/metrics"
spec:
ports:
- name: metrics
port: 8080
targetPort: metricsThe guide retains TLS/mesh and network-policy prerequisites, explains avoiding duplicate Service/Pod/monitor scraping, and updates troubleshooting to the actual job names with read-only discovery commands:
kubectl get services,pods -n my-application
kubectl get endpointslices -n my-application -l kubernetes.io/service-name=my-applicationExplain list replacement and link the pinned upstream configuration
Why: A user-supplied upstream.prometheus.prometheusSpec.additionalScrapeConfigs list replaces the default list at that path. The umbrella's legacy list-merge helper examines a different, flat prometheus path. Users must retain existing jobs such as Vault's rather than assume this is additive. This behavior was verified by rendering with Vault enabled. A version-pinned upstream link supplies the full configuration reference without duplicating its values catalog.
# Result of applying the documented example, including when Vault is enabled:
additionalScrapeConfigs:
- job_name: annotated-services
# ... full job in the guide
- job_name: annotated-pods
# ... full job in the guide
# Retain any required existing jobs in this same list.2. docs/operations/backup-restore.md
Correct Toolbox nesting and preserve runnable persistence/CronJob examples
Why: GitLab 10.4.2-bb.1 aliases the upstream chart as upstream. The original packages.gitlab.values.gitlab.toolbox settings never configure that subchart. This also addresses the concrete Toolbox-path problem reported in the issue discussion. The global bucket settings remain at the parent global scope, where Helm propagates them to dependencies.
packages:
gitlab:
values:
global:
appConfig:
backups:
bucket: BUCKET_NAME
tmpBucket: TMP_BUCKET_NAME
upstream:
gitlab:
toolbox:
persistence:
enabled: true
size: 100Gi
backups:
cron:
enabled: true
schedule: "0 2 * * *"
persistence:
enabled: true
size: 200GiThe guide uses explicit BUCKET_NAME and TMP_BUCKET_NAME placeholders so readers know to supply their own existing buckets. It links the maintained external-service/Rails-secret setup and treats capacity as installation-specific. It removes arbitrary fixed CPU/memory limits from the old backup example while retaining the operational storage and scheduling examples. It links Toolbox's version-pinned values for additional tuning.
Evidence: GitLab 10.4.2-bb.1 dependency alias, umbrella GitLab values wiring, and maintained production considerations.
Stop labeling a component-excluding backup as complete
Why: The original command excluded registry data, LFS, artifacts, packages, and uploads without identifying a separate recovery source. It also retained stale component names. The main example now creates an application backup without exclusions; a separately labeled partial-backup example demonstrates the upstream-supported repeated --skip form. The text distinguishes an application archive from GitOps or full-cluster recovery, preserves Rails-secret requirements, and adds Job/log/archive verification.
# Application backup without explicit exclusions.
kubectl exec -it TOOLBOX_POD -n gitlab -- backup-utility
# Explicit partial backup; excluded data needs separate protection.
kubectl exec -it TOOLBOX_POD -n gitlab -- backup-utility --skip lfs --skip artifacts
kubectl get cronjobs,jobs -n gitlab
kubectl logs -n gitlab job/BACKUP_JOBFix archive discovery, naming, and supported restore inputs
Why: The old AWS command ended with --output and no argument, assumed a default bucket name, and described the archive as TIMESTAMP_VALUE.tar. The utility creates <backup-id>_gitlab_backup.tar. Its -f URL detection supports HTTP(S), FTP, and file URLs, not s3://. The configured object-storage bucket is selected through -t BACKUP_ID instead.
aws s3api list-objects-v2 --bucket BUCKET_NAME \
--query 'reverse(sort_by(Contents[?ends_with(Key, `_gitlab_backup.tar`)], &LastModified))[0].Key' \
--output json
kubectl exec -it TOOLBOX_POD -n gitlab -- backup-utility --restore -t BACKUP_ID
# Alternative: a downloaded archive, copied into Toolbox.
kubectl cp ./BACKUP_ID_gitlab_backup.tar gitlab/TOOLBOX_POD:/tmp/restore_gitlab_backup.tar
kubectl exec -it TOOLBOX_POD -n gitlab -- backup-utility --restore -f file:///tmp/restore_gitlab_backup.tarJSON output is intentional: AWS applies the query to the combined paginated results, whereas text output can apply a query per page. The query filters out unrelated bucket objects before selecting the newest archive.
Evidence: pinned GitLab v19.4.2 backup-utility implementation, especially usage, is_url, fetch_remote_backup, and get_backup_name.
Restore database-client shutdown, reconciliation coordination, and verification
Why: Upstream restoration requires stopping database clients to prevent interference. The old page only restarted consumers after replacing a Rails Secret and then immediately ran the restore. The new sequence records replicas and reconciliation state, suspends the owning Flux hierarchy, accounts for autoscalers, stops database clients, restores data, then restores the recorded state. Label selectors replace the hard-coded Sidekiq deployment name. The guide also requires matching GitLab version/edition and post-restore application checks.
flux suspend kustomization OWNER_KUSTOMIZATION -n OWNER_NAMESPACE
flux suspend helmrelease bigbang -n bigbang
flux suspend helmrelease gitlab -n bigbang
kubectl get deployments -n gitlab -l 'release=gitlab,app in (sidekiq,webservice,prometheus)' \
-o custom-columns='NAME:.metadata.name,REPLICAS:.spec.replicas'
kubectl scale deployment -n gitlab -l 'release=gitlab,app in (sidekiq,webservice,prometheus)' --replicas=0
# After restoring: repeat for each deployment using its recorded count.
kubectl scale deployment DEPLOYMENT_NAME -n gitlab --replicas=RECORDED_COUNT
# Resume only resources that were running before maintenance.
flux resume helmrelease gitlab -n bigbang
flux resume helmrelease bigbang -n bigbang
flux resume kustomization OWNER_KUSTOMIZATION -n OWNER_NAMESPACEEvidence: upstream restore procedure. These commands are documentation examples, not commands executed during validation.
3. docs/operations/upgrades.md
Use the current package contract and an explicit 4.0 migration step
Why: The original Git/Helm examples use top-level istiod, which current master rejects. Both examples now use packages.istiod, use clearly marked version placeholders rather than obsolete release numbers, and link the migration guide. The migration command includes the required --target 4 and the guide explains values-source precedence and the 3.x/4.x boundary. A package-compatibility reminder accounts for coordinated dependencies such as Istio.
packages:
istiod:
sourceType: helmRepo
helmRepo:
repoName: registry1
chartName: istiod
tag: PACKAGE_VERSIONscripts/migrate-values-3-to-4.sh --target 4 --output values-4.x.yaml values.yamlEvidence: current package defaults and migration guide.
Match customer-template paths and distinguish the two upgrade strategies
Why: The customer template has gitRepo/ and helmRepo/ trees. Its Git strategy uses raw values files consumed by ConfigMap generators; its Helm strategy embeds values in data.values.yaml. Root-level base/dev links and the old base/values.yaml reference were misleading. Git strategy upgrades change a remote base or GitRepository ref; Helm strategy upgrades change the HelmRelease chart version.
# Git strategy: resource-list fragment in gitRepo/base/kustomization.yaml.
resources:
- https://repo1.dso.mil/big-bang/bigbang.git//base?ref=BIG_BANG_VERSION
- flux-components.yamlThe Helm base's replacement synchronizes the controller Git source from its HelmRelease version. Environment patches run above that base, so the guide shows both version patches and instructs users to retain the existing values-source patches:
patches:
- target:
kind: HelmRelease
name: bigbang
patch: |-
- op: replace
path: /spec/chart/spec/version
value: "BIG_BANG_VERSION"
- target:
kind: GitRepository
name: bigbang
patch: |-
- op: replace
path: /spec/ref/tag
value: "BIG_BANG_VERSION"Evidence: Customer template reviewed at 13da6beaa94fb365921695753ef29f9334be1342: Git base, Helm base replacement, and Helm environment overlay.
Verify the intended revision and actual workload images
Why: A Ready resource can still be on the previous revision. The old k alias is not universally configured, and the first image found in istio-system does not establish the versions of workload sidecars. The new commands inspect Flux releases/sources/Kustomizations and named workload containers. The prose distinguishes Ready Pods from merely Running Pods, sidecars from ambient components, and image versions from chart versions. Existing staging, release-note, usability, and troubleshooting guidance is retained.
flux get helmreleases -A
flux get sources all -A
flux get kustomizations -A
kubectl get pods -A
kubectl get pod POD_NAME -n NAMESPACE \
-o jsonpath='{range .spec.containers[*]}{.name}{"\t"}{.image}{"\n"}{end}'4. docs/configuration/base-config.md — generated reference refresh after rebase
Why: Rebasing onto origin/master at 2ddadb29f brought in new package pins and the ambient-by-default setting, but the generated reference on that base was stale. The pre-push hook rejected the push. Regenerated this file with the required helm-docs v1.14.2; the 13 changed rows synchronize the documented defaults and package pins with the existing chart inputs.
Example of the source defaults now reflected in the generated table:
istio:
ambient:
enabled: true
packages:
monitoring:
git:
tag: 92.13.1-bb.0
gitlab:
git:
tag: 10.5.1-bb.0Generation and verification:
scripts/generate-values-reference.sh --write
scripts/generate-values-reference.sh --check
git diff --checkThe retry passed the generated-reference check and all 211 pre-push shell tests. Earlier package-render validation below records the original reviewed baseline and package versions; those renders were not repeated as part of this rebase.
Validation
Passed locally:
git diff --check.helm lint ./chart.- Parsed all YAML fences with PyYAML and all shell fences with
bash -n, using a Markdown parser to extract the examples. - Rendered the documented umbrella values with normal schema validation, then rendered the resulting
common→defaults→overlaysvalues against the complete, vendored package charts fetched at monitoring 91.4.1-bb.2 and GitLab 10.4.2-bb.1.- Monitoring: ordinary/sidecar and ambient overlays; decoded scrape-config Secret contains both exact documented jobs; the Prometheus resource references that Secret; EndpointSlice RBAC exists.
- Monitoring with Vault enabled: verified the documented upstream list-replacement behavior.
- GitLab: manual Toolbox PVC is 100Gi, backup-job PVC is 200Gi, CronJob schedule is
0 2 * * *, backup arguments contain no--skip, and both configured backup buckets reach the rendered configuration. External-service prerequisites came from the existing GitLab production-considerations example with placeholder credentials. - Istiod Git and Helm source examples: substituted pinned
1.31.3-bb.0forPACKAGE_VERSIONand asserted the GitRepository ref / HelmRelease chart version.
- Built focused local Kustomize fixtures using the actual customer-template HelmRelease, GitRepository, base replacement, and environment patches at the commit above. Both target versions became
4.0.0, existing environmentvaluesFromsurvived, and the Git strategy's ref replacement rendered correctly. Unrelated encrypted credentials and registry resources were omitted from these fixtures. - Ran the documented migration command against a temporary plaintext values fixture and asserted the resulting
packages.istiod.git.tag. - Evaluated the AWS JMESPath query against sample old/new backup objects plus a newer unrelated object; it selected the newest backup archive.
- Checked all 15 document links, including local links, using:
npx --yes markdown-link-check@3.14.2 --config .markdown-link-check.json \
docs/operations/monitoring.md \
docs/operations/backup-restore.md \
docs/operations/upgrades.mdValidation used temporary artifacts outside the repository. No live cluster mutation, backup, restore, or upgrade was performed. Full runtime recovery and scrape connectivity remain environment-specific validation; the external documentation CI jobs provide the repository merge gate.
Upgrade Notices
N/A — documentation-only correction. The guides explain the existing Big Bang 4.0 values contract and supported package configuration paths; this MR does not introduce a runtime behavior change.