Manage immich-sync with Argo CD
This commit is contained in:
commit
cf768e1c93
9 files changed
+373
No files matched your search
@@ -0,0 +1,19 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: immich-sync
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: homelab
|
||||
source:
|
||||
repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git
|
||||
targetRevision: main
|
||||
path: apps/immich-sync
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: default
|
||||
syncPolicy:
|
||||
automated:
|
||||
enabled: true
|
||||
prune: true
|
||||
selfHeal: true
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
expected_context=kubernetes-admin@kubernetes
|
||||
current_context=$(kubectl config current-context)
|
||||
if [ "${current_context}" != "${expected_context}" ]; then
|
||||
echo "Refusing to bootstrap through unexpected context: ${current_context}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
kubectl apply --server-side --dry-run=server -k "${script_dir}"
|
||||
kubectl apply --server-side -k "${script_dir}"
|
||||
kubectl --namespace argocd wait application/immich-sync \
|
||||
--for=jsonpath='{.status.sync.status}'=Synced \
|
||||
--timeout=5m
|
||||
kubectl --namespace argocd wait application/immich-sync \
|
||||
--for=jsonpath='{.status.health.status}'=Healthy \
|
||||
--timeout=5m
|
||||
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- project.yaml
|
||||
- immich-sync.yaml
|
||||
@@ -0,0 +1,25 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: AppProject
|
||||
metadata:
|
||||
name: homelab
|
||||
namespace: argocd
|
||||
spec:
|
||||
description: Applications managed from the public homelab GitOps repository
|
||||
sourceRepos:
|
||||
- https://code.brunner.ninja/feedc0de/homelab-gitops.git
|
||||
destinations:
|
||||
- namespace: default
|
||||
server: https://kubernetes.default.svc
|
||||
namespaceResourceWhitelist:
|
||||
- group: ""
|
||||
kind: PersistentVolumeClaim
|
||||
- group: ""
|
||||
kind: Service
|
||||
- group: apps
|
||||
kind: Deployment
|
||||
- group: networking.k8s.io
|
||||
kind: Ingress
|
||||
- group: policy
|
||||
kind: PodDisruptionBudget
|
||||
- group: monitoring.coreos.com
|
||||
kind: ServiceMonitor
|
||||
Reference in new issue
Block a user