Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Expose Cron schedule as deploy-time variable
Browse files Browse the repository at this point in the history
Default set to run once every hour at the beginning of the hour
  • Loading branch information
Lucas Rodriguez committed Oct 18, 2023
1 parent eaf5c0a commit fd0904a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/zarf-ecr-credential-helper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ metadata:
name: zarf-ecr-credential-helper
namespace: zarf
spec:
schedule: "*/1 * * * *"
schedule: "###ZARF_VAR_ECR_CREDENTIAL_HELPER_CRON_SCHEDULE###"
jobTemplate:
spec:
template:
Expand Down
1 change: 1 addition & 0 deletions zarf-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ aws_region = 'us-east-1'
registry_type = ''
ecr_hook_role_arn = ''
ecr_credential_helper_role_arn = ''
ecr_credential_helper_cron_schedule = '*/1 * * * *'
5 changes: 5 additions & 0 deletions zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ variables:
description: "The ARN of an IAM role to give the zarf-ecr-credential-helper necessary permissions to fetch ECR tokens"
prompt: true

- name: ECR_CREDENTIAL_HELPER_CRON_SCHEDULE
description: "The schedule on which the ECR credential helper CronJob will run. https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#schedule-syntax"
# Run once an hour at the beginning of the hour
default: "0 * * * *"

components:
- name: ecr-bootstrap
description: "Bootstrap the deployment by creating an ECR repository for the Pepr controller image"
Expand Down

0 comments on commit fd0904a

Please sign in to comment.