diff --git a/charts/ecr-cleanup/Chart.yaml b/charts/ecr-cleanup/Chart.yaml index 0d19e57..91e60ab 100644 --- a/charts/ecr-cleanup/Chart.yaml +++ b/charts/ecr-cleanup/Chart.yaml @@ -20,10 +20,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.7 +version: 0.2.8 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.2.7" +appVersion: "0.2.8" diff --git a/charts/ecr-cleanup/README.md b/charts/ecr-cleanup/README.md index b014968..1243225 100644 --- a/charts/ecr-cleanup/README.md +++ b/charts/ecr-cleanup/README.md @@ -6,7 +6,7 @@ Deploys a job that cleans up an ECR repo based on the following rules. 3. Has the container been tagged with the word `keep` 4. Is the container the only tag in the ECR repository -![Version: 0.2.7](https://img.shields.io/badge/Version-0.2.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.7](https://img.shields.io/badge/AppVersion-0.2.7-informational?style=flat-square) +![Version: 0.2.8](https://img.shields.io/badge/Version-0.2.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.8](https://img.shields.io/badge/AppVersion-0.2.8-informational?style=flat-square) ## Values @@ -14,6 +14,7 @@ Deploys a job that cleans up an ECR repo based on the following rules. |-----|------|---------|-------------| | awsRegistryId | string | `""` | ECR Registry ID to override picking the default | | command | list | `["/code/main.py"]` | Command being run by the cronjob | +| dryRun | bool | `false` | Should the tool run in dryrun | | fullnameOverride | string | `""` | Override fullname | | image.pullPolicy | string | `"IfNotPresent"` | Pull Policy for images in cronjob | | image.registry | string | `"ghcr.io"` | Image Registry | diff --git a/charts/ecr-cleanup/templates/cronjob.yaml b/charts/ecr-cleanup/templates/cronjob.yaml index 76cbec5..d909ee8 100644 --- a/charts/ecr-cleanup/templates/cronjob.yaml +++ b/charts/ecr-cleanup/templates/cronjob.yaml @@ -28,11 +28,13 @@ spec: - name: main image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: IfNotPresent - {{- if or .Values.awsRegistryId .Values.env}} env: - name: AWS_REGISTRY_ID value: "{{ .Values.awsRegistryId }}" - {{- end }} + {{- if .Values.dryRun }} + - name: DRY_RUN + value: "{{ .Values.dryRun }}" + {{- end }} command: {{ .Values.command }} securityContext: {{- toYaml .Values.securityContext | nindent 16 }} diff --git a/charts/ecr-cleanup/values.schema.json b/charts/ecr-cleanup/values.schema.json index 59a1ae0..058c2b9 100644 --- a/charts/ecr-cleanup/values.schema.json +++ b/charts/ecr-cleanup/values.schema.json @@ -11,6 +11,9 @@ "command": { "type": "array" }, + "dryRun": { + "type": "boolean" + }, "image": { "type": "object", "properties": { diff --git a/charts/ecr-cleanup/values.yaml b/charts/ecr-cleanup/values.yaml index 4418d61..32f0848 100644 --- a/charts/ecr-cleanup/values.yaml +++ b/charts/ecr-cleanup/values.yaml @@ -16,6 +16,9 @@ image: # -- ECR Registry ID to override picking the default awsRegistryId: "" +# -- Should the tool run in dryrun +dryRun: false + # -- List of imagePullSecrets to use when getting images imagePullSecrets: [] # -- Overriding the Name