diff --git a/config/busola/busola-extension.yaml b/config/busola/busola-extension.yaml new file mode 100644 index 00000000..f0bb09d5 --- /dev/null +++ b/config/busola/busola-extension.yaml @@ -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 diff --git a/config/busola/kustomization.yaml b/config/busola/kustomization.yaml new file mode 100644 index 00000000..0037359f --- /dev/null +++ b/config/busola/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- busola-extension.yaml diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index c07ae9c0..93eb6b39 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -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 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 627635b4..08f5dbbe 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,5 +1,6 @@ resources: - manager.yaml +- service.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization diff --git a/config/manager/service.yaml b/config/manager/service.yaml new file mode 100644 index 00000000..e5561ac5 --- /dev/null +++ b/config/manager/service.yaml @@ -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 diff --git a/config/samples/operator_v1alpha1_eventing.yaml b/config/samples/default.yaml similarity index 75% rename from config/samples/operator_v1alpha1_eventing.yaml rename to config/samples/default.yaml index 381de28f..27fd0222 100644 --- a/config/samples/operator_v1alpha1_eventing.yaml +++ b/config/samples/default.yaml @@ -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 @@ -13,6 +12,7 @@ spec: backend: type: NATS config: + eventTypePrefix: "sap.kyma.custom" natsStreamStorageType: File natsStreamReplicas: 3 natsStreamMaxSize: 700M @@ -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 diff --git a/config/samples/operator_v1alpha1_eventing_eventmesh.yaml b/config/samples/default_eventmesh.yaml similarity index 72% rename from config/samples/operator_v1alpha1_eventing_eventmesh.yaml rename to config/samples/default_eventmesh.yaml index 6ac780b3..74619868 100644 --- a/config/samples/operator_v1alpha1_eventing_eventmesh.yaml +++ b/config/samples/default_eventmesh.yaml @@ -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 @@ -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 diff --git a/config/samples/operator_v1alpha1_eventing_short.yaml b/config/samples/eventing_short.yaml similarity index 76% rename from config/samples/operator_v1alpha1_eventing_short.yaml rename to config/samples/eventing_short.yaml index 3ca14c1c..41cbd206 100644 --- a/config/samples/operator_v1alpha1_eventing_short.yaml +++ b/config/samples/eventing_short.yaml @@ -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 diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 48e05acd..cde2664d 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -2,5 +2,5 @@ namespace: eventing-manager resources: -- operator_v1alpha1_eventing.yaml +- default.yaml #+kubebuilder:scaffold:manifestskustomizesamples