Failing to load in docker config

jabronious
jabronious
Community Member

I currently have my config.json (as a document) for docker loaded into my 1pass vault like this:
config.json

{
    "auths": {
        "https://index.docker.io/v1/": {
            "username": "xxx",
            "password": "xxxxxx",
            "email": "xxxx@somemail.com",
            "auth": "xxx"
        }
    }
}

my k8s manifest is set up like this (using helm values):

apiVersion: onepassword.com/v1
kind: OnePasswordItem
metadata:
  name: dockerhub-config
  namespace: {{ .Values.appName }}-{{.Values.env}}
type: kubernetes.io/dockerconfigjson
spec:
  itemPath: vaults/<vault_name>/items/<item_name_of_document>

I see this error in the operator when I attempt to load in the file:
"error": "Secret \"dockerhub-config\" is invalid: data[.dockerconfigjson]: Required value"}

connect default 1 2024-04-29 04:07:50.635016577 +0000 UTC deployed connect-1.15.0 1.7.2


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser: Not Provided

Comments

  • jabronious
    jabronious
    Community Member

    I needed to solve this by taking the docker config.json and copy/paste it into an API Credential with a field that was labelled .dockerconfigjson. Otherwise everything else I did was good. Hope this helps someone else down the road :)

This discussion has been closed.