The current implementation sends ~/.docker/config.json as a secret if it exist. This isn't great:
- it's surprising, not mentioned anywhere and a security concern;
- it's left behind if interrupted (e.g. ctrl-c is pressed);
- the credential might not be the ones you want to use in the cluster (e.g. a service account with less privilege);
- sending this config file it often not enough (e.g. in GKE grc.io auth depends on the gcloud command and other credential files);
- it's often unnecessary (e.g. pushing to gcr.io from GKE doesn't require any secret if the default cluster service account is configured with gcs write permission)
As a result, I think it would be best to place this pushing of ~/.docker/config.json behind a dedicated flag and default to not sending any secrets.
The current implementation sends
~/.docker/config.jsonas a secret if it exist. This isn't great:As a result, I think it would be best to place this pushing of
~/.docker/config.jsonbehind a dedicated flag and default to not sending any secrets.