Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions k8s/bases/apps/homepage/config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ data:
icon: mdi-briefcase-account
Personal:
icon: mdi-web
# Temporary compatibility while tenant discovery annotations migrate.
Personal Sites:
icon: mdi-web
Customer Sites:
icon: mdi-briefcase-account
# Bookmark groups (bookmarks.yaml). Listing them here is what gives them a
# real icon and a deterministic position; unlisted groups fall back to
# alphabetical with a generic icon, which is why the bookmark rail used to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ spec:
layout (k8s/bases/apps/homepage/config-map.yaml): Internal Developer
Platform, Kubernetes, Observability, Security, Diagnostics, Device
Management, Infrastructure as Code, Cloud, Network, Home 🏡, Finance,
Analytics, Business, Clients, Personal, Personal Sites, or Customer Sites.
The two legacy site groups remain accepted during the tenant migration.
Analytics, Business, Clients, or Personal.
An undeclared group still renders,
but sorts below every declared group with a generic icon. Bookmark
group names are deliberately not accepted here.
Expand All @@ -118,5 +117,3 @@ spec:
- Business
- Clients
- Personal
- Personal Sites
- Customer Sites
6 changes: 5 additions & 1 deletion tests/restrict-homepage-service-groups/kyverno-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@ results:
resources:
- observability/declared-group
- crossview/infrastructure-as-code-group
- client-site/clients-group
- personal-site/personal-group
- whoami/home-group
kind: HTTPRoute
result: pass

# --- undeclared, missing, bookmark-named and mis-cased groups are denied ---
# --- undeclared, missing, bookmark-named, mis-cased and retired groups are denied ---
- policy: restrict-homepage-service-groups
rule: declared-service-group
resources:
- doggy-countdown/undeclared-group
- whoami/missing-group
- whoami/bookmark-group-name
- whoami/wrong-case-group
- client-site/retired-customer-sites-group
- personal-site/retired-personal-sites-group
kind: HTTPRoute
result: fail

Expand Down
53 changes: 52 additions & 1 deletion tests/restrict-homepage-service-groups/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ metadata:
namespace: whoami
annotations:
gethomepage.dev/enabled: "true"
gethomepage.dev/group: personal sites
gethomepage.dev/group: personal
spec:
hostnames:
- case.platform.devantler.tech
Expand Down Expand Up @@ -133,3 +133,54 @@ metadata:
spec:
rules:
- host: ingress.platform.devantler.tech
---
# The site groups tenant routes use today.
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: clients-group
namespace: client-site
annotations:
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Clients
spec:
hostnames:
- client.platform.devantler.tech
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: personal-group
namespace: personal-site
annotations:
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Personal
spec:
hostnames:
- personal.platform.devantler.tech
---
# The two headings the site groups replaced. They were accepted only while
# tenant routes migrated, and the layout no longer declares them.
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: retired-customer-sites-group
namespace: client-site
annotations:
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Customer Sites
spec:
hostnames:
- retired-client.platform.devantler.tech
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: retired-personal-sites-group
namespace: personal-site
annotations:
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Personal Sites
spec:
hostnames:
- retired-personal.platform.devantler.tech
Loading