- Notifications
You must be signed in to change notification settings - Fork0
This is an optional extension application for O-Neko. Its purpose is to be used as a default backend / default ingress for stopped O-Neko deployments to start them when opened with their hostname.
License
subshell/o-neko-catnip
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is an optional extension application forO-Neko. Its purpose is to be used as a default backend / default ingressfor stopped O-Neko deployments. It will then try to start the deployment with the URL it has been loaded with and will then redirect the user to the deploymentonce it started.
Assuming you have multiple projects in O-Neko with many engineers working on these projects. A lot of O-Neko controlled deployments may be created in a shorttime. To save on infrastructure costs you might configure O-Neko to stop deployments in the evening or when a week ends. Yet, the features or bugfixes thesedeployments are associated with may still be in development. Assuming further that you link to those deployments from your ticketing system like Jira or Trello,GitLab, GitHub (etc.), you will quickly have "dead links" as a result of the automatic stopping of those deployments.
Now let's imagine that the testing for a feature begins on a monday morning. The deployment was stopped on friday night and now the engineer doing the testsclicks on the link in their ticket, unaware it might be a "dead" link. This is where this tool kicks in. If it is configured to be the default backend in yourKubernetes cluster (e.g. for a specific subset of URLs), it will instruct O-Neko to start the deployment and host a simple website (see the screenshot above)informing the visitor that the corresponding deployment is about to start. When the actual deployment is ready to receive requests, the user will automaticallybe redirected to the desired frontend.
The application requires little configuration - only the O-Neko base-URL, the default URL of O-Neko Catnip as well a username and password need to be configured. It can be configured by placinganapplication.yaml file next to the executable or in aconfig directory next to the executable. The structure of the configuration file is:
oneko:api:baseUrl:auth:username:password:catnipUrl:server:port:8080metricsPort:8080logging:level:
All properties can be set using environment variables without a configuration file. This should be preferred, especially when it comes to the user'scredentials!The environment variables have the same names as the properties in the YAML file but capitalized with underscores as a separator, e.g.ONEKO_API_AUTH_PASSWORDorONEKO_API_BASEURL.
This tool will only trigger wake-ups of deployments when receiving GET requests. Other request types will not result in a wake-up.
Application metrics are available at the/metrics endpoint in the Prometheus format.
Ideally you're able to deploy this application to Kubernetes and have a running O-Neko test instance at hand to connect this tool to.
To build this tool some tooling is required. Other tools might be interesting but are optional and mainly used in CI.
- Go >=1.21
- Docker
- Make
- UPX
- gotestsum: We use it to run our tests in CI
- golangci-lint: Used for linting
Take a look at this project from thesubshell team. We makeSophora: a content management software for content creation, curation, and distribution.Join our team! |Imprint
About
This is an optional extension application for O-Neko. Its purpose is to be used as a default backend / default ingress for stopped O-Neko deployments to start them when opened with their hostname.
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.
