Uploaded image for project: 'ONAP Operations Manager'
  1. ONAP Operations Manager
  2. OOM-3

Docker credentials secret missing from deployment yaml files - image download failing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Highest Highest
    • Amsterdam Release
    • None
    • None
    • None

       Issue: docker image download is failing for the nexus3 repo

      Docker containers in all Kubernetes pods fail to initialize except for ones generic to dockerhub like mariadb

      Failed to pull image "nexus3.onap.org:10001/openecomp/testsuite:1.0-STAGING-latest": image pull failed for nexus3.onap.org:10001/openecomp/testsuite:1.0-STAGING-latest, this may be because there are no credentials on this request. details: (unauthorized: authentication required)
      kubelet 172.17.4.99

       Fix: Each yaml file is missing a reference to a predefined authorization secret

      Ideally we pass these parameters in as command line params - or as part of a config ecosystem for prod/stage/dev

      See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/

      Add the following to createAll.bash

      create_namespace() {
        kubectl create namespace $1-$2
      +  kubectl --namespace $1-$2 create secret docker-registry regsecret --docker-server=nexus3.onap.org:10001 --docker-username=docker --docker-password=docker --docker-email=email@email.com
      +  kubectl --namespace $1-$2 patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regsecret"}]}'
      }
      
      

      Or the following to all yamls (with an external nexus3) just after spec: and before containers:

      spec:
        imagePullSecrets:
          - name: regsecret
        containers:
          image: nexus3.onap.org:10001/openecomp/vid:1.0-STAGING-latest
          name: vid-server

            BorislavG Borislav Glozman
            michaelobrien michaelobrien
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: