Compare commits
7 Commits
138e33e90f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| dbecd67471 | |||
| 2881eb1167 | |||
| 755d68a844 | |||
| f40a899200 | |||
| d30aad3058 | |||
| 6149826bc6 | |||
| 0d2b30a83a |
@@ -1,14 +1,17 @@
|
|||||||
name: Casa Home Assistant CI/CD Pipeline (testing)
|
name: Casa Home Assistant CI/CD Pipeline
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- fix/*
|
- fix/*
|
||||||
- main
|
- main
|
||||||
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 16 * * 0' # every sunday 4 pm
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
deploy:
|
||||||
runs-on: casa-vlan-cicd
|
runs-on: casa-vlan-cicd
|
||||||
env:
|
env:
|
||||||
GITHUB_TEMP: ${{ runner.temp }}
|
GITHUB_TEMP: ${{ runner.temp }}
|
||||||
@@ -40,9 +43,6 @@ jobs:
|
|||||||
INGRESS_ROUTES_MATCH: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_ROUTES_MATCH }}"
|
INGRESS_ROUTES_MATCH: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_ROUTES_MATCH }}"
|
||||||
INGRESS_TLS_SECRET_NAME: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_TLS_SECRET_NAME }}"
|
INGRESS_TLS_SECRET_NAME: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_TLS_SECRET_NAME }}"
|
||||||
run: |
|
run: |
|
||||||
#set -x for debugging
|
kubectl apply -f ./deploy/deployment.yaml \
|
||||||
set -e
|
&& envsubst < ./deploy/service.template.yaml | kubectl apply -f -
|
||||||
cd ${{ gitea.workspace }}
|
|
||||||
kubectl apply -f ./deploy/deployment.yaml
|
|
||||||
envsubst < ./deploy/service.template.yaml | kubectl apply -f -
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
set -euo pipefail
|
|
||||||
|
|
||||||
echo "fetching actions."
|
|
||||||
|
|
||||||
# check arguments
|
|
||||||
ERROR=0
|
|
||||||
|
|
||||||
if [ -z "${RUNNER_TEMP}" ]; then
|
|
||||||
echo "❌ ERROR: missing env RUNNER_TEMP"
|
|
||||||
$ERROR=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${WORKSPACE}" ]; then
|
|
||||||
echo "❌ ERROR: missing env WORKSPACE"
|
|
||||||
$ERROR=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ERROR" != 0 ]; then
|
|
||||||
exit "$ERROR"
|
|
||||||
fi
|
|
||||||
# end check arguments
|
|
||||||
mkdir -p ${RUNNER_TEMP}/gitea_src
|
|
||||||
mkdir -p ${WORKSPACE}/.gitea/limbo_actions
|
|
||||||
git clone -b main --depth=1 https://git.limbosolutions.com/kb/gitea ${RUNNER_TEMP}/gitea_src
|
|
||||||
|
|
||||||
for dir in ${RUNNER_TEMP}/gitea_src/.gitea/actions/*; do
|
|
||||||
ln -s "$dir" "${WORKSPACE}/.gitea/limbo_actions/$(basename "$dir")"
|
|
||||||
done
|
|
||||||
@@ -2,10 +2,9 @@
|
|||||||
|
|
||||||
Welcome to my Home Assistant setup repository.
|
Welcome to my Home Assistant setup repository.
|
||||||
This repository documents and maintains the Home Assistant instance running in my home, hosted on casa server k3s cluster.
|
This repository documents and maintains the Home Assistant instance running in my home, hosted on casa server k3s cluster.
|
||||||
All essential containers, such as MQTT and speech recognition, are hosted on the same server for seamless integration.
|
Related containers, such as MQTT and speech recognition, are hosted on same cluster.
|
||||||
|
|
||||||
<!-- omit in toc -->
|
**Table of Contents:**
|
||||||
## Table of Contents
|
|
||||||
|
|
||||||
- [Devices](#devices)
|
- [Devices](#devices)
|
||||||
- [Broadlink - RM4 Pro](#broadlink---rm4-pro)
|
- [Broadlink - RM4 Pro](#broadlink---rm4-pro)
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ All Environment variables requirements as set as secrets.
|
|||||||
|
|
||||||
[gitea workflow](../.gitea/workflows/deploy.yaml)
|
[gitea workflow](../.gitea/workflows/deploy.yaml)
|
||||||
|
|
||||||
## RBAC
|
## cicd RBAC
|
||||||
|
|
||||||
```bash { cwd=../ }
|
```bash { cwd=../ }
|
||||||
kubectl apply -f ./deploy/rbac.yaml
|
kubectl apply -f ./deploy/cicd-rbac.yaml
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -33,9 +33,15 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
dnsPolicy: ClusterFirstWithHostNet # ensures pod uses cluster DNS (CoreDNS) for service discovery even with host networking
|
dnsPolicy: ClusterFirstWithHostNet # ensures pod uses cluster DNS (CoreDNS) for service discovery even with host networking
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
|
nodeName: casa # force deploy to master node cluster
|
||||||
|
tolerations:
|
||||||
|
- key: "node-role.kubernetes.io/control-plane" # allow installation on control-plane
|
||||||
|
operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
containers:
|
containers:
|
||||||
- name: home-assistant
|
- name: home-assistant
|
||||||
image: "homeassistant/home-assistant"
|
image: "homeassistant/home-assistant"
|
||||||
|
imagePullPolicy: Always
|
||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: Europe/Lisbon # set timezone
|
value: Europe/Lisbon # set timezone
|
||||||
|
|||||||
Reference in New Issue
Block a user