Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Nov 24, 2024
2 parents ba5e6de + 5697253 commit 1656f02
Show file tree
Hide file tree
Showing 62 changed files with 1,307 additions and 176 deletions.
35 changes: 10 additions & 25 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ on:
merge_group:

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

Expand Down Expand Up @@ -66,14 +64,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.13.1' # optional

# Setup QEMU
# https://github.com/marketplace/actions/docker-setup-buildx#with-qemu
- name: Setup QEMU
Expand All @@ -99,17 +89,25 @@ jobs:
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: |
${{ env.IMAGE_NAME }}
ghcr.io/${{ env.IMAGE_NAME }}
flavor: |
latest=auto
Expand All @@ -133,19 +131,6 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
# - name: Sign the published Docker image
# if: ${{ github.event_name != 'pull_request' }}
# env:
# COSIGN_EXPERIMENTAL: "true"
# # This step uses the identity token to provision an ephemeral certificate
# # against the sigstore community Fulcio instance.
# run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/reaction-comments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Reaction Comments'

on:
issue_comment:
types: [created, edited]
pull_request_review_comment:
types: [created, edited]
schedule:
- cron: '0 0 * * *'

permissions:
actions: write
issues: write
pull-requests: write

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/reaction-comments@v4
2 changes: 2 additions & 0 deletions docs/configs/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ If you are using multiple instances of homepage, an `instance` annotation can be

If you have a single service that needs to be shown on multiple specific instances of homepage (but not on all of them), the service can be annotated by multiple `instance.name` annotations, where `name` can be the names of your specific multiple homepage instances. For example, a service that is annotated with `gethomepage.dev/instance.public: ""` and `gethomepage.dev/instance.internal: ""` will be shown on `public` and `internal` homepage instances.

Use the `gethomepage.dev/pod-selector` selector to specify the pod used for the health check. For example, a service that is annotated with `gethomepage.dev/pod-selector: app.kubernetes.io/name=deployment` would link to a pod with the label `app.kubernetes.io/name: deployment`.

### Traefik IngressRoute support

Homepage can also read ingresses defined using the Traefik IngressRoute custom resource definition. Due to the complex nature of Traefik routing rules, it is required for the `gethomepage.dev/href` annotation to be set:
Expand Down
2 changes: 1 addition & 1 deletion docs/widgets/authoring/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Homepage provides a set of common translations that you can use in your widgets.
| `common.ms` | `1,000 ms` | Format a number in milliseconds. |
| `common.date` | `2024-01-01` | Format a date. |
| `common.relativeDate` | `1 day ago` | Format a relative date. |
| `common.uptime` | `1 day, 1 hour` | Format an uptime. |
| `common.duration` | `1 day, 1 hour` | Format an duration. |

### Text

Expand Down
6 changes: 5 additions & 1 deletion docs/widgets/info/unifi_controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ description: Unifi Controller Information Widget Configuration

_(Find the Unifi Controller service widget [here](../services/unifi-controller.md))_

You can display general connectivity status from your Unifi (Network) Controller. When authenticating you will want to use a local account that has at least read privileges.
You can display general connectivity status from your Unifi (Network) Controller.

!!!

When authenticating you will want to use a local account that has at least read privileges.

An optional 'site' parameter can be supplied, if it is not the widget will use the default site for the controller.

Expand Down
33 changes: 33 additions & 0 deletions docs/widgets/services/argocd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: ArgoCD
description: ArgoCD Widget Configuration
---

Learn more about [ArgoCD](https://argo-cd.readthedocs.io/en/stable/).

Allowed fields (limited to a max of 4): `["apps", "synced", "outOfSync", "healthy", "progressing", "degraded", "suspended", "missing"]`

```yaml
widget:
type: argocd
url: http://argocd.host.or.ip:port
key: argocdapikey
```
You can generate an API key either by creating a bearer token for an existing account, see [Authorization](https://argo-cd.readthedocs.io/en/latest/developer-guide/api-docs/#authorization) (not recommended) or create a new local user account with limited privileges and generate an authentication token for this account. To do this the steps are:
- [Create a new local user](https://argo-cd.readthedocs.io/en/stable/operator-manual/user-management/#create-new-user) and give it the `apiKey` capability
- Setup [RBAC configuration](https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/#rbac-configuration) for your the user and give it readonly access to your ArgoCD resources, e.g. by giving it the `role:readonly` role.
- In your ArgoCD project under _Settings / Accounts_ open the newly created account and in the _Tokens_ section click on _Generate New_ to generate an access token, optionally specifying an expiry date.

If you installed ArgoCD via the official Helm chart, the account creation and rbac config can be achived by overriding these helm values:

```yaml
configs:
cm:
accounts.readonly: apiKey
rbac:
policy.csv: "g, readonly, role:readonly"
```

This creates a new account called `readonly` and attaches the `role:readonly` role to it.
22 changes: 22 additions & 0 deletions docs/widgets/services/beszel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Beszel
description: Beszel Widget Configuration
---

Learn more about [Beszel](https://github.com/henrygd/beszel)

The widget has two modes, a single system with detailed info if `systemId` is provided, or an overview of all systems if `systemId` is not provided.

The `systemID` in the `id` field on the collections page of Beszel.

Allowed fields for 'overview' mode: `["systems", "up"]`
Allowed fields for a single system: `["name", "status", "updated", "cpu", "memory", "disk", "network"]`

```yaml
widget:
type: beszel
url: http://beszel.host.or.ip
username: username # email
password: password
systemId: systemId # optional
```
20 changes: 20 additions & 0 deletions docs/widgets/services/gitlab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Gitlab
description: Gitlab Widget Configuration
---

Learn more about [Gitlab](https://gitlab.com).

API requires a personal access token with either `read_api` or `api` permission. See the [gitlab documentation](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token) for details on generating one.

Your Gitlab user ID can be found on [your profile page](https://support.circleci.com/hc/en-us/articles/20761157174043-How-to-find-your-GitLab-User-ID).

Allowed fields: `["events", "issues", "merges", "projects"]`.

```yaml
widget:
type: gitlab
url: http://gitlab.host.or.ip:port
key: personal-access-token
user_id: 123456
```
19 changes: 19 additions & 0 deletions docs/widgets/services/headscale.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Headscale
description: Headscale Widget Configuration
---

Learn more about [Headscale](https://headscale.net/).

You will need to generate an API access token from the [command line](https://headscale.net/ref/remote-cli/#create-an-api-key) using `headscale apikeys create` command.

To find your node ID, you can use `headscale nodes list` command.

Allowed fields: `["name", "address", "last_seen", "status"]`.

```yaml
widget:
type: headscale
nodeId: nodeid
key: headscaleapiaccesstoken
```
5 changes: 5 additions & 0 deletions docs/widgets/services/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ search:
You can also find a list of all available service widgets in the sidebar navigation.

- [Adguard Home](adguard-home.md)
- [ArgoCD](argocd.md)
- [Atsumeru](atsumeru.md)
- [Audiobookshelf](audiobookshelf.md)
- [Authentik](authentik.md)
- [Autobrr](autobrr.md)
- [Azure DevOps](azuredevops.md)
- [Bazarr](bazarr.md)
- [Beszel](beszel.md)
- [Caddy](caddy.md)
- [Calendar](calendar.md)
- [Calibre-Web](calibre-web.md)
Expand All @@ -39,11 +41,13 @@ You can also find a list of all available service widgets in the sidebar navigat
- [Gatus](gatus.md)
- [Ghostfolio](ghostfolio.md)
- [Gitea](gitea.md)
- [Gitlab](gitlab.md)
- [Glances](glances.md)
- [Gluetun](gluetun.md)
- [Gotify](gotify.md)
- [Grafana](grafana.md)
- [HDHomeRun](hdhomerun.md)
- [Headscale](headscale.md)
- [Healthchecks](healthchecks.md)
- [Home Assistant](homeassistant.md)
- [HomeBox](homebox.md)
Expand Down Expand Up @@ -96,6 +100,7 @@ You can also find a list of all available service widgets in the sidebar navigat
- [Plex](plex.md)
- [Portainer](portainer.md)
- [Prometheus](prometheus.md)
- [Prometheus Metric](prometheusmetric.md)
- [Prowlarr](prowlarr.md)
- [Proxmox](proxmox.md)
- [Proxmox Backup Server](proxmoxbackupserver.md)
Expand Down
67 changes: 67 additions & 0 deletions docs/widgets/services/prometheusmetric.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Prometheus Metric
description: Prometheus Metric Widget Configuration
---

Learn more about [Querying Prometheus](https://prometheus.io/docs/prometheus/latest/querying/basics/).

This widget can show metrics for your service defined by PromQL queries which are requested from a running Prometheus instance.

Quries can be defined in the `metrics` array of the widget along with a label to be used to present the metric value. You can optionally specify a global `refreshInterval` in milliseconds and/or define the `refreshInterval` per metric. Inside the optional `format` object of a metric various formatting styles and transformations can be applied (see below).

```yaml
widget:
type: prometheusmetric
url: https://prometheus.host.or.ip
refreshInterval: 10000 # optional - in milliseconds, defaults to 10s
metrics:
- label: Metric 1
query: alertmanager_alerts{state="active"}
- label: Metric 2
query: apiserver_storage_size_bytes{node="mynode"}
format:
type: bytes
- label: Metric 3
query: avg(prometheus_notifications_latency_seconds)
format:
type: number
suffix: s
options:
maximumFractionDigits: 4
- label: Metric 4
query: time()
refreshInterval: 1000 # will override global refreshInterval
format:
type: date
scale: 1000
options:
timeStyle: medium
```
## Formatting
Supported values for `format.type` are `text`, `number`, `percent`, `bytes`, `bits`, `bbytes`, `bbits`, `byterate`, `bibyterate`, `bitrate`, `bibitrate`, `date`, `duration`, `relativeDate`, and `text` which is the default.

The `dateStyle` and `timeStyle` options of the `date` format are passed directly to [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) and the `style` and `numeric` options of `relativeDate` are passed to [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). For the `number` format, options of [Intl.NumberFormat](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) can be used, e.g. `maximumFractionDigits` or `minimumFractionDigits`.

### Data Transformation

You can manipulate your metric value with the following tools: `scale`, `prefix` and `suffix`, for example:

```yaml
- query: my_custom_metric{}
label: Metric 1
format:
type: number
scale: 1000 # multiplies value by a number or fraction string e.g. 1/16
- query: my_custom_metric{}
label: Metric 2
format:
type: number
prefix: "$" # prefixes value with given string
- query: my_custom_metric{}
label: Metric 3
format:
type: number
suffix: "€" # suffixes value with given string
```
15 changes: 15 additions & 0 deletions docs/widgets/services/spoolman.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Spoolman
description: Spoolman Widget Configuration
---

Learn more about [Spoolman](https://github.com/Donkie/Spoolman).

4 spools are displayed by default. If more than 4 spools are configured in spoolman you can use the spoolIds configuration option to control which are displayed.

```yaml
widget:
type: spoolman
url: http://spoolman.host.or.ip
spoolIds: [1, 2, 3, 4] # optional
```
20 changes: 20 additions & 0 deletions docs/widgets/services/suwayomi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Suwayomi
description: Suwayomi Widget Configuration
---

Learn more about [Suwayomi](https://github.com/Suwayomi/Suwayomi-Server).

Allowed fields: ["download", "nondownload", "read", "unread", "downloadedread", "downloadedunread", "nondownloadedread", "nondownloadedunread"]

The widget defaults to the first four above. If more than four fields are provided, only the first 4 are displayed.
Category IDs can be obtained from the url when navigating to it, `?tab={categoryID}`.

```yaml
widget:
type: suwayomi
url: http://suwayomi.host.or.ip
username: username #optional
password: password #optional
category: 0 #optional, defaults to all categories
```
6 changes: 5 additions & 1 deletion docs/widgets/services/unifi-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ Learn more about [Unifi Controller](https://ui.com/).

_(Find the Unifi Controller information widget [here](../info/unifi_controller.md))_

You can display general connectivity status from your Unifi (Network) Controller. When authenticating you will want to use a local account that has at least read privileges.
You can display general connectivity status from your Unifi (Network) Controller.

!!!

When authenticating you will want to use a local account that has at least read privileges.

An optional 'site' parameter can be supplied, if it is not the widget will use the default site for the controller.

Expand Down
Loading

0 comments on commit 1656f02

Please sign in to comment.