pmorie / osb-starter-pack

A quickstart for making a new Open Service Broker
Apache License 2.0
69 stars 47 forks source link

Confused about ImagePullPolicy #36

Closed carolynvs closed 6 years ago

carolynvs commented 6 years ago

After cloning the starter pack and not making any changes, I ran make helm-deploy and the broker cannot deploy because the image isn't present, and the helm command explicitly turns off image pulling (error below).

I'm not quite sure what the intended workflow was?

Originally (before trying the starter pack) I was using draft to avoid requiring a registry, and I'm mostly curious if you had another workaround, or if it's expected that I'm pushing the image somewhere before deploying. If so, the README needs to be updated to include that step.

$ kubectl describe po/broker-skeleton-broker-skeleton-5bfd8c4d5f-pvcps -n broker-skeleton
Name:           broker-skeleton-broker-skeleton-5bfd8c4d5f-pvcps
Namespace:      broker-skeleton
Node:           minibroker/192.168.99.100
Start Time:     Tue, 06 Feb 2018 08:24:00 -0600
Labels:         app=broker-skeleton-broker-skeleton
                chart=broker-skeleton-0.0.1
                heritage=Tiller
                pod-template-hash=1698470819
                release=broker-skeleton
Annotations:    kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"broker-skeleton","name":"broker-skeleton-broker-skeleton-5bfd8c4d5f","uid":"5fb85...
Status:         Pending
IP:             172.17.0.12
Created By:     ReplicaSet/broker-skeleton-broker-skeleton-5bfd8c4d5f
Controlled By:  ReplicaSet/broker-skeleton-broker-skeleton-5bfd8c4d5f
Containers:
  service-broker-skeleton:
    Container ID:
    Image:         quay.io/osb-starter-pack/servicebroker:latest
    Image ID:
    Port:          8080/TCP
    Command:
      /opt/servicebroker/servicebroker
    Args:
      --port
      8080
      -v
      5
      -logtostderr
    State:          Waiting
      Reason:       ErrImageNeverPull
    Ready:          False
    Restart Count:  0
    Liveness:       tcp-socket :8080 delay=10s timeout=2s period=10s #success=1 #failure=3
    Readiness:      tcp-socket :8080 delay=10s timeout=2s period=10s #success=1 #failure=1
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-8rtfq (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          False
  PodScheduled   True
Volumes:
  default-token-8rtfq:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-8rtfq
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     <none>
Events:
  Type     Reason                 Age               From                 Message
  ----     ------                 ----              ----                 -------
  Normal   Scheduled              32s               default-scheduler    Successfully assigned broker-skeleton-broker-skeleton-5bfd8c4d5f-pvcps to minibroker
  Normal   SuccessfulMountVolume  32s               kubelet, minibroker  MountVolume.SetUp succeeded for volume "default-token-8rtfq"
  Warning  ErrImageNeverPull      3s (x4 over 32s)  kubelet, minibroker  Container image "quay.io/osb-starter-pack/servicebroker:latest" is not present with pull policy of Never
  Warning  FailedSync             3s (x4 over 32s)  kubelet, minibroker  Error syncing pod
lilic commented 6 years ago

@carolynvs Yes, I ran into a similar problem, I agree on changing the image pull policy from Never. Unless @pmorie had a specific reason for that? :)

pmorie commented 6 years ago

I think it was inadvertent or just laziness in the din of battle. It should definitely not be hard-coded.