Add flux automation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Tyler Perkins 2023-11-03 20:15:22 -04:00
parent fb00ad4d11
commit 97f6b6b0fb
4 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,12 @@
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImagePolicy
metadata:
name: general-api-image-policy
namespace: flux-system
spec:
imageRepositoryRef:
name: general-api-repo
policy:
semver:
range: ">=1.0.0"

View File

@ -0,0 +1,22 @@
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImageUpdateAutomation
metadata:
name: general-api-image-update-automation
namespace: flux-system
spec:
sourceRef:
kind: GitRepository
name: flux-system
git:
checkout:
ref:
branch: main
commit:
author:
name: fluxcdbot
email: fluxcdbot@clortox.com
messageTemplate: 'Update image tag to {{range .Updated.Images}}{{println .}}{{end}}'
update:
path: ./api/general-api
strategy: Setters

View File

@ -0,0 +1,9 @@
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImageRepository
metadata:
name: general-api-repo
namespace: flux-system
spec:
image: git.clortox.com/tyler/general-api
interval: 1m

View File

@ -17,7 +17,8 @@ spec:
spec:
containers:
- name: general-api
image: git.clortox.com/tyler/general-api:latest
image: git.clortox.com/tyler/general-api
imagePullPolicy: Always
env:
- name: ACCESS_KEY
valueFrom: