Skip to content

Commit

Permalink
Adding the option to enable mfa from homControl
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryGF committed Dec 9, 2023
1 parent b8725fc commit 73d2569
Show file tree
Hide file tree
Showing 36 changed files with 151 additions and 17 deletions.
2 changes: 2 additions & 0 deletions docker/homControl/app/pages/Applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def main():
with st.expander("**Settings**"):
st.text_input("Namespace", app_details.get('namespace', ''), key=f"{app_name}-namespace")
# st.text_input("GPU", app_details.get('gpu', ''), key=f"{app_name}-gpu")
st.checkbox("MFA", app_details.get('mfa', True), key=f"{app_name}-mfa")
st.radio("Pass GPU",gpu_types, key=f"{app_name}-gpu", index=gpu_types.index(app_details.get('gpu', 'none')))
st.text_input("Priority", app_details.get('priority', ''), key=f"{app_name}-priority")

Expand All @@ -104,6 +105,7 @@ def main():
st.write("No PVCs for this app")
st.session_state.apps_data[app_name]['deploy'] = st.session_state[app_name]
st.session_state.apps_data[app_name]['namespace'] = st.session_state[f"{app_name}-namespace"]
st.session_state.apps_data[app_name]['mfa'] = st.session_state[f"{app_name}-mfa"]
st.session_state.apps_data[app_name]['gpu'] = st.session_state[f"{app_name}-gpu"].lower()
if st.session_state.apps_data[app_name]['gpu'] not in ["","none","amd","intel"]:
st.error("GPU Type must be one of: none, amd, intel")
Expand Down
37 changes: 37 additions & 0 deletions terraform/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
amd-gpu:
deploy: true
gpu: none
mfa: true
name: amd-gpu
namespace: kube-system
override:
Expand All @@ -15,6 +16,7 @@ amd-gpu:
authelia:
deploy: true
gpu: none
mfa: true
name: authelia
namespace: authelia
override:
Expand Down Expand Up @@ -53,6 +55,7 @@ authelia:
authentik:
deploy: false
gpu: none
mfa: true
name: authentik
namespace: authentik
override:
Expand All @@ -71,6 +74,7 @@ authentik:
bazarr:
deploy: true
gpu: none
mfa: true
name: bazarr
namespace: services
override:
Expand All @@ -95,6 +99,7 @@ bazarr:
crowdsec:
deploy: false
gpu: none
mfa: true
name: crowdsec
namespace: crowdsec
override:
Expand Down Expand Up @@ -126,6 +131,7 @@ crowdsec:
dex:
deploy: false
gpu: none
mfa: true
name: dex
namespace: services
override:
Expand All @@ -137,6 +143,7 @@ dex:
filebrowser:
deploy: false
gpu: none
mfa: true
name: filebrowser
namespace: services
override:
Expand All @@ -154,6 +161,7 @@ filebrowser:
flood:
deploy: true
gpu: none
mfa: false
name: flood
namespace: services
override:
Expand Down Expand Up @@ -181,6 +189,7 @@ flood:
goldilocks:
deploy: false
gpu: none
mfa: true
name: goldilocks
namespace: kube-system
override:
Expand All @@ -192,6 +201,7 @@ goldilocks:
gow:
deploy: false
gpu: amd
mfa: true
name: gow
namespace: services
override:
Expand All @@ -210,6 +220,7 @@ gow:
grafana:
deploy: true
gpu: none
mfa: true
name: grafana
namespace: monitoring
override:
Expand All @@ -228,6 +239,7 @@ grafana:
home-assistant:
deploy: false
gpu: none
mfa: true
name: home-assistant
namespace: services
override:
Expand All @@ -248,6 +260,7 @@ home-assistant:
homepage:
deploy: true
gpu: none
mfa: true
name: homepage
namespace: services
override:
Expand All @@ -265,6 +278,7 @@ intel-gpu:
- .metadata.annotations
- .spec.resourceManager
kind: GpuDevicePlugin
mfa: true
name: intel-gpu
namespace: kube-system
override:
Expand All @@ -276,6 +290,7 @@ intel-gpu:
jellyfin:
deploy: true
gpu: none
mfa: false
name: jellyfin
namespace: services
override:
Expand All @@ -302,6 +317,7 @@ jellyfin:
jellyseerr:
deploy: true
gpu: none
mfa: false
name: jellyseerr
namespace: services
override:
Expand All @@ -319,6 +335,7 @@ jellyseerr:
kavita:
deploy: false
gpu: none
mfa: true
name: kavita
namespace: services
override:
Expand All @@ -341,6 +358,7 @@ kavita:
kube-prometheus-stack:
deploy: true
gpu: none
mfa: false
name: kube-prometheus-stack
namespace: monitoring
override:
Expand All @@ -355,6 +373,7 @@ kube-prometheus-stack:
kubeview:
deploy: false
gpu: none
mfa: true
name: kubeview
namespace: services
override:
Expand All @@ -371,6 +390,7 @@ kubeview:
kwatch:
deploy: false
gpu: none
mfa: true
name: kwatch
namespace: monitoring
override:
Expand All @@ -385,6 +405,7 @@ kwatch:
loki:
deploy: false
gpu: none
mfa: true
name: loki
namespace: monitoring
override:
Expand All @@ -396,6 +417,7 @@ loki:
mylar:
deploy: false
gpu: none
mfa: true
name: mylar
namespace: services
override:
Expand All @@ -412,6 +434,7 @@ mylar:
nextcloud:
deploy: false
gpu: none
mfa: true
name: nextcloud
namespace: services
override:
Expand Down Expand Up @@ -441,6 +464,7 @@ nextcloud:
node-feature-discovery:
deploy: true
gpu: none
mfa: true
name: node-feature-discovery
namespace: node-feature-discovery
override:
Expand All @@ -452,6 +476,7 @@ node-feature-discovery:
nzbget:
deploy: false
gpu: none
mfa: true
name: nzbget
namespace: services
override:
Expand All @@ -470,6 +495,7 @@ nzbget:
plex:
deploy: true
gpu: intel
mfa: false
name: plex
namespace: services
override:
Expand All @@ -496,6 +522,7 @@ plex:
portainer:
deploy: false
gpu: none
mfa: true
name: portainer
namespace: kube-system
override:
Expand All @@ -513,6 +540,7 @@ portainer:
promtail:
deploy: false
gpu: none
mfa: true
name: promtail
namespace: monitoring
override:
Expand All @@ -524,6 +552,7 @@ promtail:
prowlarr:
deploy: true
gpu: none
mfa: true
name: prowlarr
namespace: services
override:
Expand All @@ -542,6 +571,7 @@ prowlarr:
radarr:
deploy: true
gpu: none
mfa: true
name: radarr
namespace: services
override:
Expand All @@ -566,6 +596,7 @@ radarr:
rancher:
deploy: true
gpu: none
mfa: false
name: rancher
namespace: cattle-system
override:
Expand All @@ -584,6 +615,7 @@ rancher:
readarr:
deploy: false
gpu: none
mfa: true
name: readarr
namespace: services
override:
Expand All @@ -600,6 +632,7 @@ readarr:
renovate:
deploy: false
gpu: none
mfa: true
name: renovate
namespace: services
override:
Expand All @@ -618,6 +651,7 @@ renovate:
sabnzbd:
deploy: true
gpu: none
mfa: true
name: sabnzbd
namespace: services
override:
Expand All @@ -641,6 +675,7 @@ sabnzbd:
samba:
deploy: false
gpu: none
mfa: true
name: samba
namespace: services
override:
Expand All @@ -657,6 +692,7 @@ samba:
sonarr:
deploy: true
gpu: none
mfa: true
name: sonarr
namespace: services
override:
Expand All @@ -677,6 +713,7 @@ sonarr:
tautulli:
deploy: true
gpu: none
mfa: false
name: tautulli
namespace: services
override:
Expand Down
1 change: 1 addition & 0 deletions terraform/gitops.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module "argocd_application" {
project = module.gitops.project
server_side = try(each.value.server_side, "false")
ignore_differences = try(each.value.ignore, [])
mfa = try(each.value.mfa, true)
depends_on = [
module.gitops
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ bazarr:
ingressClassName: traefik
annotations:
cert-manager.io/cluster-issuer: letsencrypt
%{~ if mfa ~}
traefik.ingress.kubernetes.io/router.middlewares: authelia-forwardauth-authelia@kubernetescrd
%{~ endif ~}
traefik.ingress.kubernetes.io/router.entrypoints: websecure-ext
traefik.ingress.kubernetes.io/router.middlewares: authentik-ak-outpost-authentik-embedded-outpost@kubernetescrd
gethomepage.dev/enabled: "true"
gethomepage.dev/name: "Bazarr"
gethomepage.dev/description: "Bazarr is a companion application to Sonarr and Radarr that manages and downloads subtitles"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ crowdsec:
annotations:
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/router.entrypoints: websecure-ext
%{~ if mfa ~}
traefik.ingress.kubernetes.io/router.middlewares: authelia-forwardauth-authelia@kubernetescrd
%{~ endif ~}
# labels: {}
ingressClassName: "traefik" # nginx
host: "crowdsec.${domain}" # metabase.example.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ dex:
annotations:
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/router.entrypoints: websecure
%{~ if mfa ~}
traefik.ingress.kubernetes.io/router.middlewares: authelia-forwardauth-authelia@kubernetescrd
%{~ endif ~}
gethomepage.dev/enabled: "true"
gethomepage.dev/name: "Dex"
gethomepage.dev/description: "Dex OIDC Provider"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ duplicati:
annotations:
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/router.entrypoints: websecure
%{~ if mfa ~}
traefik.ingress.kubernetes.io/router.middlewares: authelia-forwardauth-authelia@kubernetescrd
%{~ endif ~}
gethomepage.dev/enabled: "true"
gethomepage.dev/name: "Duplicati"
gethomepage.dev/description: "https://duplicati.readthedocs.io/en/latest/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ filebrowser:
annotations:
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/router.entrypoints: websecure-ext
%{~ if mfa ~}
traefik.ingress.kubernetes.io/router.middlewares: authelia-forwardauth-authelia@kubernetescrd
%{~ endif ~}
gethomepage.dev/enabled: "true"
gethomepage.dev/name: "File Browser"
gethomepage.dev/description: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ app-template:
annotations:
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/router.entrypoints: websecure-ext
%{~ if mfa ~}
traefik.ingress.kubernetes.io/router.middlewares: authelia-forwardauth-authelia@kubernetescrd
%{~ endif ~}
gethomepage.dev/enabled: "true"
gethomepage.dev/name: "Flood"
gethomepage.dev/group: "Aggregators"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ goldilocks:
annotations:
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/router.entrypoints: websecure-ext
%{~ if mfa ~}
traefik.ingress.kubernetes.io/router.middlewares: authelia-forwardauth-authelia@kubernetescrd
%{~ endif ~}
gethomepage.dev/enabled: "true"
gethomepage.dev/name: "Goldilocks"
gethomepage.dev/group: "Internal"
Expand Down
Loading

0 comments on commit 73d2569

Please sign in to comment.