Add Linkding and Immich
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: immich
|
||||
name: immich
|
||||
namespace: immich
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: immich
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: immich
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: DB_DATABASE_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: db_username
|
||||
name: immich-secret
|
||||
- name: DB_HOSTNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: db_host
|
||||
name: immich-secret
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: db_password
|
||||
name: immich-secret
|
||||
- name: DB_PORT
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: db_port
|
||||
name: immich-secret
|
||||
- name: DB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: db_username
|
||||
name: immich-secret
|
||||
image: ghcr.io/immich-app/immich-server:v2.6.0:-release}
|
||||
name: immich-server
|
||||
ports:
|
||||
- containerPort: 2283
|
||||
resources: {}
|
||||
volumes:
|
||||
- name: upload
|
||||
persistentVolumeClaim:
|
||||
claimName: immich-pvc
|
||||
status: {}
|
||||
@@ -6,4 +6,3 @@ metadata:
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- uploads-pvc.yaml
|
||||
- deployment.yaml
|
||||
|
||||
@@ -2,3 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- secrets/
|
||||
- linkding/
|
||||
- immich/
|
||||
|
||||
@@ -4,6 +4,6 @@ metadata:
|
||||
name: longhorn
|
||||
namespace: longhorn-system
|
||||
resources:
|
||||
- longhorn-stack.yaml
|
||||
- release.yaml
|
||||
- namespace.yaml
|
||||
- longhorn-stack.yaml
|
||||
|
||||
@@ -4,6 +4,6 @@ metadata:
|
||||
name: monitoring
|
||||
namespace: monitoring
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- kube-prometheus-stack.yaml
|
||||
- release.yaml
|
||||
- namespace.yaml
|
||||
|
||||
@@ -4,6 +4,6 @@ metadata:
|
||||
name: cnpg-cluster
|
||||
namespace: cnpg-cluster
|
||||
resources:
|
||||
- cluster-namespace.yaml
|
||||
- pg-cluster.yaml
|
||||
- immich-db.yaml
|
||||
- cluster-namespace.yaml
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
package cnpg
|
||||
50
pkg/cnpg/helm.go
Normal file
50
pkg/cnpg/helm.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package cnpg
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"danicos.dev/daniel/go-kube/pkg/flux"
|
||||
"danicos.dev/daniel/homelab/pkg/root"
|
||||
|
||||
helm "github.com/fluxcd/helm-controller/api/v2"
|
||||
source "github.com/fluxcd/source-controller/api/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
func HelmSource() source.HelmRepository {
|
||||
spec := source.HelmRepositorySpec{
|
||||
Interval: durHour(root.FLUX_HELM_MONITORING_INTERVAL),
|
||||
URL: root.HELM_CLOUD_NATIVE_PG_URL,
|
||||
}
|
||||
return flux.NewFluxHelmRepositorySource(meta_system, spec)
|
||||
}
|
||||
|
||||
func HelmRelease() helm.HelmRelease {
|
||||
interval := durHour(12)
|
||||
spec := helm.HelmReleaseSpec{
|
||||
Interval: durMin(30),
|
||||
Chart: &helm.HelmChartTemplate{
|
||||
Spec: helm.HelmChartTemplateSpec{
|
||||
Chart: root.HELM_CLOUD_NATIVE_PG_CHART,
|
||||
Version: root.HELM_CLOUD_NATIVE_PG_CHART_VERSION,
|
||||
Interval: &interval,
|
||||
SourceRef: helm.CrossNamespaceObjectReference{
|
||||
Kind: flux.MetaHelmRepository.Kind,
|
||||
Name: meta_system.Meta().Name,
|
||||
Namespace: SystemNamespace.Name,
|
||||
},
|
||||
},
|
||||
},
|
||||
Install: &helm.Install{CRDs: helm.Create},
|
||||
Upgrade: &helm.Upgrade{CRDs: helm.CreateReplace},
|
||||
}
|
||||
return flux.NewFluxHelmRelease(meta_system, spec)
|
||||
}
|
||||
|
||||
func durHour(d int64) metav1.Duration {
|
||||
return metav1.Duration{Duration: (time.Duration(d) * time.Hour)}
|
||||
}
|
||||
|
||||
func durMin(d int64) metav1.Duration {
|
||||
return metav1.Duration{Duration: (time.Duration(d) * time.Minute)}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ func Stack() stack.Stack {
|
||||
"namespace": Namespace,
|
||||
"uploads-pvc": uploads_pvc,
|
||||
// "redis": Redis(),
|
||||
"deployment": Deployment(),
|
||||
// "deployment": Deployment(),
|
||||
},
|
||||
)
|
||||
return kz.Stack("immich")
|
||||
|
||||
Reference in New Issue
Block a user