move freshrss to kubernetes
This commit is contained in:
parent
fcb6e2ca37
commit
709e4b25d7
5 changed files with 29 additions and 15 deletions
|
@ -3,7 +3,6 @@
|
||||||
hosts: manager
|
hosts: manager
|
||||||
roles:
|
roles:
|
||||||
- {role: traefik, tags: traefik}
|
- {role: traefik, tags: traefik}
|
||||||
- {role: freshrss, tags: freshrss}
|
|
||||||
- {role: forgejo, tags: forgejo}
|
- {role: forgejo, tags: forgejo}
|
||||||
- {role: radicale, tags: radicale}
|
- {role: radicale, tags: radicale}
|
||||||
- {role: hedgedoc, tags: hedgedoc}
|
- {role: hedgedoc, tags: hedgedoc}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
- debug:
|
||||||
|
msg: "{{ admin_password }}"
|
||||||
- name: Deploy Docker stack
|
- name: Deploy Docker stack
|
||||||
docker_stack:
|
docker_stack:
|
||||||
name: freshrss
|
name: freshrss
|
||||||
|
|
|
@ -61,11 +61,11 @@ services:
|
||||||
- traefik.http.routers.cyberchef.tls=true
|
- traefik.http.routers.cyberchef.tls=true
|
||||||
- traefik.http.routers.cyberchef.tls.certresolver=letsencrypt
|
- traefik.http.routers.cyberchef.tls.certresolver=letsencrypt
|
||||||
|
|
||||||
- traefik.http.routers.freshrss-k3s.entrypoints=websecure
|
- traefik.http.routers.freshrss.entrypoints=websecure
|
||||||
- traefik.http.routers.freshrss-k3s.service=k3s@file
|
- traefik.http.routers.freshrss.service=k3s@file
|
||||||
- traefik.http.routers.freshrss-k3s.rule=Host(`freshrss.k3s.kun.is`)
|
- traefik.http.routers.freshrss.rule=Host(`rss.kun.is`)
|
||||||
- traefik.http.routers.freshrss-k3s.tls=true
|
- traefik.http.routers.freshrss.tls=true
|
||||||
- traefik.http.routers.freshrss-k3s.tls.certresolver=letsencrypt
|
- traefik.http.routers.freshrss.tls.certresolver=letsencrypt
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: /var/run/docker.sock
|
source: /var/run/docker.sock
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
kubenix.modules.k8s
|
kubenix.modules.k8s
|
||||||
kubenix.modules.helm
|
kubenix.modules.helm
|
||||||
# ./freshrss.nix
|
./freshrss.nix
|
||||||
./cyberchef.nix
|
./cyberchef.nix
|
||||||
];
|
];
|
||||||
kubernetes.kubeconfig = "~/.kube/config";
|
kubernetes.kubeconfig = "~/.kube/config";
|
||||||
|
|
|
@ -9,12 +9,6 @@
|
||||||
|
|
||||||
secrets.freshrss.stringData.adminPassword = "ref+file:///home/pim/.config/home/vals.yaml";
|
secrets.freshrss.stringData.adminPassword = "ref+file:///home/pim/.config/home/vals.yaml";
|
||||||
|
|
||||||
persistentVolumeClaims.freshrss.spec = {
|
|
||||||
accessModes = [ "ReadWriteOnce" ];
|
|
||||||
storageClassName = "local-path";
|
|
||||||
resources.requests.storage = "1Mi";
|
|
||||||
};
|
|
||||||
|
|
||||||
deployments.freshrss = {
|
deployments.freshrss = {
|
||||||
metadata.labels.app = "freshrss";
|
metadata.labels.app = "freshrss";
|
||||||
|
|
||||||
|
@ -27,16 +21,17 @@
|
||||||
spec = {
|
spec = {
|
||||||
containers.freshrss = {
|
containers.freshrss = {
|
||||||
image = "freshrss/freshrss:edge";
|
image = "freshrss/freshrss:edge";
|
||||||
|
envFrom = [{ configMapRef.name = "freshrss"; }];
|
||||||
|
|
||||||
ports = [{
|
ports = [{
|
||||||
containerPort = 80;
|
containerPort = 80;
|
||||||
protocol = "TCP";
|
protocol = "TCP";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
envFrom = [{ configMapRef.name = "freshrss"; }];
|
|
||||||
env = [
|
env = [
|
||||||
{
|
{
|
||||||
name = "ADMIN_PASSWORD";
|
name = "ADMIN_PASSWORD";
|
||||||
|
|
||||||
valueFrom.secretKeyRef = {
|
valueFrom.secretKeyRef = {
|
||||||
name = "freshrss";
|
name = "freshrss";
|
||||||
key = "adminPassword";
|
key = "adminPassword";
|
||||||
|
@ -44,6 +39,7 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "ADMIN_API_PASSWORD";
|
name = "ADMIN_API_PASSWORD";
|
||||||
|
|
||||||
valueFrom.secretKeyRef = {
|
valueFrom.secretKeyRef = {
|
||||||
name = "freshrss";
|
name = "freshrss";
|
||||||
key = "adminPassword";
|
key = "adminPassword";
|
||||||
|
@ -66,6 +62,23 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
persistentVolumes.freshrss.spec = {
|
||||||
|
capacity.storage = "1Mi";
|
||||||
|
accessModes = [ "ReadWriteMany" ];
|
||||||
|
|
||||||
|
nfs = {
|
||||||
|
server = "lewis.hyp";
|
||||||
|
path = "/mnt/data/nfs/freshrss/data";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
persistentVolumeClaims.freshrss.spec = {
|
||||||
|
accessModes = [ "ReadWriteMany" ];
|
||||||
|
storageClassName = "";
|
||||||
|
resources.requests.storage = "1Mi";
|
||||||
|
volumeName = "freshrss";
|
||||||
|
};
|
||||||
|
|
||||||
services.freshrss.spec = {
|
services.freshrss.spec = {
|
||||||
selector.app = "freshrss";
|
selector.app = "freshrss";
|
||||||
|
|
||||||
|
@ -80,7 +93,7 @@
|
||||||
ingressClassName = "traefik";
|
ingressClassName = "traefik";
|
||||||
|
|
||||||
rules = [{
|
rules = [{
|
||||||
host = "freshrss.k3s.kun.is";
|
host = "rss.kun.is";
|
||||||
|
|
||||||
http.paths = [{
|
http.paths = [{
|
||||||
path = "/";
|
path = "/";
|
||||||
|
|
Loading…
Reference in a new issue