flux fix autoimage updater

This commit is contained in:
marcel-dempers 2023-03-11 22:23:40 +11:00
parent 80984b7639
commit 1532cc5225
3 changed files with 21 additions and 4 deletions

View File

@ -231,16 +231,33 @@ If Flux pushed the update to our application repo, it will cause a CI/CD loop.
kubectl -n default apply -f repositories/config/apps/example-app-2/gitrepository.yaml
kubectl -n default apply -f repositories/config/apps/example-app-2/kustomization.yaml
# see our application
kubectl get deploy
kubectl get pods
# tell flux about our image update policy
kubectl -n default apply -f repositories/config/apps/example-app-2/imagerepository.yaml
kubectl -n default apply -f repositories/config/apps/example-app-2/imagepolicy.yaml
kubectl -n default apply -f repositories/config/apps/example-app-2/imageupdateautomation.yaml
kubectl describe imagepolicy example-app-2
kubectl describe imagerepository example-app-2
kubectl describe imageupdateautomation example-app-2
```
## Build and push our example-app-2
```
#see changes
#make application changes and rebuild + push
docker build . -t aimvector/example-app-2:0.0.2
docker push aimvector/example-app-2:0.0.2
#see changes new tags
kubectl describe imagerepository
#see image being updated
kubectl describe imagepolicy example-app-2
```

View File

@ -1,13 +1,13 @@
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageUpdateAutomation
metadata:
name: example-app-1
name: example-app-2
namespace: default
spec:
interval: 1m0s
sourceRef:
kind: GitRepository
name: example-app-1
name: example-app-2
git:
checkout:
ref:

View File

@ -3,4 +3,4 @@ app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World! v1.0.0.1"
return "Hello World! v1.0.0.2"