Homer-k8s
Homer is a static home page that gathers links to your services, described in a single YAML file. Homer-k8s is the Kubernetes controller that makes that page dynamic: you declare your services in CRDs, and Homer’s configuration is regenerated and reloaded on every change.
| Role | Kubernetes controller generating a Homer dashboard from CRDs |
| Stack | Go · controller-runtime |
| License | Apache-2.0 |
| Image | bananaops/homer-k8s |
| Helm chart | bananaops.github.io/homer-k8s/ |
| Repository | BananaOps/homer-k8s · releases |
Features
Section titled “Features”HomerServicesCRDs to declare services from your manifests- Helm chart that deploys Homer and its controller
- Homer configuration in the chart values
- EC2 discovery: automatically adds a page listing your AWS instances
- Multi-architecture: amd64 and arm64
- Smart cards: support for Homer’s custom services
Prerequisites
Section titled “Prerequisites”Installation
Section titled “Installation”helm repo add bananaops https://bananaops.github.io/homer-k8s/helm repo update bananaops
# Install with default valueshelm install homer bananaops/homer-k8sTo customise:
wget https://raw.githubusercontent.com/bananaops/homer-k8s/main/helm/homer-k8s/values.yaml# edit values.yamlhelm install homer bananaops/homer-k8s -f values.yamlDeclaring services
Section titled “Declaring services”The services shown on the dashboard are described by HomerServices resources.
Each group becomes a section of the page.
apiVersion: homer.bananaops.io/v1alpha1kind: HomerServicesmetadata: labels: app.kubernetes.io/name: homer-k8s name: homerservices-samplespec: groups: - name: ci icon: "fas fa-code-branch" items: - name: "Awesome app" logo: "assets/tools/sample.png" icon: "fab fa-jenkins" subtitle: "Bookmark example" tag: "app" tagstyle: "is-success" keywords: "self hosted reddit" # optional, used by search url: "https://www.reddit.com/r/selfhosted/" target: "_blank" # optional - name: "Another one" logo: "assets/tools/sample.png" subtitle: "Another application" tag: "app" tagstyle: "is-success" url: "#"kubectl apply -f homerservices-sample.yamlThe controller picks up the resource, regenerates the configuration and reloads Homer.
Configuration
Section titled “Configuration”Helm values
Section titled “Helm values”image: repository: bananaops/homer-k8s pullPolicy: IfNotPresent tag: ""
serviceAccount: create: true annotations: {}
rbac: create: true scope: false # true to restrict the controller to its namespace
service: type: ClusterIP port: 8080
ingress: enabled: false className: "" hosts: - host: homer-k8s.local paths: - path: / pathType: ImplementationSpecific tls: []
resources: limits: cpu: 250m memory: 128MiEC2 discovery
Section titled “EC2 discovery”This feature walks the AWS account and fills an ec2.yml page with, for each
instance, its IP and a link to its page in the AWS console.
-
Create the IAM policy allowing instances to be described
{"Version": "2012-10-17","Statement": [{"Action": "ec2:DescribeInstances","Effect": "Allow","Resource": "*"}]} -
Enable the feature in the values
env:- name: HOMER_EC2_ENABLEDvalue: "true" -
Attach the IAM role to the ServiceAccount (on EKS)
serviceAccount:create: trueannotations:eks.amazonaws.com/role-arn: arn:aws:iam::{{ AWS_ACCOUNT }}:role/{{ AWS_ROLE }}
Development
Section titled “Development”# Build (binary in bin/)skaffold build
# Update generated manifestsmake manifest
# Deploy to the current cluster (adjust skaffold.yaml first)skaffold runSupport
Section titled “Support”- GitHub issues — see the help wanted issues
- Contribution guide