scorecard/cron/k8s
Spencer Schrock 1d1df07770
Add experimental local OSV mode for cron releasetest worker (#3947)
* add local osv db client

Signed-off-by: Spencer Schrock <sschrock@google.com>

* enable osv experiment in cron release test

Signed-off-by: Spencer Schrock <sschrock@google.com>

---------

Signed-off-by: Spencer Schrock <sschrock@google.com>
2024-03-15 11:46:09 +11:00
..
auth.yaml 🌱 Setup cron for running as GitHub App (#2721) 2023-03-07 19:19:47 +00:00
cii.yaml Use new project name in Copyright notices (#2505) 2022-12-01 15:08:48 -08:00
controller.release.yaml Gitlab: add cron repos (#3208) 2023-06-29 16:25:34 -04:00
controller.yaml Gitlab: add cron repos (#3208) 2023-06-29 16:25:34 -04:00
README.md 📖 fix "default" typo (#3543) 2023-10-10 01:13:12 +00:00
transfer-raw.yaml Use new project name in Copyright notices (#2505) 2022-12-01 15:08:48 -08:00
transfer.release-raw.yaml Use new project name in Copyright notices (#2505) 2022-12-01 15:08:48 -08:00
transfer.release.yaml Use new project name in Copyright notices (#2505) 2022-12-01 15:08:48 -08:00
transfer.yaml Use new project name in Copyright notices (#2505) 2022-12-01 15:08:48 -08:00
webhook.release.yaml Use new project name in Copyright notices (#2505) 2022-12-01 15:08:48 -08:00
worker.release.yaml Add experimental local OSV mode for cron releasetest worker (#3947) 2024-03-15 11:46:09 +11:00
worker.yaml 🌱 cron: add two additional replicas (#3721) 2024-01-05 18:48:44 +00:00

Applying changes to the openssf cluster

Currently there is no automation to sync changes to these files to the GKE cluster. Changes must be manually applied with kubectl by a user with permissions to modify the cluster.

Before committing any changes, it is recommended to check your YAML files for errors with yamllint. To check all YAML files in this directory, run:

yamllint -d relaxed .

Note: relaxed is a more tolerant, predefined config which ignores things like line length.

Installing kubectl

Follow instructions here to configure kubectl and set the default cluster.

The cluster name is openssf which is in zone us-central1-c.

Uploading a cronjob/pod configuration file

  1. Verify you're working on the openssf cluster with kubectl config current-context
  2. Run kubectl apply -f FILENAME to apply a new configuration

Creating or updating the ConfigMap using the config.yaml file

We use ConfigMaps to store our config file (cron/config/config.yaml). The file can be created for the first time, or updated, with the same command:

kubectl create configmap scorecard-config --from-file=config.yaml -o yaml --dry-run=client | kubectl apply -f -

Accessing the config.yaml through ConfigMap

The ConfigMap is then volume mounted, so the config file is accessible by any cronjob that specifies the mounting in its yaml.