Changeset 9:f87f195f785f

Added manifests as yaml files
author unexist
date Tue, 31 Aug 2021 16:09:35 +0200
parents 3d44dca50191
children 451532d0a40d
files deployment/kubernetes/knative/knative-broker.yaml deployment/kubernetes/knative/knative-eventing.yaml deployment/kubernetes/knative/knative-kafka-binding.yaml deployment/kubernetes/knative/knative-kafka-source.yaml deployment/kubernetes/knative/knative-serving.yaml deployment/kubernetes/knative/knative-trigger.yaml deployment/kubernetes/knative/kustomization.yaml deployment/kubernetes/redpanda/kustomization.yaml deployment/kubernetes/redpanda/redpanda-deployment.yaml deployment/kubernetes/redpanda/redpanda-service.yaml
diffstat 10 files changed, 120 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/knative/knative-broker.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,13 @@
+apiVersion: eventing.knative.dev/v1
+kind: Broker
+metadata:
+  annotations:
+    eventing.knative.dev/broker.class: Kafka
+  name: default
+  namespace: default
+spec:
+  config:
+    apiVersion: v1
+    kind: ConfigMap
+    name: kafka-broker-config
+    namespace: knative-eventing
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/knative/knative-eventing.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,10 @@
+apiVersion: operator.knative.dev/v1alpha1
+kind: KnativeEventing
+metadata:
+  name: knative-eventing
+  namespace: knative-eventing
+---
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: knative-serving
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/knative/knative-kafka-binding.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,11 @@
+apiVersion: bindings.knative.dev/v1beta1
+kind: KafkaBinding
+metadata:
+  name: kafka-binding-todo
+spec:
+  subject:
+    apiVersion: serving.knative.dev/v1
+    kind: Service
+    name: todo
+  bootstrapServers:
+    - redpanda:9092
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/knative/knative-kafka-source.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,14 @@
+apiVersion: sources.knative.dev/v1beta1
+kind: KafkaSource
+metadata:
+  name: kafka-source-todo
+spec:
+  bootstrapServers:
+    - redpanda:9092
+  topics:
+    - todo-created
+  sink:
+    ref:
+      apiVersion: eventing.knative.dev/v1
+      kind: Broker
+      name: default
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/knative/knative-serving.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,10 @@
+apiVersion: operator.knative.dev/v1alpha1
+kind: KnativeEventing
+metadata:
+  name: knative-eventing
+  namespace: knative-eventing
+---
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: knative-serving
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/knative/knative-trigger.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,16 @@
+apiVersion: eventing.knative.dev/v1
+kind: Trigger
+metadata:
+  name: todo-trigger
+spec:
+  broker: default
+  filter:
+    attributes:
+      type: dev.knative.kafka.event
+      source: /apis/v1/namespaces/default/kafkasources/kafka-source-todo#todo-created
+  subscriber:
+    ref:
+      apiVersion: serving.knative.dev/v1
+      kind: Service
+      name: todo
+    uri: /todo/create
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/knative/kustomization.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,7 @@
+resources:
+  - knative-eventing.yaml
+  - knative-serving.yaml
+  - knative-broker.yaml
+  - knative-kafka-source.yaml
+  - knative-kafka-binding.yaml
+  - knative-trigger.yaml
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/redpanda/kustomization.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,3 @@
+resources:
+  - redpanda-service.yaml
+  - redpanda-deployment.yaml
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/redpanda/redpanda-deployment.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,24 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  labels:
+    app.kubernetes.io/name: redpanda
+  name: redpanda
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: redpanda
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: redpanda
+    spec:
+      containers:
+        - name: redpanda
+          image: vectorized/redpanda:latest
+          imagePullPolicy: Always
+          ports:
+            - containerPort: 9092
+              name: http
+              protocol: TCP
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deployment/kubernetes/redpanda/redpanda-service.yaml	Tue Aug 31 16:09:35 2021 +0200
@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: redpanda
+spec:
+  ports:
+    - name: http
+      port: 9092
+      targetPort: 9092
+  selector:
+    app.kubernetes.io/name: redpanda
+  type: ClusterIP
\ No newline at end of file