titansoft-pte-ltd / imagepullsecret-patcher

A simple Kubernetes client-go application that creates and patches imagePullSecrets to service accounts in all Kubernetes namespaces to allow cluster-wide authenticated access to private container registry.
https://medium.com/titansoft-engineering/kubernetes-cluster-wide-access-to-private-container-registry-with-imagepullsecret-patcher-b8b8fb79f7e5
MIT License
256 stars 91 forks source link

Support reading secrets dynamically from a volume mount #14

Closed ryanmt closed 3 years ago

ryanmt commented 3 years ago

This PR introduces the ability to distribute dynamic auth credentials by this utility as well as adopt a stronger security model for secret management. This is possible by enabling the auth credentials to be read from a volume mount instead of through static environment variables.

This makes this utility a better fit for propagating short lived access credentials to a private registry, as those would presumably be modified more often than the pod is restarted.

codecov-io commented 3 years ago

Codecov Report

Merging #14 into master will decrease coverage by 6.62%. The diff coverage is 14.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
- Coverage   64.41%   57.79%   -6.63%     
==========================================
  Files           4        4              
  Lines         163      154       -9     
==========================================
- Hits          105       89      -16     
- Misses         50       57       +7     
  Partials        8        8              
Impacted Files Coverage Δ
main.go 37.75% <0.00%> (-5.39%) :arrow_down:
secret.go 83.33% <33.33%> (-16.67%) :arrow_down:
config_helper.go 100.00% <0.00%> (ø)
service_account.go 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f9de27e...792d8e5. Read the comment docs.