OCPCLOUD-3429: Mount provider images with image volumes#527
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@mdbooth: This pull request references OCPCLOUD-3429 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.0.0" version, but no target version was set. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis PR replaces JSON-based provider image discovery with directory-based scanning. Remote container image fetching logic (including pull secrets, registry mirrors, and trusted CAs) is removed. The operator now mounts provider-specific image directories via Pod volume bindings and scans on-disk manifests instead of extracting remote layers. Changes
Sequence DiagramsequenceDiagram
actor Operator as capi-operator Pod
participant KubeAPI as Kubernetes API
participant Pod as Pod Spec Reader
participant FS as Filesystem<br/>(Provider Images Dir)
Operator->>KubeAPI: Fetch own Pod spec
KubeAPI-->>Operator: Pod manifest
Operator->>Pod: BuildImageRefMapFromPod(podName, namespace)
Pod->>Pod: Extract volume.source.image → imageRef<br/>Extract volume.mountPath basename → key
Pod-->>Operator: imageRefMap (key→imageRef)
Operator->>FS: ScanProviderImages(providerImageDir, imageRefMap)
FS->>FS: Iterate provider subdirectories
FS->>FS: For each provider: load metadata.yaml + manifests.yaml
FS->>FS: Validate profiles via discoverProfiles
FS-->>Operator: []ProviderImageManifests<br/>(ManifestsPath points to on-disk file)
Operator->>Operator: Load & register provider controllers
Note over Operator: Use imageRef + profile names<br/>for logging & organization
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 10 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
/pipeline auto |
|
Pipeline controller notification The |
|
Scheduling tests matching the |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
go.mod (1)
1-413:⚠️ Potential issue | 🔴 CriticalRemove remaining go-containerregistry import from manifests-gen/customizations.go.
The attempted removal of container registry dependencies is incomplete. While most Docker and container registry packages were successfully removed (docker/cli, containerd, docker/distribution, opencontainers/image-spec show no imports),
manifests-gen/customizations.gostill importsgithub.com/google/go-containerregistry/pkg/nameat line 8. Either this import must be removed and the code refactored to work with the new filesystem-based image approach, or go-containerregistry needs to remain as an explicit dependency in go.mod.The indirect container-related dependencies (
github.com/distribution/referenceandgithub.com/opencontainers/go-digest) are legitimately required by other dependencies (kubernetes, cluster-api, and various CAPI providers) and do not represent unused container registry functionality.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@go.mod` around lines 1 - 413, manifests-gen/customizations.go still imports github.com/google/go-containerregistry/pkg/name; remove that import and refactor any usages (e.g., name.ParseReference, name.Reference, name.Tag, name.Digest) to use the new filesystem-based image approach or plain string parsing/standard library helpers, or if you intend to keep go-containerregistry, add it explicitly to go.mod; after changes run gofmt and go mod tidy to drop the dependency if unused.
🧹 Nitpick comments (1)
pkg/providerimages/providerimages.go (1)
106-140: Consider including init containers in volume mount discovery.The function only iterates over
pod.Spec.Containersbut notpod.Spec.InitContainers. While the current deployment doesn't use init containers with image volume mounts, future changes could add them and the mapping would be incomplete.♻️ Optional: Include init containers
// Correlate volume mounts with image references imageRefMap := make(map[string]string) + // Collect volume mounts from all containers + allContainers := append(pod.Spec.InitContainers, pod.Spec.Containers...) - for i := range pod.Spec.Containers { - c := &pod.Spec.Containers[i] + for i := range allContainers { + c := &allContainers[i] for j := range c.VolumeMounts {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/providerimages/providerimages.go` around lines 106 - 140, BuildImageRefMapFromPod currently only iterates pod.Spec.Containers when correlating VolumeMounts to volumeImageRefs, so mounts from init containers are missed; update the function to also iterate pod.Spec.InitContainers (same volume mount handling as for pod.Spec.Containers) so that init container VolumeMounts contribute to imageRefMap, keeping the existing logic that uses filepath.Base(vm.MountPath) and volumeImageRefs to populate imageRefMap.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@go.mod`:
- Around line 1-413: manifests-gen/customizations.go still imports
github.com/google/go-containerregistry/pkg/name; remove that import and refactor
any usages (e.g., name.ParseReference, name.Reference, name.Tag, name.Digest) to
use the new filesystem-based image approach or plain string parsing/standard
library helpers, or if you intend to keep go-containerregistry, add it
explicitly to go.mod; after changes run gofmt and go mod tidy to drop the
dependency if unused.
---
Nitpick comments:
In `@pkg/providerimages/providerimages.go`:
- Around line 106-140: BuildImageRefMapFromPod currently only iterates
pod.Spec.Containers when correlating VolumeMounts to volumeImageRefs, so mounts
from init containers are missed; update the function to also iterate
pod.Spec.InitContainers (same volume mount handling as for pod.Spec.Containers)
so that init container VolumeMounts contribute to imageRefMap, keeping the
existing logic that uses filepath.Base(vm.MountPath) and volumeImageRefs to
populate imageRefMap.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 51e0f395-ceb8-4b01-bc5d-495be656053e
⛔ Files ignored due to path filters (231)
go.sumis excluded by!**/*.sumvendor/github.com/containerd/stargz-snapshotter/estargz/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/build.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/AUTHORSis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/NOTICEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file_unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/credentials.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/file_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/native_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/memorystore/store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/types/authconfig.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/client/client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/client/command.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/credentials.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/error.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/helper.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/version.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/and/and_closer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/compression/compression.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/estargz/estargz.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/gzip/zip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/redact/redact.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/retry/retry.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/retry/wait/kubernetes_apimachinery_wait.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/verify/verify.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/zstd/zstd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/anon.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/auth.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/authn.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/basic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/bearer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/keychain.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/multikeychain.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/compression/compression.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/logs/logs.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/hash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/manifest.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/match/match.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/rebase.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/compressed.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/uncompressed.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/with.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/platform.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/progress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/catalog.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/check.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/descriptor.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/fetcher.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/list.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/mount.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/multi_write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/progress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/puller.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/schema1.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/basic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/error.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/logger.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/ping.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/retry.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/schemer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/scope.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/transport.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/useragent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/stream/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/stream/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/types/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/zz_deepcopy_generated.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.gitattributesis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.goreleaser.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/compressible.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bytereader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/compress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/decompress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/fse.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/gen.shis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/compress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/huff0.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/le.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/unsafe_enabled.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/decode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/decode_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/encode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/encode_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/snappy.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/s2sx.modis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/s2sx.sumis excluded by!**/*.sum,!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blockdec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blockenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blocktype_string.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bytebuf.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bytereader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decodeheader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decoder_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/dict.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_base.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_best.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_better.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_dfast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_fast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/encoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/encoder_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/framedec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/frameenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_encoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_predefined.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/hash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/history.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txtis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/simple_go124.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/snappy.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/zip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/zstd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/version.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/versioned.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/common.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/format.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/reader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/strconv.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/writer.gois excluded by!**/vendor/**,!vendor/**vendor/modules.txtis excluded by!**/vendor/**,!vendor/**
📒 Files selected for processing (18)
cmd/capi-operator/main.godev-images.jsongo.modmanifests/0000_30_cluster-api-installer_00_tombstones.yamlmanifests/0000_30_cluster-api-installer_04_images.configmap.yamlmanifests/0000_30_cluster-api-installer_05_deployment.yamlmanifests/0000_30_cluster-api_11_deployment.yamlpkg/controllers/revision/revision_controller_test.gopkg/controllers/revision/suite_test.gopkg/providerimages/mirrors.gopkg/providerimages/mirrors_test.gopkg/providerimages/providerimages.gopkg/providerimages/providerimages_test.gopkg/providerimages/pullsecret.gopkg/providerimages/trustedca.gopkg/providerimages/trustedca_test.gopkg/test/provider_fixtures.gopkg/util/readconfig.go
💤 Files with no reviewable changes (9)
- dev-images.json
- pkg/util/readconfig.go
- pkg/providerimages/trustedca_test.go
- manifests/0000_30_cluster-api_11_deployment.yaml
- pkg/providerimages/mirrors.go
- manifests/0000_30_cluster-api-installer_04_images.configmap.yaml
- pkg/providerimages/trustedca.go
- pkg/providerimages/mirrors_test.go
- pkg/providerimages/pullsecret.go
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
pkg/providerimages/providerimages_test.go (1)
61-333: Add explicit unit tests forBuildImageRefMapFromPodedge cases.The new pod-spec correlation function lacks dedicated unit tests. Add coverage for multiple containers mounting the same volume (verify behavior when overwrites occur), conflicting mount path basenames (where different volumes extract the same basename), and non-image volumes (confirm they are properly skipped).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/providerimages/providerimages_test.go` around lines 61 - 333, Add unit tests covering BuildImageRefMapFromPod edge cases: create new test functions (e.g., Test_BuildImageRefMapFromPod_MultipleContainers, Test_BuildImageRefMapFromPod_ConflictingBasenames, Test_BuildImageRefMapFromPod_NonImageVolumes) that construct Pod specs and call BuildImageRefMapFromPod to assert expected behavior—verify that when multiple containers mount the same volume the last write/overwrite behavior is asserted, when different volumes resolve to the same mount-path basename the conflict is detected/handled as expected, and that volumes which are not image-type (or lack the expected annotation/field) are skipped; use table-driven cases and Gomega assertions similar to existing tests for ScanProviderImages and reference the BuildImageRefMapFromPod symbol to locate the implementation to test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@manifests/0000_30_cluster-api-installer_05_deployment.yaml`:
- Around line 131-170: The volume image references under the names provider-aws,
provider-azure, provider-baremetal, provider-cluster-capi-controllers,
provider-cluster-capi-operator, provider-gcp, provider-ibmcloud,
provider-openstack, provider-openstack-resource-controller, and provider-vsphere
must be converted from tag-based pullspecs (e.g.,
registry.ci.openshift.org/openshift:aws-cluster-api-controllers) to
digest-resolved pullspecs; replace each volumes[].image.reference value with the
exact digest form
(registry.ci.openshift.org/openshift/<image-name>@sha256:<digest>) that matches
the image used by the payload/container images (or the image-references file),
preserving pullPolicy, so the deployment uses immutable, reproducible images.
In `@pkg/providerimages/providerimages.go`:
- Around line 82-84: The loop in providerimages.go currently ignores directories
that yield errNoCapiManifests by continuing, which hides missing/malformed
provider content; change the behavior so that when errors.Is(err,
errNoCapiManifests) is true you fail fast: return or propagate a wrapped error
(including the provider identifier/path and context) from the enclosing function
instead of continuing, or at minimum log an explicit error with the provider and
return a non-nil error; update the handling around the symbol errNoCapiManifests
and the surrounding function that iterates provider dirs to propagate the
failure to the caller so the operator cannot start silently with missing
providers.
---
Nitpick comments:
In `@pkg/providerimages/providerimages_test.go`:
- Around line 61-333: Add unit tests covering BuildImageRefMapFromPod edge
cases: create new test functions (e.g.,
Test_BuildImageRefMapFromPod_MultipleContainers,
Test_BuildImageRefMapFromPod_ConflictingBasenames,
Test_BuildImageRefMapFromPod_NonImageVolumes) that construct Pod specs and call
BuildImageRefMapFromPod to assert expected behavior—verify that when multiple
containers mount the same volume the last write/overwrite behavior is asserted,
when different volumes resolve to the same mount-path basename the conflict is
detected/handled as expected, and that volumes which are not image-type (or lack
the expected annotation/field) are skipped; use table-driven cases and Gomega
assertions similar to existing tests for ScanProviderImages and reference the
BuildImageRefMapFromPod symbol to locate the implementation to test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 98eb7cbc-f5b1-4d62-9b1f-7a7251f0a8c5
⛔ Files ignored due to path filters (231)
go.sumis excluded by!**/*.sumvendor/github.com/containerd/stargz-snapshotter/estargz/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/build.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/AUTHORSis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/NOTICEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file_unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/credentials.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/file_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/native_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/memorystore/store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/types/authconfig.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/client/client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/client/command.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/credentials.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/error.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/helper.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/version.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/and/and_closer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/compression/compression.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/estargz/estargz.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/gzip/zip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/redact/redact.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/retry/retry.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/retry/wait/kubernetes_apimachinery_wait.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/verify/verify.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/zstd/zstd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/anon.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/auth.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/authn.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/basic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/bearer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/keychain.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/multikeychain.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/compression/compression.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/logs/logs.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/hash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/manifest.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/match/match.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/rebase.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/compressed.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/uncompressed.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/with.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/platform.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/progress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/catalog.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/check.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/descriptor.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/fetcher.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/list.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/mount.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/multi_write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/progress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/puller.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/schema1.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/basic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/error.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/logger.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/ping.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/retry.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/schemer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/scope.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/transport.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/useragent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/stream/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/stream/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/types/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/zz_deepcopy_generated.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.gitattributesis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.goreleaser.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/compressible.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bytereader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/compress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/decompress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/fse.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/gen.shis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/compress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/huff0.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/le.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/unsafe_enabled.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/decode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/decode_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/encode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/encode_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/snappy.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/s2sx.modis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/s2sx.sumis excluded by!**/*.sum,!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blockdec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blockenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blocktype_string.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bytebuf.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bytereader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decodeheader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decoder_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/dict.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_base.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_best.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_better.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_dfast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_fast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/encoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/encoder_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/framedec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/frameenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_encoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_predefined.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/hash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/history.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txtis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/simple_go124.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/snappy.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/zip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/zstd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/version.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/versioned.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/common.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/format.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/reader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/strconv.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/writer.gois excluded by!**/vendor/**,!vendor/**vendor/modules.txtis excluded by!**/vendor/**,!vendor/**
📒 Files selected for processing (18)
cmd/capi-operator/main.godev-images.jsongo.modmanifests/0000_30_cluster-api-installer_00_tombstones.yamlmanifests/0000_30_cluster-api-installer_04_images.configmap.yamlmanifests/0000_30_cluster-api-installer_05_deployment.yamlmanifests/0000_30_cluster-api_11_deployment.yamlpkg/controllers/revision/revision_controller_test.gopkg/controllers/revision/suite_test.gopkg/providerimages/mirrors.gopkg/providerimages/mirrors_test.gopkg/providerimages/providerimages.gopkg/providerimages/providerimages_test.gopkg/providerimages/pullsecret.gopkg/providerimages/trustedca.gopkg/providerimages/trustedca_test.gopkg/test/provider_fixtures.gopkg/util/readconfig.go
💤 Files with no reviewable changes (9)
- dev-images.json
- manifests/0000_30_cluster-api_11_deployment.yaml
- pkg/util/readconfig.go
- manifests/0000_30_cluster-api-installer_04_images.configmap.yaml
- pkg/providerimages/trustedca_test.go
- pkg/providerimages/trustedca.go
- pkg/providerimages/mirrors_test.go
- pkg/providerimages/pullsecret.go
- pkg/providerimages/mirrors.go
✅ Files skipped from review due to trivial changes (4)
- pkg/test/provider_fixtures.go
- pkg/controllers/revision/revision_controller_test.go
- go.mod
- manifests/0000_30_cluster-api-installer_00_tombstones.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- pkg/controllers/revision/suite_test.go
|
Scheduling tests matching the |
| subPath: capi-operator-manifests | ||
| readOnly: true | ||
| - name: provider-vsphere | ||
| mountPath: /var/lib/provider-images/vsphere-cluster-api-controllers |
There was a problem hiding this comment.
we're missing nutanix (which hasn't merged yet so fair) but would be good to get in here
There was a problem hiding this comment.
We were also missing CAPIO itself 😬 (fixed)
We could add nutanix in advance, I think. I think it will safely skip providers with no profiles. But what if they have no /capi-operator-manifests at all 🤔 Lets do that as a follow-up. We should do it in advance of nutanix support, though, so it can be presubmit testing.
There was a problem hiding this comment.
Nutanix has /capi-operator-manifests, we were just blocked on getting images.json merged: openshift/cluster-api-provider-nutanix#8
There was a problem hiding this comment.
But what if they have no /capi-operator-manifests at all 🤔
Can we test this? Before merge?
| secretName: capi-operator-metrics-tls | ||
| - name: provider-aws | ||
| image: | ||
| reference: registry.ci.openshift.org/openshift:aws-cluster-api-controllers |
There was a problem hiding this comment.
these get rewritten during our build pipeline for images.json - they end up as proxy.<openshift.foo.xyz> - does art / our current tooling support this?
e.g
I0218 22:02:55.023990 1 providerimages.go:153] "looking for provider manifests in container images"
I0218 22:03:13.503377 1 providerimages.go:187] "no provider manifests found in container image" image="quay-proxy.ci.openshift.org/openshift/ci@sha256:1e05ca1e5022213b7132adbfcd82bbd59dd8d95f7d5ac218476ca1c994b7bc7a"
I0218 22:03:13.504383 1 providerimages.go:190] "found provider manifests in container image" image="quay-proxy.ci.openshift.org/openshift/ci@sha256:9ff1850446c0d9b0b0f953a201d2e256b7743d1a4e7e432aa08fcf33f08e14b4" provider="cluster-api" type="core" version="v1.11.3" profile="default" ocpPlatform=""
I0218 22:03:13.504474 1 providerimages.go:187] "no provider manifests found in container image" image="quay-proxy.ci.openshift.org/openshift/ci@sha256:7a3d9c5faf3957c939cc516bedb7cd3976070572f6db56a0b7546d602b72eced"
I0218 22:03:13.504514 1 providerimages.go:187] "no provider manifests found in container image" image="quay-proxy.ci.openshift.org/openshift/ci@sha256:8fabc3998b621982e6b766e7c1ae2f444368182db333c9dffdb8b39669f80499"
I0218 22:03:13.504548 1 providerimages.go:187] "no provider manifests found in container image" image="quay-proxy.ci.openshift.org/openshift/ci@sha256:39d9078721e3a6bc02988500467d95f29423dc0e7cb534858f95d9547aa98ada"
I0218 22:03:13.504580 1 providerimages.go:187] "no provider manifests found in container image" image="quay-proxy.ci.openshift.org/openshift/ci@sha256:de70a5dedd4ce36ab094cf66094a792685639401fa37f185f7472273d2dcc63c"
I0218 22:03:13.504612 1 providerimages.go:187] "no provider manifests found in container image" image="quay-proxy.ci.openshift.org/openshift/ci@sha256:b737e0cf2f1174f28af611949013c2a469118c2bd70640f6943788889cdd8ce5"
I0218 22:03:13.504644 1 providerimages.go:187] "no provider manifests found in container image" image="quay-proxy.ci.openshift.org/openshift/ci@sha256:c444fd9abb154d315e222e4c3198eac1c71f534f4e940c020e843b237ce1dc34"
I0218 22:03:13.504678 1 providerimages.go:190] "found provider manifests in container image" image="registry.build02.ci.openshift.org/ci-op-rls11vd9/stable@sha256:68b30416795bf3e544dc240607585047779b95d0c036c2e4b58a287e8ee42bce" provider="cluster-api-provider-gcp" type="infrastructure" version="v1.11.0" profile="default" ocpPlatform="GCP"
I0218 22:03:13.504723 1 providerimages.go:187] "no provider manifests found in container image" image="quay-proxy.ci.openshift.org/openshift/ci@sha256:36365a6d0cccb4f5e48fe832ae15de32e2f5b1099e21acbf33e08f8fd8e4871f"
I0218 22:03:13.504764 1 providerimages.go:202] "finished looking for provider manifests in container images"
If it's working - it probably does, but I'd be curious as to what this looks like on a cluster that's live / where that rewriting happens.
There was a problem hiding this comment.
ah - I think code rabbit already called this out?
There was a problem hiding this comment.
these get rewritten during our build pipeline for
images.json- they end up as proxy.<openshift.foo.xyz> - does art / our current tooling support this?
Yeah. The tooling is fortunately very dumb: it's a straight string substitution on the yamls. images.yaml was substituted using the same mechanism in the same place.
| ) | ||
|
|
||
| mirrors, skippedWildcards, err := getImageRegistryMirrors(ctx, k8sClient) | ||
| // ScanProviderImages scans providerImageDir for subdirectories containing |
There was a problem hiding this comment.
there's no logging in any of this - which will make debugging a PITA. The old flow had pretty good logs to help understand where problem may lie. Can we add some logging back?
There was a problem hiding this comment.
I can add some logging.
There was a problem hiding this comment.
Did this get missed? I'm not seeing logging in this file still.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/providerimages/providerimages.go (1)
196-212:⚠️ Potential issue | 🟠 MajorDon't treat
os.Statfailures as "not a profile".If either
os.Statreturns something other thanos.ErrNotExist—for exampleEACCESor a mount/I/O error—this code currently collapses that intometadataExists/manifestsExists == false. When both stats fail, the directory is skipped as if it were not a profile at all. That can hide broken image-volume mounts and start the operator with providers silently omitted. Propagate non-NotExisterrors before the existence checks.Suggested fix
metadataInfo, metadataErr := os.Stat(metadataPath) manifestsInfo, manifestsErr := os.Stat(manifestsPath) + + if metadataErr != nil && !errors.Is(metadataErr, os.ErrNotExist) { + return nil, false, fmt.Errorf("failed to stat metadata for profile %s: %w", profileName, metadataErr) + } + + if manifestsErr != nil && !errors.Is(manifestsErr, os.ErrNotExist) { + return nil, false, fmt.Errorf("failed to stat manifests for profile %s: %w", profileName, manifestsErr) + } metadataExists := metadataErr == nil && !metadataInfo.IsDir() manifestsExists := manifestsErr == nil && !manifestsInfo.IsDir()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/providerimages/providerimages.go` around lines 196 - 212, The code treats any os.Stat error as "missing", which hides real errors; change the logic in the provider image discovery (around metadataInfo/metadataErr and manifestsInfo/manifestsErr handling) to first check metadataErr and manifestsErr: if either error is non-nil and not os.ErrNotExist, return that error (wrapped with context like "profile %s") instead of converting it to metadataExists/manifestsExists false; only treat os.ErrNotExist as absence and then use metadataExists/manifestsExists to decide returning nil or the errMissingMetadata/errMissingManifests errors.
🧹 Nitpick comments (1)
pkg/providerimages/providerimages_test.go (1)
61-333: Add direct coverage forBuildImageRefMapFromPod.This suite exercises the directory scan well, but the new runtime path also depends on correlating Pod
volumes[].image.referencewithvolumeMounts[].mountPath. A small fake-client test forBuildImageRefMapFromPodwould help lock down the cases most likely to regress here: multiple containers, non-image volumes, and mounts whose basename does not match the scanned provider directory.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/providerimages/providerimages_test.go` around lines 61 - 333, Add a focused unit test for BuildImageRefMapFromPod in providerimages_test.go that constructs a Pod with multiple containers and a mix of image-backed volumes and non-image volumes and volumeMounts whose mountPath basenames both match and do not match provider directory names; call BuildImageRefMapFromPod(pod) and assert the returned map contains the expected image references for mounts whose basename matches and omits or ignores non-image volumes and mismatched basenames, covering multiple containers and duplicate mounts to ensure dedup behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@cmd/capi-operator/main.go`:
- Around line 172-184: The code currently silently continues with a nil
imageRefMap when pod identity env vars are missing; change it to fail fast
unless the explicit local override is provided: after reading
podName/podNamespace and before calling providerimages.ScanProviderImages, add a
check that if podName=="" || podNamespace=="" then verify providerImageDir is
set (the explicit override); if providerImageDir is empty return an error (e.g.,
fmt.Errorf("missing POD_NAME/POD_NAMESPACE and no --provider-image-dir
override")) otherwise proceed (optionally log that the override is being used).
Update the block around podName/podNamespace,
providerimages.BuildImageRefMapFromPod, and the call to
providerimages.ScanProviderImages to enforce this behavior.
---
Outside diff comments:
In `@pkg/providerimages/providerimages.go`:
- Around line 196-212: The code treats any os.Stat error as "missing", which
hides real errors; change the logic in the provider image discovery (around
metadataInfo/metadataErr and manifestsInfo/manifestsErr handling) to first check
metadataErr and manifestsErr: if either error is non-nil and not os.ErrNotExist,
return that error (wrapped with context like "profile %s") instead of converting
it to metadataExists/manifestsExists false; only treat os.ErrNotExist as absence
and then use metadataExists/manifestsExists to decide returning nil or the
errMissingMetadata/errMissingManifests errors.
---
Nitpick comments:
In `@pkg/providerimages/providerimages_test.go`:
- Around line 61-333: Add a focused unit test for BuildImageRefMapFromPod in
providerimages_test.go that constructs a Pod with multiple containers and a mix
of image-backed volumes and non-image volumes and volumeMounts whose mountPath
basenames both match and do not match provider directory names; call
BuildImageRefMapFromPod(pod) and assert the returned map contains the expected
image references for mounts whose basename matches and omits or ignores
non-image volumes and mismatched basenames, covering multiple containers and
duplicate mounts to ensure dedup behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 4eac1f45-37a6-4dce-97a1-eaad594097f3
⛔ Files ignored due to path filters (231)
go.sumis excluded by!**/*.sumvendor/github.com/containerd/stargz-snapshotter/estargz/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/build.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/AUTHORSis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/NOTICEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file_unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/credentials.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/file_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/native_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/memorystore/store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/types/authconfig.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/client/client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/client/command.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/credentials.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/error.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/helper.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/version.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/and/and_closer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/compression/compression.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/estargz/estargz.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/gzip/zip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/redact/redact.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/retry/retry.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/retry/wait/kubernetes_apimachinery_wait.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/verify/verify.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/zstd/zstd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/anon.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/auth.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/authn.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/basic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/bearer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/keychain.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/multikeychain.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/compression/compression.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/logs/logs.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/hash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/manifest.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/match/match.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/rebase.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/compressed.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/uncompressed.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/with.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/platform.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/progress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/catalog.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/check.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/descriptor.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/fetcher.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/list.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/mount.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/multi_write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/progress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/puller.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/schema1.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/basic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/error.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/logger.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/ping.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/retry.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/schemer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/scope.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/transport.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/useragent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/stream/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/stream/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/types/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/zz_deepcopy_generated.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.gitattributesis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.goreleaser.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/compressible.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bytereader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/compress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/decompress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/fse.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/gen.shis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/compress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/huff0.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/le.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/unsafe_enabled.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/decode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/decode_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/encode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/encode_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/snappy.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/s2sx.modis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/s2sx.sumis excluded by!**/*.sum,!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blockdec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blockenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blocktype_string.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bytebuf.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bytereader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decodeheader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decoder_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/dict.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_base.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_best.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_better.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_dfast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_fast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/encoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/encoder_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/framedec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/frameenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_encoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_predefined.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/hash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/history.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txtis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/simple_go124.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/snappy.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/zip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/zstd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/version.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/versioned.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/common.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/format.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/reader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/strconv.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/writer.gois excluded by!**/vendor/**,!vendor/**vendor/modules.txtis excluded by!**/vendor/**,!vendor/**
📒 Files selected for processing (19)
cmd/capi-operator/main.godev-images.jsongo.modmanifests/0000_30_cluster-api-installer_00_tombstones.yamlmanifests/0000_30_cluster-api-installer_04_images.configmap.yamlmanifests/0000_30_cluster-api-installer_05_deployment.yamlmanifests/0000_30_cluster-api_11_deployment.yamlmanifests/image-referencespkg/controllers/revision/revision_controller_test.gopkg/controllers/revision/suite_test.gopkg/providerimages/mirrors.gopkg/providerimages/mirrors_test.gopkg/providerimages/providerimages.gopkg/providerimages/providerimages_test.gopkg/providerimages/pullsecret.gopkg/providerimages/trustedca.gopkg/providerimages/trustedca_test.gopkg/test/provider_fixtures.gopkg/util/readconfig.go
💤 Files with no reviewable changes (9)
- pkg/util/readconfig.go
- manifests/0000_30_cluster-api_11_deployment.yaml
- pkg/providerimages/mirrors_test.go
- manifests/0000_30_cluster-api-installer_04_images.configmap.yaml
- dev-images.json
- pkg/providerimages/trustedca_test.go
- pkg/providerimages/trustedca.go
- pkg/providerimages/pullsecret.go
- pkg/providerimages/mirrors.go
✅ Files skipped from review due to trivial changes (1)
- pkg/controllers/revision/suite_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
- manifests/0000_30_cluster-api-installer_00_tombstones.yaml
- go.mod
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
pkg/providerimages/providerimages.go (1)
106-140: Add direct tests for the pod-to-mount correlation path.This helper is now the only source of provider image refs, but the new test suite only exercises
ScanProviderImages. A focused unit test around multiple containers, unrelated image volumes, and missing mounts would make deployment-shape regressions much easier to catch.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/providerimages/providerimages.go` around lines 106 - 140, Add focused unit tests for BuildImageRefMapFromPod that directly exercise the pod→mount correlation: create pods with multiple containers, volumes (including image volumes and unrelated volumes), and mounts (including missing mounts and nested mount paths), populate a fake k8s client (use controller-runtime's fake client) with the Pod, call BuildImageRefMapFromPod(ctx, fakeClient, podName, podNamespace) and assert the returned map contains expected subdirectory keys (use filepath.Base of mount paths) mapped to the correct image references and that unrelated or unmounted image volumes are not present; include separate cases for multiple containers mounting the same volume and volumes without Image.Reference to cover all branches in BuildImageRefMapFromPod.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@manifests/0000_30_cluster-api-installer_05_deployment.yaml`:
- Around line 63-106: Mounts currently set subPath: capi-operator-manifests
cause provider discovery to fail because ScanProviderImages() expects
/var/lib/provider-images/<provider> and discoverProfiles() appends
capi-operator-manifests; fix by updating the manifest entries (the listed
volumes with name provider-*) to remove subPath: capi-operator-manifests so the
mountPath exposes /var/lib/provider-images/<provider> directly, or alternatively
modify discoverProfiles() in pkg/providerimages/providerimages.go to stop
appending "capi-operator-manifests" when scanning provider directories (choose
one consistent approach and apply the same change to the other occurrences noted
around lines 135-178).
- Around line 39-46: The pod-identity guard currently treats any non-empty
POD_NAMESPACE as an error causing loadProviderImages() to always return
errPodIdentityNotSet once POD_NAMESPACE is injected; update the condition in the
loadProviderImages/initialization block that checks podName and podNamespace so
it returns errPodIdentityNotSet only when either podName == "" or podNamespace
== "" (i.e., use podName == "" || podNamespace == ""), referencing the podName,
podNamespace variables and the errPodIdentityNotSet error to locate and correct
the check.
In `@pkg/providerimages/providerimages.go`:
- Around line 89-99: The code appends ProviderImageManifests with a possibly
empty ImageRef when imageRefMap lacks an entry for a discovered subdir, which
should be a hard error; update the loop that builds result (where imageRef :=
imageRefMap[subdir] and you construct ProviderImageManifests) to check for
existence in imageRefMap (use the comma-ok pattern) and return or propagate an
error if missing (include subdir/subdirPath in the error message) instead of
using the zero-value ImageRef; ensure callers of this function handle the
returned error accordingly.
---
Nitpick comments:
In `@pkg/providerimages/providerimages.go`:
- Around line 106-140: Add focused unit tests for BuildImageRefMapFromPod that
directly exercise the pod→mount correlation: create pods with multiple
containers, volumes (including image volumes and unrelated volumes), and mounts
(including missing mounts and nested mount paths), populate a fake k8s client
(use controller-runtime's fake client) with the Pod, call
BuildImageRefMapFromPod(ctx, fakeClient, podName, podNamespace) and assert the
returned map contains expected subdirectory keys (use filepath.Base of mount
paths) mapped to the correct image references and that unrelated or unmounted
image volumes are not present; include separate cases for multiple containers
mounting the same volume and volumes without Image.Reference to cover all
branches in BuildImageRefMapFromPod.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: b44a38cf-51a1-4bf5-8fa5-44cd80555895
⛔ Files ignored due to path filters (231)
go.sumis excluded by!**/*.sumvendor/github.com/containerd/stargz-snapshotter/estargz/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/build.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/containerd/stargz-snapshotter/estargz/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/AUTHORSis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/NOTICEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file_unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/configfile/file_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/credentials.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/file_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/credentials/native_store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/memorystore/store.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/cli/cli/config/types/authconfig.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/client/client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/client/command.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/credentials.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/error.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/helper.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/docker/docker-credential-helpers/credentials/version.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/and/and_closer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/compression/compression.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/estargz/estargz.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/gzip/zip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/redact/redact.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/retry/retry.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/retry/wait/kubernetes_apimachinery_wait.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/verify/verify.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/internal/zstd/zstd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/anon.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/auth.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/authn.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/basic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/bearer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/keychain.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/authn/multikeychain.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/compression/compression.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/logs/logs.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/hash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/manifest.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/match/match.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/mutate/rebase.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/compressed.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/uncompressed.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/partial/with.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/platform.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/progress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/catalog.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/check.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/descriptor.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/fetcher.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/list.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/mount.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/multi_write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/progress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/puller.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/schema1.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/basic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/error.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/logger.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/ping.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/retry.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/schemer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/scope.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/transport.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/useragent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/stream/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/stream/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/image.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/layer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/tarball/write.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/types/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/go-containerregistry/pkg/v1/zz_deepcopy_generated.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.gitattributesis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/.goreleaser.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/compressible.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/bytereader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/compress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/decompress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/fse/fse.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/gen.shis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/compress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/decompress_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/huff0/huff0.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/le.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/le/unsafe_enabled.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/decode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/decode_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/encode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/encode_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/internal/snapref/snappy.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/s2sx.modis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/s2sx.sumis excluded by!**/*.sum,!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bitreader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bitwriter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blockdec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blockenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/blocktype_string.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bytebuf.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/bytereader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decodeheader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/decoder_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/dict.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_base.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_best.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_better.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_dfast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/enc_fast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/encoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/encoder_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/framedec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/frameenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_encoder.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/fse_predefined.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/hash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/history.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txtis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_other.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/matchlen_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_amd64.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_amd64.sis excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqdec_generic.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/seqenc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/simple_go124.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/snappy.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/zip.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/klauspost/compress/zstd/zstd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/config.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/index.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/version.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/opencontainers/image-spec/specs-go/versioned.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/common.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/format.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/reader.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/strconv.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/vbatts/tar-split/archive/tar/writer.gois excluded by!**/vendor/**,!vendor/**vendor/modules.txtis excluded by!**/vendor/**,!vendor/**
📒 Files selected for processing (19)
cmd/capi-operator/main.godev-images.jsongo.modmanifests/0000_30_cluster-api-installer_00_tombstones.yamlmanifests/0000_30_cluster-api-installer_04_images.configmap.yamlmanifests/0000_30_cluster-api-installer_05_deployment.yamlmanifests/0000_30_cluster-api_11_deployment.yamlmanifests/image-referencespkg/controllers/revision/revision_controller_test.gopkg/controllers/revision/suite_test.gopkg/providerimages/mirrors.gopkg/providerimages/mirrors_test.gopkg/providerimages/providerimages.gopkg/providerimages/providerimages_test.gopkg/providerimages/pullsecret.gopkg/providerimages/trustedca.gopkg/providerimages/trustedca_test.gopkg/test/provider_fixtures.gopkg/util/readconfig.go
💤 Files with no reviewable changes (9)
- dev-images.json
- pkg/providerimages/mirrors_test.go
- pkg/util/readconfig.go
- pkg/providerimages/trustedca.go
- pkg/providerimages/pullsecret.go
- manifests/0000_30_cluster-api_11_deployment.yaml
- manifests/0000_30_cluster-api-installer_04_images.configmap.yaml
- pkg/providerimages/trustedca_test.go
- pkg/providerimages/mirrors.go
✅ Files skipped from review due to trivial changes (2)
- manifests/image-references
- manifests/0000_30_cluster-api-installer_00_tombstones.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
- pkg/test/provider_fixtures.go
- pkg/controllers/revision/revision_controller_test.go
- cmd/capi-operator/main.go
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
1 similar comment
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
The earlier |
|
Scheduling tests matching the |
|
/override ? |
|
@mdbooth: /override requires failed status contexts, check run or a prowjob name to operate on.
Only the following failed contexts/checkruns were expected:
If you are trying to override a checkrun that has a space in it, you must put a double quote on the context. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/override ci/prow/e2e-openstack-ovn-techpreview Overriding because it causes the PR to be mis-reported as needing attention. |
|
@mdbooth: Overrode contexts on behalf of mdbooth: ci/prow/e2e-openstack-ovn-techpreview DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
did a deeper pass on the current state of the PR (thanks claude) - inline comments below. verified that SelfImageRef replacement still happens in revisiongenerator/transform.go so that's not a regression, tombstone coverage is correct, deleted code has no remaining callers, and there's no race on volume readiness.
| // BuildImageRefMapFromPod reads the given pod's spec to build a mapping | ||
| // from mount subdirectory names to image references. It correlates image | ||
| // volumes with their volume mounts to determine which image is mounted where. | ||
| func BuildImageRefMapFromPod(ctx context.Context, k8sClient client.Reader, podName, podNamespace string) (map[string]string, error) { |
There was a problem hiding this comment.
BuildImageRefMapFromPod has no tests. this is the new critical path - correlating volumes to image refs via the pod spec. two nested loops, filepath.Base extraction, filtering by image volume type. should be straightforward to test with fake.NewClientBuilder(). worth covering: happy path with image volumes, non-image volumes being filtered out, volume mount with no matching volume, and the filepath.Base extraction from nested mount paths.
| contentID, err := writeManifestsWithHash(manifestsPath, profile.Manifests, profile.Metadata.SelfImageRef, imageRef) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("failed to write manifests for profile %s: %w", profile.Profile, err) | ||
| for i := range pod.Spec.Containers { |
There was a problem hiding this comment.
this only iterates Containers, not InitContainers. fine today (no init containers in the deployment) but worth a comment so nobody gets bitten later if one gets added.
| providerImageDir := extraflags.String( | ||
| "provider-image-dir", | ||
| defaultProviderImageDirPath, | ||
| "Directory containing provider image manifests. In dev mode, set to a local directory to skip pod spec reading.", |
There was a problem hiding this comment.
I know you said you'd remove the dev mode stuff - just flagging that this help text still says "skip pod spec reading" but loadProviderImages unconditionally requires POD_NAME/POD_NAMESPACE. either fix or remove.
There was a problem hiding this comment.
This is still in here - but not worth blocking on / redoing the CI run. FYI @mdbooth if you're gonna touch this any time soon.
|
|
||
| var logProviderProfiles []any | ||
| for _, profile := range providerProfiles { | ||
| logProviderProfiles = append(logProviderProfiles, profile.Name, fmt.Sprintf("%s/%s", profile.ImageRef, profile.Profile)) |
There was a problem hiding this comment.
using provider names as log keys makes the structured output non-standard and harder to filter. one line per profile with fixed keys would be cleaner:
for _, profile := range providerProfiles {
log.Info("loaded provider profile", "name", profile.Name, "imageRef", profile.ImageRef, "profile", profile.Profile)
}|
one more thing - |
|
nit (not in scope for this PR): |
|
Unrelated flake (fixed in #551) /test unit |
|
Scheduling tests matching the |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
1 similar comment
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
Permafailing /override ci/prow/e2e-openstack-ovn-techpreview |
|
@mdbooth: Overrode contexts on behalf of mdbooth: ci/prow/e2e-openstack-ovn-techpreview DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@mdbooth: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Unrelated /test e2e-aws-ovn-serial-2of2 |
|
/test e2e-azure-ovn-techpreview-upgrade |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: theobarberbany The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified by CI primarily e2e-aws-capi-disconnected-techpreview |
|
@mdbooth: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
1805bd0
into
openshift:main
Switches capi-operator to mount provider images via image volumes instead of pulling them. The image volume feature is beta in 1.35 (on by default), and GA in 1.36. This means we can rely on cri-o to pull images. This has many benefits:
In practise this looks like:
kubelet mounts all the provider images for us under
/var/lib/provider-images.images.jsonis removed entirely. This does present us with a minor problem, because we still need to be able to substitute release images in provider manifests. We previously got that from images.json because we needed it to pull the images. To work round this, we set POD_NAME and POD_NAMESPACE, and the operator inspects its pod to get the provider image references.The excessive events failures in techpreview jobs are due to kubernetes/kubernetes#138644.
Summary by CodeRabbit
Release Notes
New Features
Refactor
Chores