diff --git a/glance/k8s/glance-config.yaml b/glance/k8s/glance-config.yaml new file mode 100644 index 0000000..d49eb67 --- /dev/null +++ b/glance/k8s/glance-config.yaml @@ -0,0 +1,209 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: glance-assets + namespace: glance +data: + # Инжектируем твой брутализм напрямую в ассеты + user.css: | + :root { + --bg-color: #050505; + --text-color: #e0e0e0; + --accent: #ffffff; + --dim: #666666; + --font-mono: 'Courier New', Courier, monospace; + } + + /* Принудительно ставим моноширинный шрифт для всего дашборда */ + body, id, main, div, span, p, a, h1, h2, h3 { + font-family: var(--font-mono) !important; + letter-spacing: -0.5px; + } + + /* Ломаем закругления Glance и делаем жесткие рамки */ + .widget, .card, main div, [class*="widget"], [class*="card"] { + border-radius: 0px !important; + border: 1px solid var(--dim) !important; + box-shadow: none !important; + background-color: var(--bg-color) !important; + } + + /* Стилизация ссылок под ховер-эффект из твоего style.css */ + a { + color: var(--text-color) !important; + text-decoration: none !important; + border-bottom: 1px solid var(--dim) !important; + transition: all 0.2s; + } + a:hover { + background-color: var(--text-color) !important; + color: var(--bg-color) !important; + border-color: var(--text-color) !important; + } + + /* Кастомизация заголовков внутри модулей */ + h2, .widget-title, [class*="title"] { + text-transform: uppercase; + font-weight: bold; + } +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: glance-config + namespace: glance +data: + glance.yml: | + server: + assets-path: /app/assets + theme: + # Перевели #050505 и #e0e0e0 в формат HSL для Glance + background-color: 0 0 2 # Истинно черный фон + primary-color: 0 0 88 # Светло-серый текст + contrast-multiplier: 1.4 + positive-color: 140 50 50 # Зеленый для UP-сервисов (не вырвиглазный) + negative-color: 0 70 50 # Красный для упавших сайтов + custom-css-file: /assets/user.css + pages: + - $include: home.yml + - $include: docker.yml + - $include: monitor.yml + + home.yml: | + - name: Home + columns: + - size: small + widgets: + - type: clock + hour-format: 24h + timezones: + - timezone: Europe/Bratislava + label: Bratislava + - timezone: Europe/Kyiv + label: Kyiv + - timezone: Europe/Moscow + label: St. Petersburg + - type: calendar + first-day-of-week: monday + - type: rss + limit: 10 + collapse-after: 3 + cache: 12h + feeds: + - url: https://selfh.st/rss/ + title: selfh.st + - size: full + widgets: + - type: group + widgets: + - type: hacker-news + - type: lobsters + - type: videos + channels: + - UCXuqSBlHAE6Xw-yeJA0Tunw + - UCR-DXc1voovS8nhAvccRZhg + - UCsBjURrPoezykLs9EqgamOA + - UCBJycsmduvYEL83R_U4JriQ + - UCHnyfMqiRRG1u-2MsSQLbXA + - type: group + widgets: + - type: reddit + subreddit: technology + show-thumbnails: true + - type: reddit + subreddit: selfhosted + show-thumbnails: true + - size: small + widgets: + - type: weather + location: London, United Kingdom + units: metric + hour-format: 12h + hide-location: true + - type: markets + markets: + - symbol: SPY + name: S&P 500 + - symbol: BTC-USD + name: Bitcoin + - symbol: NVDA + name: NVIDIA + - symbol: AAPL + name: Apple + - symbol: MSFT + name: Microsoft + - type: releases + cache: 1d + repositories: + - glanceapp/glance + - go-gitea/gitea + - nextcloud/all-in-one + + docker.yml: | + - name: Docker + columns: + - size: full + widgets: + - type: docker-containers + hide-by-default: false + + monitor.yml: | + - name: Monitoring + columns: + - size: small + widgets: + - type: dns-stats + service: adguard + url: http://adguard-service.adguard.svc.cluster.local:3000 + username: forust + password: ${ADGUARD_PASSWORD} + - size: full + widgets: + - type: monitor + title: Services Status + cache: 1m + sites: + - title: forust.xyz + url: https://forust.xyz + - title: dns.forust.xyz + url: https://dns.forust.xyz + - title: www.lk-tour.com.ua + url: https://www.lk-tour.com.ua + - title: lk-tour.com.ua + url: https://lk-tour.com.ua + # - title: gitssh.forust.xyz + # url: https://gitssh.forust.xyz + # - title: gcr.forust.xyz + # url: https://gcr.forust.xyz/v2/ + - title: gitea.forust.xyz + url: https://gitea.forust.xyz + - title: nextcloud.forust.xyz + url: https://nextcloud.forust.xyz + - title: mc.forust.xyz + url: https://mc.forust.xyz/map + - title: auth.forust.xyz + url: https://auth.forust.xyz + - title: metube.forust.xyz + url: https://metube.forust.xyz + - title: dockmon.forust.xyz + url: https://dockmon.forust.xyz + - title: portainer.forust.xyz + url: https://portainer.forust.xyz + - title: termix.forust.xyz + url: https://termix.forust.xyz + - title: uptime.forust.xyz + url: https://uptime.forust.xyz + - title: cmk.forust.xyz + url: https://cmk.forust.xyz + - title: search.forust.xyz + url: https://search.forust.xyz + - title: status.forust.xyz + url: https://status.forust.xyz + - title: traefik.forust.xyz + url: https://traefik.forust.xyz + - title: media.forust.xyz + url: https://media.forust.xyz + - title: wfs.forust.xyz + url: https://wfs.forust.xyz + - title: forust.xyz/convert + url: https://forust.xyz/convert diff --git a/glance/k8s/glance.yaml b/glance/k8s/glance.yaml new file mode 100644 index 0000000..6780093 --- /dev/null +++ b/glance/k8s/glance.yaml @@ -0,0 +1,78 @@ +apiVersion: v1 +kind: Service +metadata: + name: glance-service + namespace: glance +spec: + selector: + app: glance + ports: + - port: 8080 + targetPort: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: glance-deployment + namespace: glance +spec: + replicas: 1 + selector: + matchLabels: + app: glance + template: + metadata: + labels: + app: glance + spec: + containers: + - name: glance + image: glanceapp/glance + envFrom: + - secretRef: + name: glance-secrets + ports: + - containerPort: 8080 + volumeMounts: + - name: glance-config + mountPath: /app/config/glance.yml + subPath: glance.yml + - name: glance-config + mountPath: /app/config/home.yml + subPath: home.yml + - name: glance-config + mountPath: /app/config/docker.yml + subPath: docker.yml + - name: glance-config + mountPath: /app/config/monitor.yml + subPath: monitor.yml + - name: glance-assets + mountPath: /app/assets/user.css + subPath: user.css + - name: docker-socket + mountPath: /var/run/docker.sock + - name: localtime + mountPath: /etc/localtime + readOnly: true + resources: + requests: + memory: "10Mi" + cpu: "20m" + limits: + memory: "100Mi" + cpu: "50m" + volumes: + - name: glance-config + configMap: + name: glance-config + - name: glance-assets + configMap: + name: glance-config + - name: docker-socket + hostPath: + path: /var/run/docker.sock + type: Socket + - name: localtime + hostPath: + path: /etc/localtime + type: File diff --git a/glance/k8s/ingress.yaml b/glance/k8s/ingress.yaml new file mode 100644 index 0000000..a989e30 --- /dev/null +++ b/glance/k8s/ingress.yaml @@ -0,0 +1,49 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: glance-prod + namespace: glance +spec: + entryPoints: + - websecure + routes: + - match: Host(`forust.xyz`) + kind: Rule + middlewares: + - name: glance-strupprefix + services: + - name: glance-service + port: 8080 + tls: + certResolver: letsencrypt +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: glance-local + namespace: glance +spec: + entryPoints: + - websecure + routes: + - match: Host(`glance.workstation.internal`) + kind: Rule + services: + - name: glance-service + port: 8080 + +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: glance-dev + namespace: glance +spec: + entryPoints: + - websecure + routes: + - match: Host(`glance.gigaforust.internal`) + kind: Rule + services: + - name: glance-service + port: 8080 diff --git a/glance/k8s/namespace.yaml b/glance/k8s/namespace.yaml new file mode 100644 index 0000000..1dae605 --- /dev/null +++ b/glance/k8s/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: glance