Skip to content

Commit

Permalink
Add homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
MacroPower committed May 7, 2023
1 parent 7c6643a commit 4265e5e
Show file tree
Hide file tree
Showing 13 changed files with 137 additions and 2 deletions.
6 changes: 6 additions & 0 deletions applications/base/argocd/ingress.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@ ingress.new(
servicePort=80,
annotations=ingressAnnotations {
'traefik.ingress.kubernetes.io/router.middlewares': 'authentik-ak-outpost@kubernetescrd',
'gethomepage.dev/enabled': 'true',
'gethomepage.dev/name': 'Argo CD',
'gethomepage.dev/description': 'GitOps',
'gethomepage.dev/group': 'Cluster Management',
'gethomepage.dev/icon': 'argocd',
'gethomepage.dev/podSelector': '',
},
)
9 changes: 8 additions & 1 deletion applications/base/authentik/ingress.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ ingress.new(
host=ingressHost,
serviceName='authentik',
servicePort=80,
annotations=ingressAnnotations,
annotations=ingressAnnotations {
'gethomepage.dev/enabled': 'true',
'gethomepage.dev/name': 'Authentik',
'gethomepage.dev/description': 'Identity Provider',
'gethomepage.dev/group': 'Cluster Management',
'gethomepage.dev/icon': 'authentik',
'gethomepage.dev/podSelector': '',
},
)
6 changes: 6 additions & 0 deletions applications/base/goldilocks/ingress.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ ingress.new(
servicePort=80,
annotations=ingressAnnotations {
'traefik.ingress.kubernetes.io/router.middlewares': 'authentik-ak-outpost@kubernetescrd',
'gethomepage.dev/enabled': 'true',
'gethomepage.dev/name': 'Goldilocks',
'gethomepage.dev/description': 'Resource Recommendations',
'gethomepage.dev/group': 'Cluster Management',
'gethomepage.dev/icon': 'https://simpleicons.org/icons/saturn.svg',
'gethomepage.dev/podSelector': '',
},
)
9 changes: 8 additions & 1 deletion applications/base/grafana/ingress.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ ingress.new(
host=ingressHost,
serviceName='grafana',
servicePort=80,
annotations=ingressAnnotations,
annotations=ingressAnnotations {
'gethomepage.dev/enabled': 'true',
'gethomepage.dev/name': 'Grafana',
'gethomepage.dev/description': 'Dashboarding',
'gethomepage.dev/group': 'Observability',
'gethomepage.dev/icon': 'grafana',
'gethomepage.dev/podSelector': '',
},
)
14 changes: 14 additions & 0 deletions applications/base/homepage/application.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
local app = import '../../lib/app.libsonnet';
local ns = import 'namespace.libsonnet';

app.new(
name='homepage',
path='applications/base/homepage',
namespace=ns.metadata.name,
).withChart(
name='homepage',
repoURL='https://jameswynn.github.io/helm-charts',
targetRevision='1.2.0',
releaseName='homepage',
values='values.yaml'
)
21 changes: 21 additions & 0 deletions applications/base/homepage/ingress.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
local ingress = import '../../lib/ingress.libsonnet';
local ns = import 'namespace.libsonnet';

local ingressHost = std.extVar('ingressHost');
local ingressAnnotations = std.parseYaml(std.extVar('ingressAnnotations'));

ingress.new(
name='homepage-ingress',
namespace=ns.metadata.name,
host=ingressHost,
serviceName='homepage',
servicePort=3000,
annotations=ingressAnnotations {
'gethomepage.dev/enabled': 'true',
'gethomepage.dev/name': 'Homepage',
'gethomepage.dev/description': 'Homepage',
'gethomepage.dev/group': 'Apps',
'gethomepage.dev/icon': 'homepage',
'gethomepage.dev/podSelector': '',
},
)
4 changes: 4 additions & 0 deletions applications/base/homepage/main.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
local ns = import 'namespace.libsonnet';
local ingress = import 'ingress.libsonnet';

[ns] + ingress
6 changes: 6 additions & 0 deletions applications/base/homepage/namespace.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
local k = import '../../lib/k.libsonnet';

k.core.v1.namespace.new('homepage') +
k.core.v1.namespace.metadata.withAnnotationsMixin({
'linkerd.io/inject': 'enabled',
})
50 changes: 50 additions & 0 deletions applications/base/homepage/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
config:
bookmarks:
- Developer:
- Github:
- abbr: GH
href: https://github.com/

widgets:
- kubernetes:
cluster:
show: true
cpu: true
memory: true
showLabel: true
label: "cluster"
nodes:
show: true
cpu: true
memory: true
showLabel: true
- longhorn:
expanded: true
total: true
labels: true
nodes: true

kubernetes:
mode: cluster

settings:
showStats: true
layout:
Apps:
icon: mdi-apps
Observability:
icon: mdi-chart-bell-curve-cumulative
Cluster Management:
icon: mdi-tools

# The service account is necessary to allow discovery of other services
serviceAccount:
create: true
name: homepage

# This enables the service account to access the necessary resources
enableRbac: true

ingress:
main:
enabled: false
6 changes: 6 additions & 0 deletions applications/base/jaeger-aio/ingress.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ ingress.new(
servicePort=16686,
annotations=ingressAnnotations {
'traefik.ingress.kubernetes.io/router.middlewares': 'authentik-ak-outpost@kubernetescrd',
'gethomepage.dev/enabled': 'true',
'gethomepage.dev/name': 'Jaeger',
'gethomepage.dev/description': 'Tracing',
'gethomepage.dev/group': 'Observability',
'gethomepage.dev/icon': 'jaeger',
'gethomepage.dev/podSelector': '',
},
)
6 changes: 6 additions & 0 deletions applications/base/linkerd-viz/ingress.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ ingress.new(
servicePort=8084,
annotations=ingressAnnotations {
'traefik.ingress.kubernetes.io/router.middlewares': 'authentik-ak-outpost@kubernetescrd',
'gethomepage.dev/enabled': 'true',
'gethomepage.dev/name': 'Linkerd Viz',
'gethomepage.dev/description': 'Service Mesh Dashboard',
'gethomepage.dev/group': 'Observability',
'gethomepage.dev/icon': 'https://cncf-branding.netlify.app/img/projects/linkerd/icon/color/linkerd-icon-color.png',
'gethomepage.dev/podSelector': '',
},
)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../../base/homepage/application.libsonnet'
1 change: 1 addition & 0 deletions applications/environments/home/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ local apps = [
import 'external-secrets/application.libsonnet',
import 'goldilocks/application.libsonnet',
import 'grafana/application.libsonnet',
import 'homepage/application.libsonnet',
import 'inlets-client/application.libsonnet',
import 'jaeger-aio/application.libsonnet',
import 'jaeger-operator/application.libsonnet',
Expand Down

0 comments on commit 4265e5e

Please sign in to comment.