kube_clusterSourceKubeClusterStandardCronJobWithServiceAccount

class CronJobWithServiceAccount

A CronJob plus the ServiceAccount/Role/RoleBinding it runs as, bundled into one Manifest. The RBAC rules use the Role shorthand; the CronJob's serviceAccountName is wired to the generated ServiceAccount. Everything is named after +name+.

CronJobWithServiceAccount.new( name: "glauth-config-builder", image: "nixery.dev/shell/ruby/kubectl/cacert", schedule: "*/5 * * * *", rules: [ "secrets" => %w[get list], "batch/jobs" => %w[create], ], command: RubyScript(<<~'BUILD'), ... BUILD )