kots icon indicating copy to clipboard operation
kots copied to clipboard

Images only referenced in preflight check collectors are not included in airgap packages

Open laverya opened this issue 4 years ago • 3 comments

apiVersion: troubleshoot.replicated.com/v1beta1
kind: Preflight
metadata:
  name: airgap-preflight-checks
spec:
  analyzers:
    - textAnalyze:
        checkName: a name
        fileName: ping.txt/run-ping.log
        regexGroups: '(?P<Transmitted>\d+) packets? transmitted, (?P<Received>\d+) packets? received, (?P<Loss>\d+\.\d+)% packet loss'
        outcomes:
          - pass:
              when: "Loss < 5.0"
              message: google.com resolves correctly
          - fail:
              message: High packet loss  
  collectors:
    - run:
        collectorName: "run-ping"
        image: busybox:1
        name: ping.txt
        namespace: default
        command: ["ping"]
        args: ["-w", "5", 'google.com']
        imagePullPolicy: IfNotPresent

the 'busybox:1' image is not pulled, causing the preflight check to spin forever.

laverya avatar May 05 '20 23:05 laverya

Also, we don't rewrite the preflight check images to refer to local registries, etc

laverya avatar Sep 04 '20 19:09 laverya

Hey @laverya or @divolgin not to revive an older issue, but was there ever a fix or workaround in place for this?

ndrafahl avatar Oct 05 '22 15:10 ndrafahl

@ndrafahl can you confirm that this is still an issue, and if so, provide additional reproduction steps? Currently, an airgap bundle built for an application with the above preflight spec includes the busybox:1 image and is rewritten to the local registry.

cbodonnell avatar Dec 30 '22 15:12 cbodonnell