Forecastle is a control panel which dynamically discovers and provides a launchpad to access applications deployed on Kubernetes – [✩Star] if you're using it!
Forecastle gives you access to a control panel where you can see your running applications and access them on Kubernetes.
You can deploy Forecastle both using vanilla k8s manifests or helm charts.
kubectl apply -f https://raw.githubusercontent.com/stakater/Forecastle/master/deployments/kubernetes/forecastle.yaml
In the Forecastle configmap modify the
namespaceSelectorkey with a list of namespaces which you want Forecastle to watch. Refer to this for instructions.
And enjoy!
If you configured
helmon your cluster, you can deploy Forecastle via helm chart located under
deployments/kubernetes/chart/Forecastlefolder.
Forecastle looks for a specific annotations on ingresses.
| Annotation | Description | Required | | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | |
forecastle.stakater.com/expose| Add this with value
trueto the ingress of the app you want to show in Forecastle |
true| |
forecastle.stakater.com/icon| Icon/Image URL of the application; An icons/logos/images collection repo Icons |
false| |
forecastle.stakater.com/appName| A custom name for your application. Use if you don't want to use name of the ingress |
false| |
forecastle.stakater.com/group| A custom group name. Use if you want the application to show in a different group than the namespace it is running in |
false| |
forecastle.stakater.com/instance| A comma separated list of name/s of the forecastle instance/s where you want this application to appear. Use when you have multiple forecastle dashboards |
false| |
forecastle.stakater.com/url| A URL for the forecastle app (This will override the ingress URL). It MUST begin with a scheme i.e.,
http://or
https://|
false| |
forecastle.stakater.com/properties| A comma separate list of
key:valuepairs for the properties. This will appear as an expandable list for the app |
false| |
forecastle.stakater.com/network-restricted| Specify whether the app is network restricted or not (true or false) |
false|
Forecastle supports the following configuration options that can be modified by either ConfigMap or
values.yamlif you are using helm
| Field | Description | Default | Type | | :---------------: | :--------------------------------------------------------------------------------------------------------: | :---------------------: | ----------------- | | namespaceSelector | A fine grained namespace selector which uses a combination of hardcoded namespaces well as label selectors | any: true | NamespaceSelector | | headerBackground | Background color of the header (Specified in the CSS way) | null | string | | headerForeground | Foreground color of the header (Specified in the CSS way) | null | string | | title | Title for the forecastle dashboard | "Forecastle - Stakater" | string | | instanceName | Name of the forecastle instance | "" | string | | customApps | A list of custom apps that you would like to add to the forecastle instance | {} | []CustomApp | | crdEnabled | Enables or disables
ForecastleAppCRD | true | bool |
It is a selector for selecting namespaces either selecting all namespaces or a list of namespaces, or filtering namespaces through labels.
| Field | Description | Default | Type | | :-----------: | :-------------------------------------------------------------------------------------------: | :-----: | -------------------------------------------------------------------------------------------- | | any | Boolean describing whether all namespaces are selected in contrast to a list restricting them | false | bool | | labelSelector | Filter namespaces based on kubernetes metav1.LabelSelector type | null | metav1.LabelSelector | | matchNames | List of namespace names | null | []string |
Note: If you specify both
labelSelectorand
matchNames, forecastle will take a union of all namespaces matched and use them.
If you want to add any apps that are not exposed through ingresses or are external to the cluster, you can use the custom apps feature. You can pass an array of custom apps inside the config.
| Field | Description | Type | | ----------------- | ----------------------------------------- | ----------------- | | name | Name of the custom app | String | | icon | URL of the icon for the custom app | String | | url | URL of the custom app | String | | group | Group for the custom app | String | | properties | Additional Properties of the app as a map | map[string]string | | networkRestricted | Whether app is network restricted or not | bool |
You can now create custom resources to add apps to forecastle dynamically. This decouples the application configuration from Ingresses as well as forecastle config. You can create the custom resource
ForecastleApplike the following:
apiVersion: forecastle.stakater.com/v1alpha1 kind: ForecastleApp metadata: name: app-name spec: name: My Awesome App group: dev icon: https://icon-url url: http://app-url networkRestricted: "false" properties: Version: 1.0 instance: "" # Optional
Forecastle supports discovering URL's ForecastleApp CRD from the following resources:
The above type of resource that you want to discover URL from MUST exist in the same namespace as
ForecastleAppCR. Then you can add the following to the CR:
apiVersion: forecastle.stakater.com/v1alpha1 kind: ForecastleApp metadata: name: app-name spec: name: My Awesome App group: dev icon: https://icon-url urlFrom: # This is new ingressRef: name: my-app-ingress
The above CR will be picked up by forecastle and it will generate the App in the UI. This lets you bundle this custom resource with the app's helm chart which will make it a part of the deployment process.
Note: You have to enable CRD feature first if you have disabled it. You can do that by applying the CRD and specifying
crdEnabled: truein forecastle config. If you're using the helm chart then CRDs are installed with the chart.
An example of a config can be seen below
namespaceSelector: labelSelector: matchLabels: component: redis matchExpressions: - {key: tier, operator: In, values: [cache]} matchNames: - test title: headerBackground: headerForeground: "#ffffff" instanceName: "Hello" crdEnabled: false customApps: - name: Hello icon: http://hello url: http://helloicon group: Test properties: Version: 1.0
ForecastleAppfor adding custom apps
Yuou can run multiple instances of forecastle by just deploying them in a different namespace and provided a list of namespaces to look for ingresses. However, if you want flexibility over which applications to show in a specific instance regardless of the namespace, then you need to first configure forecastle instances to be a named instances. You can do that by setting
instanceNamein forecastle configuration. Once you have the named instances, you can add
forecastle.stakater.com/instanceannotation to your ingresses to control which application will show in which instance of forecastle. You can also specify multiple instances of forecastle for the same ingress so that it shows up in multiple dashboards. For example, you have 2 instances running named
dev-dashboardand
prod-dashboard. You can add this in the ingress's instance annotation
dev-dashboard,prod-dashboardand the ingress will come up in both dashboards.
Got a question? File a GitHub issue, or send us an email.
Join and talk to us on the #tools-imc channel for discussing Forecastle
Please use the issue tracker to report any bugs or file feature requests.
PRs are welcome. In general, we follow the "fork-and-pull" Git workflow.
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
View our closed Pull Requests.
Apache2 © Stakater
Forecastle is the section of the upper deck of a ship located at the bow forward of the foremast. This Forecastle will act as a control panel and show all your running applications on Kubernetes having a particular annotation.
Forecastleis maintained by Stakater. Like it? Please let us know at [email protected]
See our other projects or contact us in case of professional services and queries on [email protected]