Flux Mirror Report
flux mirror sync 명령이 미러 결과의 구조화된 보고서를 내보내는 방법을 다루는 공식 Flux CLI 플러그인 문서예요. --output을 json 또는 yaml로 설정하면 보고서를 받을 수 있어요.
출처: 문서
본문
봉투(envelope) 형태는 report-v1beta1.json의 JSON Schema로 버전 관리되고 문서화돼요.
사용법
flux mirror sync config.yaml -o json
구조화된 출력은 --verbose와 무관하게 항상 모든 항목을 내보내요. 필터링은 다운스트림(jq, yq)에서 처리하면 돼요. 프로세스 종료 코드는 여전히 어떤 태그가 실패했는지 또는 드리프트(drift)됐는지를 반영해요(exit codes 참고).
봉투 (Envelope)
모든 보고서는 최상위 봉투로 감싸져요.
| 키 | 설명 | | apiVersion | Report API 버전. 현재 mirror.plugin.fluxcd.io/v1beta1. | | kind | Report API 종류. 현재 Report. | | $schema | 봉투를 설명하는 JSON Schema의 URL. JSON 전용. | | report.reporter | 생성자(reproducer)의 아이덴티티, 예: flux-mirror/v0.1.0. | | report.timestamp | 실행의 RFC 3339 UTC 타임스탬프. | | report.durationMs | 실행의 총 벽 시계 시간(밀리초). | | report.summary | 모든 항목에 걸친 집계 횟수(아래 참고). | | report.results[] | 구성 항목당 하나씩, 구성 순서대로. |
$schema 키는 JSON 전용이에요. JSON Schema 문서를 가리키며 YAML 소비자에게는 의미가 없으므로 YAML 모드에서는 버려져요.
Summary 필드
모든 필드는 항상 존재해요(사용되지 않으면 0). 그래서 소비자는 안정적인 키 집합을 믿을 수 있어요.
| 키 | 설명 | | entries | 처리된 구성 항목 수. | | copied | 모든 항목에 걸쳐 복사된 총 태그 수. | | overwritten | 덮어쓴 총 태그 수(drift이며 overwrite: true). | | skipped | 건너뛴 총 태그 수(이미 최신이거나 verify.minAge로 지연). | | drifted | 드리프트된 총 태그 수(digest가 다름, overwrite: false). | | wouldCopy | 드라이런 예측: 복사됐을 태그 수. | | wouldOverwrite | 드라이런 예측: 덮어써졌을 태그 수. | | failed | 총 실패 수: 태그 수준 실패 + 플랜 실패 항목. | | exitCode | 의미적 종료 코드: 0 클린, 1 실패, 2 드리프트. --drift-exit-code의 영향을 받지 않아요. |
Result 필드
각 results[] 항목은 하나의 구성 항목(아티팩트 또는 차트 소스)을 설명해요.
| 키 | 설명 | | source | 미러링되는 소스 리포지토리/참조. | | destination | 항목이 미러되는 대상 리포지토리. | | status | 항목 수준 결과: completed 또는 failed. | | error | 플랜 시점 오류 메시지. status가 failed일 때만 존재. | | tags[] | 태그별 결과, 플랜 순서대로(결정적). 비어 있을 수 있음. |
항목 status는 빈 tags 배열을 명확히 구분해줘요.
- completed + [] → 항목은 플랜되고 실행됐지만, 선택자와 일치하는 것이 없었어요.
- failed + [] (+ error) → 항목을 플랜할 수 없었어요(예: 태그 목록 조회 실패).
completed 항목에도 태그 수준 failed 행이 있을 수 있어요. 그것들은 태그별 문제이지 항목 수준 실패가 아니에요.
Tag 필드
| 키 | 설명 | | tag | 태그 이름(아티팩트) 또는 차트 버전(차트). | | status | 태그별 결과 — Status 참고. | | digest | 해석됐을 때의 소스 아티팩트 digest. verify 실패 행에는 없음. | | reason | 건너뛴 태그가 건너뛴 이유 — Reason 참고. skipped에서만 존재. | | error | 오류 메시지. status가 failed일 때만 존재. | | referrers[] | 미러링된 하위 아티팩트(서명, SBOM, 증명). includeReferrers에서만 존재. | | verification | 서명 검증 메타데이터. 서명이 확인됐을 때만 존재(verify: 아래). |
Status 값
| Status | 의미 | | copied | 대상에 없었음; 소스에서 미러됨. | | overwritten | 대상에 다른 digest가 있었음; 교체됨(overwrite: true). | | skipped | 아무것도 복사 안 됨; reason 참고. | | drifted | 대상에 다른 digest가 있음, overwrite: false — 그대로 둠. | | would-copy | 드라이런: 복사됐을 것. | | would-overwrite | 드라이런: 덮어써졌을 것. | | failed | 연산이 오류 났음; error 참고. |
Reason 값
reason은 skipped 상태(태그 또는 referrer)에는 항상 존재하고 그 외에는 없어요.
| Reason | 의미 | | up-to-date | 대상이 이미 같은 digest를 가짐. | | signature-too-new | 유효한 서명이 verify.minAge보다 젊어서 지연됨. |
Referrer 필드
각 referrers[] 항목은 부모 태그와 함께 미러링되는 하나의 referrer(예: cosign 서명 번들, SBOM, 증명)를 설명해요.
| 키 | 설명 | | digest | Referrer 매니페스트 digest. | | artifactType | 설정된 경우 referrer 매니페스트의 artifactType. | | status | 태그와 같은 Status 열거형. | | reason | skipped에서만 존재(같은 Reason). |
Referrer는 미러 흐름이 referrer 단계에 도달한 태그에 대해 보고돼요. failed 상태(태그 복사가 먼저 오류 났음)와 signature-too-new 스킵(미러링 없이 지연)을 제외한 모든 상태가 해당돼요. --dry-run에서는 referrer도 여전히 평가되고 would-copy / would-overwrite / skipped 상태로 보고돼요.
Verification 필드
서명이 확인됐을 때만 존재해요(항목에 verify: 블록이 있을 때). provider만 보장되고 나머지는 최선 노력(best-effort)이에요.
| 키 | 설명 | | provider | 검증 제공자, 예: cosign. | | issuer | 서명 인증서에서 일치한 OIDC issuer. | | identity | 일치한 인증서 아이덴티티(subject alternative name). | | integratedTime | 투명성 로그 통합 시간(RFC 3339). 번들에 Tlog 타임스탬프가 있을 때만 존재. | | age | Go duration 문자열로서의 서명 나이. signature-too-new 스킵에서만 존재. | | minAge | Go duration 문자열로서의 구성된 verify.minAge. signature-too-new 스킵에서만 존재. |
검증 실패(잘못되거나 없는 서명, OIDC 불일치)는 verification 블록이 아니에요. 그것은 verify error를 담은 status: "failed" 태그 행으로 드러나며, verification도 digest도 없어요. 검증은 플랜 시점에 실행되므로 첫 검증 실패가 그 항목을 멈춰요(그 전에 검증된 태그는 여전히 실행됨); 항목 자체는 status: "completed"로 남아요. 실제 verify 실패 행(구성된 OIDC subject 정규식이 서명된 아이덴티티와 일치하지 않음):
{
"tag": "6.13.0",
"status": "failed",
"error": "verify docker.io/stefanprodan/podinfo:6.13.0: signature verification failed: failed to verify certificate identity: no matching CertificateIdentity found, last error: expected SAN value to match regex \"^https://github\\.com/example/.*$\", got \"https://github.com/stefanprodan/podinfo/.github/workflows/release.yml@refs/tags/6.13.0\""
}
예제
cosign 검증(minAge: 48h)과 includeReferrers: true가 있는 구성에 대해 flux mirror sync … -o json을 실행한 보고서예요. 첫 번째 항목은 완료됐어요: 태그 6.13.0은 서명이 minAge보다 젊어 지연됐고, 6.12.0은 cosign 서명 번들과 함께 복사됐어요. 두 번째 항목은 소스 리포지토리가 존재하지 않아 플랜 시점에 실패했어요.
{
"apiVersion": "mirror.plugin.fluxcd.io/v1beta1",
"kind": "Report",
"$schema": "https://raw.githubusercontent.com/fluxcd/flux-mirror/main/docs/report-v1beta1.json",
"report": {
"reporter": "flux-mirror/v0.1.0",
"timestamp": "2026-06-06T20:12:25Z",
"durationMs": 16724,
"summary": {
"entries": 2,
"copied": 1,
"overwritten": 0,
"skipped": 1,
"drifted": 0,
"wouldCopy": 0,
"wouldOverwrite": 0,
"failed": 1,
"exitCode": 1
},
"results": [
{
"source": "docker.io/stefanprodan/podinfo",
"destination": "localhost:5050/podinfo",
"status": "completed",
"tags": [
{
"tag": "6.13.0",
"status": "skipped",
"digest": "sha256:7bdd8cc80b64377b05f5c0a51604c028ed6adea4beaca2e766b9325efa52916c",
"reason": "signature-too-new",
"verification": {
"provider": "cosign",
"issuer": "https://token.actions.githubusercontent.com",
"identity": "https://github.com/stefanprodan/podinfo/.github/workflows/release.yml@refs/tags/6.13.0",
"integratedTime": "2026-06-04T20:59:02Z",
"age": "47h13m11s",
"minAge": "48h0m0s"
}
},
{
"tag": "6.12.0",
"status": "copied",
"digest": "sha256:453e2238f70c00dfba6803ddb99a4bb86982ee549f7273f43f90ac58f0714a81",
"referrers": [
{
"digest": "sha256:5892f840c5013230cd0b63fdd5076dd9fe3224a31bd3ebae5c723e3632100b0f",
"artifactType": "application/vnd.dev.sigstore.bundle.v0.3+json",
"status": "copied"
}
],
"verification": {
"provider": "cosign",
"issuer": "https://token.actions.githubusercontent.com",
"identity": "https://github.com/stefanprodan/podinfo/.github/workflows/release.yml@refs/tags/6.12.0",
"integratedTime": "2026-05-20T10:16:39Z"
}
}
]
},
{
"source": "docker.io/library/flux-mirror-nonexistent-zzz",
"destination": "localhost:5050/nonexistent",
"status": "failed",
"error": "list tags docker.io/library/flux-mirror-nonexistent-zzz: GET https://index.docker.io/v2/library/flux-mirror-nonexistent-zzz/tags/list?n=1000: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/flux-mirror-nonexistent-zzz Type:repository]]",
"tags": []
}
]
}
}