flux: migrate to flux cd
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
apiVersion: image.toolkit.fluxcd.io/v1
|
||||
kind: ImagePolicy
|
||||
metadata:
|
||||
name: home-assistant
|
||||
spec:
|
||||
imageRepositoryRef:
|
||||
name: home-assistant
|
||||
filterTags:
|
||||
pattern: '^latest$'
|
||||
policy:
|
||||
alphabetical: {}
|
||||
digestReflectionPolicy: Always
|
||||
interval: 24h
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: image.toolkit.fluxcd.io/v1
|
||||
kind: ImageRepository
|
||||
metadata:
|
||||
name: home-assistant
|
||||
spec:
|
||||
image: homeassistant/home-assistant
|
||||
interval: 72h
|
||||
@@ -0,0 +1,24 @@
|
||||
apiVersion: image.toolkit.fluxcd.io/v1
|
||||
kind: ImageUpdateAutomation
|
||||
metadata:
|
||||
name: home-assistant
|
||||
spec:
|
||||
interval: 72h
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: home-assistant
|
||||
git:
|
||||
checkout:
|
||||
ref:
|
||||
branch: master
|
||||
commit:
|
||||
author:
|
||||
name: FluxCD
|
||||
email: flux@local
|
||||
messageTemplate: |
|
||||
Update home-assistant image.
|
||||
push:
|
||||
branch: master
|
||||
update:
|
||||
path: ./deploy/app/statefulset.yaml
|
||||
strategy: Setters
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: home-assistant
|
||||
resources:
|
||||
- pvc.yaml
|
||||
- statefulset.yaml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
- service.yaml
|
||||
|
||||
@@ -2,7 +2,6 @@ apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: home-assistant-config
|
||||
namespace: home-assistant
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: home-assistant
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- port: 8123
|
||||
protocol: TCP
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Endpoints
|
||||
metadata:
|
||||
name: home-assistant
|
||||
subsets:
|
||||
- addresses:
|
||||
- ip: 192.168.14.9
|
||||
ports:
|
||||
- port: 8123
|
||||
---
|
||||
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: home-assistant
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`casa.limbosolutions.com`) || Host(`has.casa.limbosolutions.com`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: home-assistant
|
||||
port: 8123
|
||||
tls:
|
||||
secretName: casa-limbosolutions-com-tls
|
||||
@@ -2,7 +2,6 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: home-assistant
|
||||
namespace: home-assistant
|
||||
labels:
|
||||
app: home-assistant
|
||||
spec:
|
||||
@@ -24,8 +23,9 @@ spec:
|
||||
effect: "NoSchedule"
|
||||
containers:
|
||||
- name: home-assistant
|
||||
image: "homeassistant/home-assistant"
|
||||
imagePullPolicy: Always
|
||||
### Maintained by flux - Image Update Automation
|
||||
image: homeassistant/home-assistant:latest # {"$imagepolicy": "home-assistant:home-assistant}
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
value: Europe/Lisbon
|
||||
|
||||
Reference in New Issue
Block a user