-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 cron: pass config as an argument to binaries (4/n) #2279
Conversation
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2279 +/- ##
=======================================
Coverage 41.17% 41.17%
=======================================
Files 110 110
Lines 8774 8774
=======================================
Hits 3613 3613
Misses 4892 4892
Partials 269 269 |
Integration tests success for |
@calebbrown FYI |
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Integration tests success for |
Signed-off-by: Spencer Schrock <sschrock@google.com>
Integration tests success for |
…nded to be temporary to help with GKE rollout. Signed-off-by: Spencer Schrock <sschrock@google.com>
Integration tests success for |
Integration tests success for |
Signed-off-by: Spencer Schrock <sschrock@google.com>
Integration tests success for |
* Explicitly read config file instead of embedding it. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add CLI config arg and ReadConfig() to existing cron binaries. Signed-off-by: Spencer Schrock <sschrock@google.com> * Volume mount config Signed-off-by: Spencer Schrock <sschrock@google.com> * Ignore CLI flag args when reading local filenames in controller. Signed-off-by: Spencer Schrock <sschrock@google.com> * Hide --config in the config package. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add config param to k8s files. Signed-off-by: Spencer Schrock <sschrock@google.com> * Fix test Signed-off-by: Spencer Schrock <sschrock@google.com> * Allow fallback to embedded config if no config is passed as arg. Intended to be temporary to help with GKE rollout. Signed-off-by: Spencer Schrock <sschrock@google.com> Signed-off-by: Spencer Schrock <sschrock@google.com> Signed-off-by: nathaniel.wert <nathaniel.wert@kudelskisecurity.com>
* Explicitly read config file instead of embedding it. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add CLI config arg and ReadConfig() to existing cron binaries. Signed-off-by: Spencer Schrock <sschrock@google.com> * Volume mount config Signed-off-by: Spencer Schrock <sschrock@google.com> * Ignore CLI flag args when reading local filenames in controller. Signed-off-by: Spencer Schrock <sschrock@google.com> * Hide --config in the config package. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add config param to k8s files. Signed-off-by: Spencer Schrock <sschrock@google.com> * Fix test Signed-off-by: Spencer Schrock <sschrock@google.com> * Allow fallback to embedded config if no config is passed as arg. Intended to be temporary to help with GKE rollout. Signed-off-by: Spencer Schrock <sschrock@google.com> Signed-off-by: Spencer Schrock <sschrock@google.com> Signed-off-by: nathaniel.wert <nathaniel.wert@kudelskisecurity.com>
* Explicitly read config file instead of embedding it. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add CLI config arg and ReadConfig() to existing cron binaries. Signed-off-by: Spencer Schrock <sschrock@google.com> * Volume mount config Signed-off-by: Spencer Schrock <sschrock@google.com> * Ignore CLI flag args when reading local filenames in controller. Signed-off-by: Spencer Schrock <sschrock@google.com> * Hide --config in the config package. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add config param to k8s files. Signed-off-by: Spencer Schrock <sschrock@google.com> * Fix test Signed-off-by: Spencer Schrock <sschrock@google.com> * Allow fallback to embedded config if no config is passed as arg. Intended to be temporary to help with GKE rollout. Signed-off-by: Spencer Schrock <sschrock@google.com> Signed-off-by: Spencer Schrock <sschrock@google.com>
What kind of change does this PR introduce?
Part of a series of refactors to generalize the cron infrastructure to enable re-use by the ossf criticality score project
What is the current behavior?
The
cron/internal/config/config.yaml
file is embedded inside cron binaries, and packaged with the various docker files.This was not flexible for re-using the cron infrastructure across projects.
What is the new behavior (if this is a feature change)?**
config
package now support aconfig
flag./etc/scorecard/config.yaml
Which issue(s) this PR fixes
NONE
Special notes for your reviewer
I made a few naming choices, (e.g. storing configs at
/etc/scorecard
), feel free to nit and I can patch.Does this PR introduce a user-facing change?
For user-facing changes, please add a concise, human-readable release note to
the
release-note
(In particular, describe what changes users might need to make in their
application as a result of this pull request.)