Skip to content

Commit

Permalink
Added Subscription Busola UI, eventing default CRs and health+metrics…
Browse files Browse the repository at this point in the history
… service (#121)

* Update kustomize files

* updated default CR
  • Loading branch information
mfaizanse authored Oct 5, 2023
1 parent 7e5da78 commit 018011a
Show file tree
Hide file tree
Showing 9 changed files with 214 additions and 15 deletions.
149 changes: 149 additions & 0 deletions config/busola/busola-extension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: subscriptions
namespace: kube-public
labels:
app.kubernetes.io/name: subscriptions
busola.io/extension: resource
busola.io/extension-version: '0.5'
data:
general: |-
resource:
kind: Subscription
group: eventing.kyma-project.io
version: v1alpha2
name: Subscriptions
category: Configuration
scope: namespace
description: >-
{{"{{[Subscription](https://kyma-project.io/docs/kyma/latest/05-technical-reference/00-custom-resources/evnt-01-subscription#documentation-content)}}"}} is used to subscribe to events.
urlPath: subscriptions
details: |-
header:
- name: status.conditions.status
source: 'status.ready = false ? "error" : "ready"'
widget: Badge
description: status.conditions.message
- name: spec.typeMatching
source: spec.typeMatching
- name: spec.source
source: spec.source
- name: spec.sink
source: spec.sink
widget: ResourceLink
resource:
name: '$substringBefore($substringAfter(spec.sink, "http://"), ".")'
namespace: $root.metadata.namespace
kind: "'Service'"
body:
- source: status.conditions
widget: Table
name: status.conditions
children:
- source: '$item.type'
name: status.conditions.type
- source: '$item.status'
widget: Badge
name: status.conditions.status
- source: '$item.reason'
name: status.conditions.reason
- source: '$item.message'
name: status.conditions.message
- source: '$readableTimestamp($item.lastTransitionTime)'
name: status.conditions.lastTransitionTime
- name: spec.types
source: spec.types
widget: Table
children:
- name: Type
search: true
source: '$item'
sort: false
- widget: EventList
filter: "$matchEvents($$, $root.kind, $root.metadata.name)"
name: events
defaultType: NORMAL
hideInvolvedObjects: true
form: |-
- path: spec.config
widget: KeyValuePair
defaultExpanded: false
- path: spec.types
simple: true
widget: SimpleList
defaultExpanded: true
children:
- path: '[]'
simple: true
- simple: true
type: string
var: service
name: Service
widget: Resource
resource:
kind: Service
version: v1
scope: namespace
trigger: [sink]
- path: spec.sink
name: spec.sink
simple: true
inputInfo: inputInfo.sink
placeholder: placeholder.sink
subscribe:
sink: '"http://" & $service & "." & $root.metadata.namespace & ".svc.cluster.local"'
- path: spec.typeMatching
simple: true
enum:
- standard
- exact
required: true
- path: spec.source
name: spec.source
simple: true
required: true
visibility: "spec.typeMatching = 'standard'"
widget: Resource
resource:
kind: Application
group: applicationconnector.kyma-project.io
version: v1alpha1
list: |-
- name: status.conditions.status
source: 'status.ready = false ? "error" : "ready"'
widget: Badge
description: status.conditions.message
presets: |-
- name: Default Type Matching
default: true
value:
spec:
typeMatching: standard
translations: |-
en:
inputInfo.sink: Sink structure, 'http://{SERVICE}.{NAMESPACE}.svc.cluster.local'
inputInfo.eventType: Event Type structure, 'sap.kyma.custom.{APP}.{EVENT.NAME}.{VERSION}'
events: Events
placeholder.eventType: Enter the event type, for example, sap.kyma.custom.test-app.order.cancelled.v1
placeholder.sink: Enter the sink, for example, http://service.default.svc.cluster.local
spec.filters: Filters
spec.filter.eventType: Event Type
spec.filter.eventSource: Event Source
spec.filter.event.property: Property
spec.filter.event.type: Type
spec.filter.event.value: Value
spec.types: Types
spec.source: Source
spec.typeMatching: Type Matching
spec.sink: Sink
spec.service: Service
spec.sink.controlledBy: Controlled By
status.cleanEventTypes: Event Types
status.conditions: Conditions
status.conditions.lastTransitionTime: Last Transition
status.conditions.reason: Reason
status.conditions.status: Status
status.conditions.type: Type
status.conditions.message: Message
status.type: Type
2 changes: 2 additions & 0 deletions config/busola/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- busola-extension.yaml
1 change: 1 addition & 0 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ resources:
- ../rbac
- ../manager
- ../webhook
- ../busola

# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
Expand Down
1 change: 1 addition & 0 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
resources:
- manager.yaml
- service.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
47 changes: 47 additions & 0 deletions config/manager/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
apiVersion: v1
kind: Service
metadata:
name: eventing-manager-metrics
labels:
control-plane: eventing-manager
app.kubernetes.io/name: eventing-manager
app.kubernetes.io/instance: eventing-manager
app.kubernetes.io/component: eventing-manager
annotations:
prometheus.io/scrape: "true"
prometheus.io/scheme: http
prometheus.io/port: "8080"
spec:
type: ClusterIP
selector:
control-plane: eventing-manager
app.kubernetes.io/name: eventing-manager
app.kubernetes.io/instance: eventing-manager
app.kubernetes.io/component: eventing-manager
ports:
- name: http-metrics
protocol: TCP
port: 80
targetPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: eventing-manager-health
labels:
control-plane: eventing-manager
app.kubernetes.io/name: eventing-manager
app.kubernetes.io/instance: eventing-manager
app.kubernetes.io/component: eventing-manager
spec:
type: ClusterIP
selector:
control-plane: eventing-manager
app.kubernetes.io/name: eventing-manager
app.kubernetes.io/instance: eventing-manager
app.kubernetes.io/component: eventing-manager
ports:
- name: http-status
protocol: TCP
port: 15020
targetPort: 15020
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ kind: Eventing
metadata:
labels:
app.kubernetes.io/name: eventing
app.kubernetes.io/instance: eventing-sample
app.kubernetes.io/instance: eventing
app.kubernetes.io/part-of: eventing-manager
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: eventing-manager
name: eventing
namespace: kyma-system
spec:
backend:
type: NATS
config:
eventTypePrefix: "sap.kyma.custom"
natsStreamStorageType: File
natsStreamReplicas: 3
natsStreamMaxSize: 700M
Expand All @@ -23,8 +23,8 @@ spec:
max: 2
resources:
limits:
cpu: 300m
memory: 312Mi
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 156Mi
cpu: 40m
memory: 64Mi
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ kind: Eventing
metadata:
labels:
app.kubernetes.io/name: eventing
app.kubernetes.io/instance: eventing-sample
app.kubernetes.io/instance: eventing
app.kubernetes.io/part-of: eventing-manager
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: eventing-manager
name: eventing
namespace: kyma-system
Expand All @@ -14,14 +13,15 @@ spec:
type: "EventMesh"
config:
eventMeshSecret: "kyma-system/eventing-backend"
eventTypePrefix: "sap.kyma.custom"
publisher:
replicas:
min: 2
max: 2
resources:
limits:
cpu: 300m
memory: 312Mi
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 156Mi
cpu: 40m
memory: 64Mi
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ kind: Eventing
metadata:
labels:
app.kubernetes.io/name: eventing
app.kubernetes.io/instance: eventing-sample
app.kubernetes.io/instance: eventing
app.kubernetes.io/part-of: eventing-manager
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: eventing-manager
name: eventing
namespace: kyma-system
Expand Down
2 changes: 1 addition & 1 deletion config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
namespace: eventing-manager

resources:
- operator_v1alpha1_eventing.yaml
- default.yaml
#+kubebuilder:scaffold:manifestskustomizesamples

0 comments on commit 018011a

Please sign in to comment.