Azure / Azure/acr-cli

Allow an --exclude tag option or compile against a regexp lib that allows negative look ahead (?!whatever) for purge tasks

Open
#59 11 comments 25 reactions 1 assignee Claimed by @northtyphoon View on GitHub
enhancement
Dominant language
Go
Stars
70
Forks
52
Avg merge
3d 2h
Merged PRs (30d)
12

Description

**What is the problem you're trying to solve**
We'd like to be able to call acr purge tasks to delete all images older than X days that aren't currently in use on our aks cluster. The current golang library used does not support negative look aheads.

**Describe the solution you'd like**
We'd like to generate an exclude list via:
```
kubectl get pods --all-namespaces -o=jsonpath="{..image}" -l app=
```
And feed that to acr purge with either an --exclude-tag or a negative lookahead regex on --filter

**Additional context**
```
Error: failed to dry-run purge: error parsing regexp: invalid or unsupported Perl syntax: `(?!`
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.