From 765b0062851643d9136aced9cc89f1c8ad00d428 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Wed, 16 Dec 2020 10:46:35 -0500 Subject: [PATCH] pod updates when config updates, configmap reads from config yaml --- docker-compose.yaml | 4 +- config.yml => helm/config.yml | 30 ++++------- helm/templates/config.yaml | 97 ----------------------------------- helm/templates/configmap.yaml | 7 +++ helm/templates/deploy.yaml | 2 + 5 files changed, 21 insertions(+), 119 deletions(-) rename config.yml => helm/config.yml (80%) delete mode 100644 helm/templates/config.yaml create mode 100644 helm/templates/configmap.yaml diff --git a/docker-compose.yaml b/docker-compose.yaml index 5d01f74..64e2152 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,6 +4,6 @@ services: homer: image: b4bz/homer:latest ports: - - 8080:8080 + - 8081:8080 volumes: - - ./config.yml:/www/config.yml \ No newline at end of file + - ./helm/config.yml:/www/config.yml \ No newline at end of file diff --git a/config.yml b/helm/config.yml similarity index 80% rename from config.yml rename to helm/config.yml index 8cc1e39..b00b72d 100644 --- a/config.yml +++ b/helm/config.yml @@ -14,24 +14,24 @@ services: tag: "CI" url: "https://gitlab.ducoterra.net/" target: '_blank' - - name: "pgAdmin" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/pgadmin.ico" - tag: "CI" - url: "https://pgadmin.ducoterra.net/" + - name: "Code Server" + logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/vscode.png" + tag: "Duconet" + url: "https://dev.dnet/" target: '_blank' - - name: "Storage" + - name: "Cloud" icon: "fas fa-save" items: + - name: "Freenas" + logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/freenas.png" + tag: "Duconet" + url: "https://freenas.dnet/" + target: '_blank' - name: "Nextcloud" logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/nextcloud.png" tag: "Storage" url: "https://nextcloud.ducoterra.net/" target: '_blank' - - name: "Freenas" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/freenas.png" - tag: "Storage" - url: "http://freenas.ducoterra.net/" - target: '_blank' - name: "Entertainment" icon: "fas fa-photo-video" items: @@ -48,16 +48,6 @@ services: url: "https://grafana.ducoterra.net/" tag: "Monitoring" target: '_blank' - - name: "Graphite" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/graphite.png" - url: "https://graphite.ducoterra.net/" - tag: "Monitoring" - target: '_blank' - - name: "Zipkin" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/zipkin.ico" - url: "https://zipkin.ducoterra.net/" - tag: "Monitoring" - target: '_blank' - name: "Mainframe" logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/glances.png" url: "https://monitor.ducoterra.net/" diff --git a/helm/templates/config.yaml b/helm/templates/config.yaml deleted file mode 100644 index 00c542d..0000000 --- a/helm/templates/config.yaml +++ /dev/null @@ -1,97 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Release.Name }} -data: - config.yml: | - --- - title: "Reese's Homelab" - subtitle: "Duconet" - icon: "fas fa-tachometer-alt" # Optional icon - footer: false - - links: [] # Allows for navbar (dark mode, layout, and search) without any links - services: - - name: "DevSecOps" - icon: "fas fa-code-branch" - items: - - name: "Gitlab" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/Gitlab.svg" - tag: "CI" - url: "https://gitlab.ducoterra.net/" - target: '_blank' - - name: "pgAdmin" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/pgadmin.ico" - tag: "CI" - url: "https://pgadmin.ducoterra.net/" - target: '_blank' - - name: "Storage" - icon: "fas fa-save" - items: - - name: "Nextcloud" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/nextcloud.png" - tag: "Storage" - url: "https://nextcloud.ducoterra.net/" - target: '_blank' - - name: "Freenas" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/freenas.png" - tag: "Storage" - url: "http://freenas.ducoterra.net/" - target: '_blank' - - name: "Entertainment" - icon: "fas fa-photo-video" - items: - - name: "Jellyfin" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/jellyfin.svg" - url: "https://jellyfin.ducoterra.net" - tag: "Entertainment" - target: '_blank' - - name: "Monitoring" - icon: "fas fa-heartbeat" - items: - - name: "Grafana" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/grafana.svg" - url: "https://grafana.ducoterra.net/" - tag: "Monitoring" - target: '_blank' - - name: "Graphite" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/graphite.png" - url: "https://graphite.ducoterra.net/" - tag: "Monitoring" - target: '_blank' - - name: "Zipkin" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/zipkin.ico" - url: "https://zipkin.ducoterra.net/" - tag: "Monitoring" - target: '_blank' - - name: "Mainframe" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/glances.png" - url: "https://monitor.ducoterra.net/" - tag: "Monitoring" - target: '_blank' - - name: "Network" - icon: "fas fa-server" - items: - - name: "Traefik" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/traefik.png" - tag: "Network" - url: "https://traefik.ducoterra.net/" - target: '_blank' - - name: "Unifi" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/unifi.png" - tag: "Network" - url: "https://unifi.ui.com" - target: '_blank' - - name: "Protect" - logo: "https://gitlab.ducoterra.net/services/homer/-/raw/master/assets/tools/protect.ico" - tag: "Network" - url: "https://protect.ui.com/" - target: '_blank' - - name: "Projects" - icon: "fas fa-project-diagram" - items: - - name: "Python Class 2020" - icon: "fas fa-file-code" - tag: "Projects" - url: "https://pythondocs2020.ducoterra.net/day5/" - target: '_blank' \ No newline at end of file diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml new file mode 100644 index 0000000..a5b7181 --- /dev/null +++ b/helm/templates/configmap.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }} +data: + config.yml: |{{ range .Files.Lines "config.yml" }} + {{ . }}{{ end }} \ No newline at end of file diff --git a/helm/templates/deploy.yaml b/helm/templates/deploy.yaml index 45edc93..a8493df 100644 --- a/helm/templates/deploy.yaml +++ b/helm/templates/deploy.yaml @@ -2,6 +2,8 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }} + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} spec: selector: matchLabels: