flux updates - image scanning

This commit is contained in:
marcel-dempers 2023-03-11 15:10:22 +11:00
parent 4fcd8b86be
commit a27f4ac11d
2 changed files with 22 additions and 1 deletions

View File

@ -204,9 +204,19 @@ We need to create a image reigsitry credential where we will push our image:
```
kubectl -n default create secret docker-registry dockerhub-credential --docker-username "" --docker-password "" --docker-email test@test.com
kubectl -n default apply -f repositories/config/apps/example-app-1/imagerepository.yaml
```
We will need to tell Flux how to manage our image deployment
## add image policy and repository
```
kubectl -n default apply -f repositories/config/apps/example-app-1/imagerepository.yaml
kubectl -n default apply -f repositories/config/apps/example-app-1/imagepolicy.yaml
```
https://fluxcd.io/flux/guides/image-update/#configure-image-updates
## Build and push our app

View File

@ -0,0 +1,11 @@
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
name: example-app-1
namespace: default
spec:
imageRepositoryRef:
name: example-app-1
policy:
semver:
range: 0.0.x