Skip to content

Support creation of dockerconfigjson secret type #5

@conorfennell

Description

@conorfennell

Current Behaviour:
The lastpass-operator supports the creation of Opaque secrets.

Enhanced behaviour:
Add the flexibility in the LastPass custom resource to choose the type of secret to be created.

type: kubernetes.io/dockerconfigjson
key: .dockerconfigjson

Example secret for docker credentials

apiVersion: v1
kind: Secret
type: kubernetes.io/dockerconfigjson
metadata:
  name: regcred
  namespace: bots
data:
  .dockerconfigjson: ewogICAiYXV0aHMiOnsKICAgICAgImh0dHBzOi8vaW5kZXguZG9ja2VyLmlvL3YxLyI6ewogICAgICAgICAidXNlcm5hbWUiOiJVc2VybmFtZSIsCiAgICAgICAgICJwYXNzd29yZCI6IlBhc3N3MHJkIiwKICAgICAgICAgImVtYWlsIjoic29tZW9uZUBnbWFpbC5jb20iLAogICAgICAgICAiYXV0aCI6IlZYTmxjbTVoYldVNlVHRnpjM2N3Y21RPSIKICAgICAgfQogICB9Cn0=

Example last pass configuration for docker credentials which will be stored as a base64 string under the .dockerconfigjson key

{
   "auths":{
      "https://index.docker.io/v1/":{
         "username":"Username",
         "password":"Passw0rd",
         "email":"[email protected]",
         "auth":"VXNlcm5hbWU6UGFzc3cwcmQ="
      }
   }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions