blackducksoftware / perceivers

Kubernetes and openshift image discovery for OpsSight
Apache License 2.0
4 stars 7 forks source link

Enable mirror-pods and other hidden images #50

Open jayunit100 opened 6 years ago

jayunit100 commented 6 years ago

We can enable scanning of 'topology dependent images' by simply allowing image facades to run all over the place, and taking the training wheels of the perceiver when it acquires its images.

However, we need to possibly incorporate something into the perceptor data model to accommodate:

msenmurugan commented 6 years ago

Example from minikube of how to pull a non registered image... if we can get this metadata into perceptor somehow, the IF could possibly use it.

Containers:
  kubernetes-dashboard:
    Container ID:   docker://0832787e2e1a023e55e97c39a63540610b3acd565918a0cacbc1258106861e1d
    Image:          k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.1
    Image ID:       docker://sha256:e94d2f21bc0c297cb74c1dfdd23e2eace013f532c60726601af67984d97f718a
    Port:           9090/TCP
    State:          Running
      Started:      Thu, 12 Apr 2018 11:03:45 -0400
    Last State:     Terminated
      Reason:       Error
      Exit Code:    255
      Started:      Tue, 10 Apr 2018 14:25:11 -0400
      Finished:     Thu, 12 Apr 2018 11:03:21 -0400
    Ready:          True
    Restart Count:  4
    Liveness:       http-get http://:9090/ delay=30s timeout=30s period=10s #success=1 #failure=3
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-dntfs (ro)
Conditions:
  Type           Status
  Initialized    True 
  Ready          True 
  PodScheduled   True 
Volumes:
  default-token-dntfs:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-dntfs
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     <none>
Events:
  Type    Reason                 Age   From               Message
  ----    ------                 ----  ----               -------
  Normal  SuccessfulMountVolume  45s   kubelet, minikube  MountVolume.SetUp succeeded for volume "default-token-dntfs"
  Normal  SandboxChanged         45s   kubelet, minikube  Pod sandbox changed, it will be killed and re-created.
  Normal  Pulled                 44s   kubelet, minikube  Container image "k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.1" already present on machine
  Normal  Created                44s   kubelet, minikube  Created container
  Normal  Started                44s   kubelet, minikube  Started container
➜  hub-fortify-ssc-integration-service git:(master) ✗ docker pull docker://sha256:e94d2f21bc0c297cb74c1dfdd23e2eace013f532c60726601af67984d97f718a
invalid reference format
➜  hub-fortify-ssc-integration-service git:(master) ✗ docker pull k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.1
v1.8.1: Pulling from kubernetes-dashboard-amd64
86d1db7c838d: Pull complete 
Digest: sha256:3861695e962972965a4c611bcabc2032f885d8cbdb0bccc9bf513ef16335fe33
Status: Downloaded newer image for k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.1