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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan
- [#262](https://github.com/kobsio/kobs/pull/262): [core] Rework variables handling in dashboards.
- [#263](https://github.com/kobsio/kobs/pull/263): [core] :warning: _Breaking change:_ :warning: Refactor `cluster` and `clusters` package.
- [#265](https://github.com/kobsio/kobs/pull/265): [applications] Improve tags support by allow users to filter applications by tags and showing tags on application page.
- [#269](https://github.com/kobsio/kobs/pull/269): [applications] :warning: _Breaking change:_ :warning: Improve topology graph, by allowing custom styles for applications.

## [v0.7.0](https://github.com/kobsio/kobs/releases/tag/v0.7.0) (2021-11-19)

Expand Down
11 changes: 6 additions & 5 deletions deploy/demo/bookinfo/productpage-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ spec:
namespace: kobs
- name: team-call-of-duty
namespace: kobs
dependencies:
- name: details
description: Get book information.
- name: reviews
description: Get book reviews.
topology:
dependencies:
- name: details
description: Get book information.
- name: reviews
description: Get book reviews.
preview:
title: Incoming Success Rate
plugin:
Expand Down
7 changes: 4 additions & 3 deletions deploy/demo/bookinfo/reviews-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ spec:
teams:
- name: team-resident-evil
namespace: kobs
dependencies:
- name: ratings
description: Get book ranking information.
topology:
dependencies:
- name: ratings
description: Get book ranking information.
preview:
title: Incoming Success Rate
plugin:
Expand Down
15 changes: 8 additions & 7 deletions deploy/demo/elastic-system/elasticsearch-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ spec:
link: https://github.com/elastic/elasticsearch
- title: Application CR
link: https://github.com/kobsio/kobs/blob/main/deploy/demo/elastic-system/elasticsearch-application.yaml
dependencies:
- name: elastic-operator
namespace: elastic-system
description: The Elasticsearch Cluster is managed by the Elastic Operator
- name: filebeat
namespace: elastic-system
description: Filebeat is responsible for sending the Logs of all Containers to Elasticsearch
topology:
dependencies:
- name: elastic-operator
namespace: elastic-system
description: The Elasticsearch Cluster is managed by the Elastic Operator
- name: filebeat
namespace: elastic-system
description: Filebeat is responsible for sending the Logs of all Containers to Elasticsearch
preview:
title: All Logs
plugin:
Expand Down
9 changes: 5 additions & 4 deletions deploy/demo/elastic-system/filebeat-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ spec:
link: https://github.com/elastic/beats
- title: Application CR
link: https://github.com/kobsio/kobs/blob/main/deploy/demo/elastic-system/filebeat-application.yaml
dependencies:
- name: elastic-operator
namespace: elastic-system
description: Filebeat is managed by the Elastic Operator
topology:
dependencies:
- name: elastic-operator
namespace: elastic-system
description: Filebeat is managed by the Elastic Operator
preview:
title: All Logs
plugin:
Expand Down
21 changes: 11 additions & 10 deletions deploy/demo/kobs/base/kobs-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ spec:
link: https://github.com/kobsio/kobs
- title: Application CR
link: https://github.com/kobsio/kobs/blob/main/deploy/demo/kobs/kobs-application.yaml
dependencies:
- name: elasticsearch
namespace: elastic-system
description: Elasticsearch is used to get logs for the services.
- name: jaeger
namespace: istio-system
description: Jaeger is used to get traces for the services.
- name: prometheus
namespace: istio-system
description: Elasticsearch is used to get metrics for the services.
topology:
dependencies:
- name: elasticsearch
namespace: elastic-system
description: Elasticsearch is used to get logs for the services.
- name: jaeger
namespace: istio-system
description: Jaeger is used to get traces for the services.
- name: prometheus
namespace: istio-system
description: Elasticsearch is used to get metrics for the services.
preview:
title: All Logs
plugin:
Expand Down
6 changes: 4 additions & 2 deletions deploy/docker/kobs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ plugins:
- secrets

applications:
topologyCacheDuration: 1m
teamsCacheDuration: 1m
cache:
topologyDuration: 1m
teamsDuration: 1m
tagsDuration: 1m

prometheus:
- name: prometheus
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/kobs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ description: Kubernetes Observability Platform
type: application
home: https://kobs.io
icon: https://kobs.io/assets/images/logo.svg
version: 0.8.4
version: 0.9.0
appVersion: v0.7.0
35 changes: 20 additions & 15 deletions deploy/helm/kobs/crds/kobs.io_applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,6 @@ spec:
- title
type: object
type: array
dependencies:
items:
properties:
cluster:
type: string
description:
type: string
name:
type: string
namespace:
type: string
required:
- name
type: object
type: array
description:
type: string
links:
Expand Down Expand Up @@ -192,6 +177,26 @@ spec:
- name
type: object
type: array
topology:
properties:
dependencies:
items:
properties:
cluster:
type: string
description:
type: string
name:
type: string
namespace:
type: string
required:
- name
type: object
type: array
type:
type: string
type: object
type: object
type: object
served: true
Expand Down
35 changes: 20 additions & 15 deletions deploy/kustomize/crds/kobs.io_applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,6 @@ spec:
- title
type: object
type: array
dependencies:
items:
properties:
cluster:
type: string
description:
type: string
name:
type: string
namespace:
type: string
required:
- name
type: object
type: array
description:
type: string
links:
Expand Down Expand Up @@ -192,6 +177,26 @@ spec:
- name
type: object
type: array
topology:
properties:
dependencies:
items:
properties:
cluster:
type: string
description:
type: string
name:
type: string
namespace:
type: string
required:
- name
type: object
type: array
type:
type: string
type: object
type: object
type: object
served: true
Expand Down
34 changes: 28 additions & 6 deletions docs/plugins/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,42 @@ The applications plugin allows you to show a list of application on a dashboard.

## Configuration

The following configuration can be used to configure the cache duration for applications.
The following configuration can be used to configure the cache duration for applications and to customize the topology graph.

```yaml
plugins:
applications:
topologyCacheDuration: 5m
teamsCacheDuration: 5m
cache:
topologyDuration: 5m
teamsDuration: 5m
tagsDuration: 5m
topology:
- type: custom
shape: round-diamond
color: "#c9190b"

```

| Field | Type | Description | Required |
| ----- | ---- | ----------- | -------- |
| topologyCacheDuration | [duration](https://pkg.go.dev/time#ParseDuration) | The duration for how long the topology graph should be cached. The default value is `1h`. | No |
| teamsCacheDuration | [duration](https://pkg.go.dev/time#ParseDuration) | The duration for how long the teams for an application should be cached. The default value is `1h`. | No |
| tagsCacheDuration | [duration](https://pkg.go.dev/time#ParseDuration) | The duration for how long the tags for all applications should be cached. The default value is `1h`. | No |
| cache | [Cache](#cache) | Customize the caching behaviour for applications. | No |
| topology | [[]Topology](#topology) | Add custom node types for the topology graph, which can then selected in the Applications CRs via the `topology.type` option. | No |

### Cache

| Field | Type | Description | Required |
| ----- | ---- | ----------- | -------- |
| topologyDuration | [duration](https://pkg.go.dev/time#ParseDuration) | The duration for how long the topology graph should be cached. The default value is `1h`. | No |
| teamsDuration | [duration](https://pkg.go.dev/time#ParseDuration) | The duration for how long the teams for an application should be cached. The default value is `1h`. | No |
| tagsDuration | [duration](https://pkg.go.dev/time#ParseDuration) | The duration for how long the tags for all applications should be cached. The default value is `1h`. | No |

### Topology

| Field | Type | Description | Required |
| ----- | ---- | ----------- | -------- |
| type | string | The name of the node type. The node type can be selected via the `topology.type` field in the Application CRs. | No |
| color | string | A color for the node in the topology chart. Every CSS color code is allowed, but we recommend to use an color from [Patternfly](https://www.patternfly.org/v4/guidelines/colors), so the topology graph matches the overall style of kobs. The default value is `#0066cc`. | No |
| shape | string | The shape of the node in the topology chart. Allowed values are `rectangle`, `roundrectangle`, `ellipse`, `triangle`, `pentagon`, `hexagon`, `heptagon`, `octagon`, `star`, `barrel`, `diamond`, `vee`, `rhomboid`, `polygon`, `tag`, `round-rectangle`, `round-triangle`, `round-diamond`, `round-pentagon`, `round-hexagon`, `round-heptagon`, `round-octagon`, `round-tag`, `cut-rectangle`, `bottom-round-rectangle` and `concave-hexagon`. The default value is `roundrectangle`. | No |

## Options

Expand Down
16 changes: 12 additions & 4 deletions docs/resources/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In the following you can found the specification for the Application CRD. On the
| tags | []string | A list of tags to describe the application. | No |
| links | [[]Link](#link) | A list of links (e.g. a link to the GitHub repository for this application). | No |
| teams | [[]Team](#team) | A list of teams to define the ownership for the application. | No |
| dependencies | [[]Dependency](#dependency) | Add other applications as dependencies for this application. This can be used to render a topology graph for your applications. | No |
| topology | [Topology](#topology) | Set the topology settings for your application like the type in the topology graph and dependencies to other applications. | No |
| preview | [Preview](#preview) | Show the most important metrics for your application in the gallery view. | No |
| dashboards | [[]Dashboard](#dashboard) | A list of dashboards, which should be shown for this application. | No |

Expand All @@ -44,6 +44,13 @@ Teams can be used to define the ownership for an application. It is also possibl
| name | string | Name of the team. | Yes |
| description | string | The description can be used to explain, why this team is the owner of the application. | No |

### Topology

| Field | Type | Description | Required |
| ----- | ---- | ----------- | -------- |
| type | string | The type of the application in the topology graph. This must be a node type as specified in the `topology` key in the [configuration](../plugins/applications#configuration). The default value is `application`. | No |
| dependencies | [[]Dependency](#dependency) | Add other applications as dependencies for this application. This can be used to render a topology graph for your applications. | No |

### Dependency

Dependencies can be used to render a topology graph for all your applications. For that your have to add other applications as dependencies to the Application CR.
Expand Down Expand Up @@ -110,9 +117,10 @@ spec:
teams:
- name: squad-resident-evil
namespace: kobs
dependencies:
- name: ratings
description: Get book ranking information.
topology:
dependencies:
- name: ratings
description: Get book ranking information.
preview:
title: Incoming Success Rate
plugin:
Expand Down
25 changes: 15 additions & 10 deletions pkg/api/apis/application/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,28 @@ type ApplicationList struct {
}

type ApplicationSpec struct {
Cluster string `json:"cluster,omitempty"`
Namespace string `json:"namespace,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Links []Link `json:"links,omitempty"`
Teams []Reference `json:"teams,omitempty"`
Dependencies []Reference `json:"dependencies,omitempty"`
Preview *Preview `json:"preview,omitempty"`
Dashboards []dashboard.Reference `json:"dashboards,omitempty"`
Cluster string `json:"cluster,omitempty"`
Namespace string `json:"namespace,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Links []Link `json:"links,omitempty"`
Teams []Reference `json:"teams,omitempty"`
Topology Topology `json:"topology,omitempty"`
Preview *Preview `json:"preview,omitempty"`
Dashboards []dashboard.Reference `json:"dashboards,omitempty"`
}

type Link struct {
Title string `json:"title"`
Link string `json:"link"`
}

type Topology struct {
Type string `json:"type,omitempty"`
Dependencies []Reference `json:"dependencies,omitempty"`
}

type Reference struct {
Cluster string `json:"cluster,omitempty"`
Namespace string `json:"namespace,omitempty"`
Expand Down
27 changes: 22 additions & 5 deletions pkg/api/apis/application/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading