mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
flux fix autoimage updater
This commit is contained in:
parent
80984b7639
commit
1532cc5225
@ -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
|
||||
|
||||
```
|
@ -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:
|
||||
|
@ -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"
|
Loading…
x
Reference in New Issue
Block a user