SHARE
TWEET

Untitled

a guest Aug 25th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. apiVersion: serving.knative.dev/v1alpha1
  2. kind: Service
  3. metadata:
  4.   name: kafka-channel-display0
  5. spec:
  6.   template:
  7.     spec:
  8.       containers:
  9.       - image: docker.io/cds19/event-display
  10.  
  11. ---
  12.  
  13. apiVersion: serving.knative.dev/v1alpha1
  14. kind: Service
  15. metadata:
  16.   name: kafka-channel-display1
  17. spec:
  18.   template:
  19.     spec:
  20.       containers:
  21.       - image: docker.io/cds19/event-display
  22. ---
  23. apiVersion: messaging.knative.dev/v1alpha1
  24. kind: KafkaChannel
  25. metadata:
  26.   name: kafka-demo-channel
  27. spec:
  28.     numPartitions: 3
  29.     replicationFactor: 1
  30. ---
  31. apiVersion: sources.eventing.knative.dev/v1alpha1
  32. kind: KafkaSource
  33. metadata:
  34.   name: kafka-channel-source
  35.   namespace: default
  36. spec:
  37.   consumerGroup: knative-group
  38.   bootstrapServers: my-cluster-kafka-bootstrap.kafka:9092 #note the kafka namespace
  39.   topics: knative-demo-kafka-channel-topic #note the different topic
  40.   sink:
  41.     apiVersion: messaging.knative.dev/v1alpha1
  42.     kind: KafkaChannel
  43.     name: kafka-demo-channel #note the different channel name
  44. ---
  45. apiVersion: eventing.knative.dev/v1alpha1
  46. kind: Subscription
  47. metadata:
  48.   name: kafka-channel-sub0
  49. spec:
  50.   channel:
  51.     apiVersion: messaging.knative.dev/v1alpha1
  52.     kind: kafkaChannel
  53.     name: kafka-demo-channel
  54.   subscriber:
  55.     ref:
  56.       apiVersion: serving.knative.dev/v1alpha1
  57.       kind: Service
  58.       name: kafka-channel-display0
  59.   # reply:
  60.   #   channel:
  61.   #     apiVersion: eventing.knative.dev/v1alpha1
  62.   #     kind: Channel
  63.   #     name: replychannel
  64. ---
  65. apiVersion: eventing.knative.dev/v1alpha1
  66. kind: Subscription
  67. metadata:
  68.   name: kafka-channel-sub1
  69. spec:
  70.   channel:
  71.     apiVersion: messaging.knative.dev/v1alpha1
  72.     kind: kafkaChannel
  73.     name: kafka-demo-channel
  74.   subscriber:
  75.     ref:
  76.       apiVersion: serving.knative.dev/v1alpha1
  77.       kind: Service
  78.       name: kafka-channel-display1
  79.   # reply:
  80.   #   channel:
  81.   #     apiVersion: eventing.knative.dev/v1alpha1
  82.   #     kind: Channel
  83.   #     name: replychannel
  84. ---
  85. apiVersion: kafka.strimzi.io/v1alpha1
  86. kind: KafkaTopic
  87. metadata:
  88.   name: knative-demo-kafka-channel-topic
  89.   namespace: kafka
  90.   labels:
  91.     strimzi.io/cluster: my-cluster
  92. spec:
  93.   partitions: 3
  94.   replicas: 1
  95.   config:
  96.     retention.ms: 7200000
  97.     segment.bytes: 1073741824
  98. ---
  99. apiVersion: kafka.strimzi.io/v1alpha1
  100. kind: KafkaTopic
  101. metadata:
  102.   name: knative-demo-channel
  103.   labels:
  104.     strimzi.io/cluster: my-cluster
  105. spec:
  106.   partitions: 3
  107.   replicas: 1
  108.   config:
  109.     retention.ms: 7200000
  110.     segment.bytes: 1073741824
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top