|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: bindings-target |
| 5 | + labels: |
| 6 | + app: bindings-target |
| 7 | + case: bindings |
| 8 | +spec: |
| 9 | + replicas: 1 |
| 10 | + selector: |
| 11 | + matchLabels: |
| 12 | + app: bindings-target |
| 13 | + case: bindings |
| 14 | + template: |
| 15 | + metadata: |
| 16 | + labels: |
| 17 | + app: bindings-target |
| 18 | + case: bindings |
| 19 | + annotations: |
| 20 | + dapr.io/enabled: "true" |
| 21 | + dapr.io/app-id: "bindings-target" |
| 22 | + dapr.io/app-port: "50003" |
| 23 | + dapr.io/log-as-json: "true" |
| 24 | + dapr.io/app-protocol: "grpc" |
| 25 | + spec: |
| 26 | + containers: |
| 27 | + - name: target |
| 28 | + image: bindings_e2e_target:latest |
| 29 | + imagePullPolicy: IfNotPresent |
| 30 | + env: |
| 31 | + - name: FUNC_CONTEXT |
| 32 | + value: | |
| 33 | + { |
| 34 | + "name": "bindings-target", |
| 35 | + "version": "v1", |
| 36 | + "requestID": "a0f2ad8d-5062-4812-91e9-95416489fb01", |
| 37 | + "port": "50003", |
| 38 | + "prePlugins": ["plugin-custom", "plugin-example"], |
| 39 | + "postPlugins": ["plugin-custom", "plugin-example"], |
| 40 | + "inputs": { |
| 41 | + "sender": { |
| 42 | + "componentName": "bindings-target", |
| 43 | + "componentType": "bindings.kafka" |
| 44 | + } |
| 45 | + }, |
| 46 | + "outputs": {}, |
| 47 | + "runtime": "Async" |
| 48 | + } |
| 49 | + - name: POD_NAME |
| 50 | + valueFrom: |
| 51 | + fieldRef: |
| 52 | + apiVersion: v1 |
| 53 | + fieldPath: metadata.name |
| 54 | + - name: POD_NAMESPACE |
| 55 | + value: default |
| 56 | + ports: |
| 57 | + - containerPort: 50003 |
| 58 | + name: function-port |
| 59 | + protocol: TCP |
| 60 | +--- |
| 61 | +apiVersion: apps/v1 |
| 62 | +kind: Deployment |
| 63 | +metadata: |
| 64 | + name: bindings-sender |
| 65 | + labels: |
| 66 | + app: bindings-sender |
| 67 | + case: bindings |
| 68 | +spec: |
| 69 | + replicas: 1 |
| 70 | + selector: |
| 71 | + matchLabels: |
| 72 | + app: bindings-sender |
| 73 | + case: bindings |
| 74 | + template: |
| 75 | + metadata: |
| 76 | + labels: |
| 77 | + app: bindings-sender |
| 78 | + case: bindings |
| 79 | + annotations: |
| 80 | + dapr.io/enabled: "true" |
| 81 | + dapr.io/app-id: "bindings-sender" |
| 82 | + dapr.io/app-port: "50003" |
| 83 | + dapr.io/log-as-json: "true" |
| 84 | + dapr.io/app-protocol: "grpc" |
| 85 | + spec: |
| 86 | + containers: |
| 87 | + - name: sender |
| 88 | + image: bindings_e2e_sender:latest |
| 89 | + imagePullPolicy: IfNotPresent |
| 90 | + env: |
| 91 | + - name: FUNC_CONTEXT |
| 92 | + value: | |
| 93 | + { |
| 94 | + "name": "bindings-sender", |
| 95 | + "version": "v1", |
| 96 | + "requestID": "a0f2ad8d-5062-4812-91e9-95416489fb01", |
| 97 | + "port": "50003", |
| 98 | + "inputs": { |
| 99 | + "cron": { |
| 100 | + "componentName": "cron-for-bindings", |
| 101 | + "componentType": "bindings.cron" |
| 102 | + } |
| 103 | + }, |
| 104 | + "outputs": { |
| 105 | + "target": { |
| 106 | + "componentName": "bindings-sender", |
| 107 | + "componentType": "bindings.kafka", |
| 108 | + "operation": "create" |
| 109 | + } |
| 110 | + }, |
| 111 | + "runtime": "Async" |
| 112 | + } |
| 113 | + - name: POD_NAME |
| 114 | + valueFrom: |
| 115 | + fieldRef: |
| 116 | + apiVersion: v1 |
| 117 | + fieldPath: metadata.name |
| 118 | + - name: POD_NAMESPACE |
| 119 | + value: default |
| 120 | + ports: |
| 121 | + - containerPort: 50003 |
| 122 | + name: function-port |
| 123 | + protocol: TCP |
| 124 | +--- |
| 125 | +apiVersion: dapr.io/v1alpha1 |
| 126 | +kind: Component |
| 127 | +metadata: |
| 128 | + name: bindings-target |
| 129 | +spec: |
| 130 | + type: bindings.kafka |
| 131 | + version: v1 |
| 132 | + metadata: |
| 133 | + - name: brokers |
| 134 | + value: "kafka-server-kafka-brokers:9092" |
| 135 | + - name: consumerGroup |
| 136 | + value: "bindings-target" |
| 137 | + - name: authRequired |
| 138 | + value: "false" |
| 139 | + - name: topics |
| 140 | + value: "bindings-topic" |
| 141 | + - name: publishTopic |
| 142 | + value: "bindings-topic" |
| 143 | +--- |
| 144 | +apiVersion: dapr.io/v1alpha1 |
| 145 | +kind: Component |
| 146 | +metadata: |
| 147 | + name: bindings-sender |
| 148 | +spec: |
| 149 | + type: bindings.kafka |
| 150 | + version: v1 |
| 151 | + metadata: |
| 152 | + - name: brokers |
| 153 | + value: "kafka-server-kafka-brokers:9092" |
| 154 | + - name: consumerGroup |
| 155 | + value: "bindings-sender" |
| 156 | + - name: authRequired |
| 157 | + value: "false" |
| 158 | + - name: topics |
| 159 | + value: "bindings-topic" |
| 160 | + - name: publishTopic |
| 161 | + value: "bindings-topic" |
| 162 | +--- |
| 163 | +apiVersion: dapr.io/v1alpha1 |
| 164 | +kind: Component |
| 165 | +metadata: |
| 166 | + name: cron-for-bindings |
| 167 | +spec: |
| 168 | + type: bindings.cron |
| 169 | + version: v1 |
| 170 | + metadata: |
| 171 | + - name: schedule |
| 172 | + value: "@every 2s" |
0 commit comments