datagen.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ---
  2. # Source: materialize-environmentd/templates/secret.yaml
  3. # Copyright Materialize, Inc. and contributors. All rights reserved.
  4. #
  5. # Use of this software is governed by the Business Source License
  6. # included in the LICENSE file at the root of this repository.
  7. #
  8. # As of the Change Date specified in that file, in accordance with
  9. # the Business Source License, use of this software will be governed
  10. # by the Apache License, Version 2.0.
  11. apiVersion: v1
  12. kind: ConfigMap
  13. metadata:
  14. name: datagen-schema
  15. namespace: materialize
  16. data:
  17. schema.json: |
  18. [
  19. {
  20. "_meta": {
  21. "topic": "mz_datagen_test"
  22. },
  23. "id": "iteration.index",
  24. "name": "faker.internet.userName()"
  25. }
  26. ]
  27. ---
  28. apiVersion: apps/v1
  29. kind: Deployment
  30. metadata:
  31. name: datagen
  32. namespace: materialize
  33. spec:
  34. replicas: 1
  35. selector:
  36. matchLabels:
  37. app: datagen
  38. template:
  39. metadata:
  40. labels:
  41. app: datagen
  42. spec:
  43. containers:
  44. - name: datagen
  45. image: materialize/datagen:latest
  46. args:
  47. [
  48. "datagen",
  49. "-s", "/schemas/schema.json",
  50. "-f", "json",
  51. "-n", "10024",
  52. "-w", "2000",
  53. "-d"
  54. ]
  55. env:
  56. - name: KAFKA_BROKERS
  57. value: "redpanda.materialize.svc.cluster.local:9092"
  58. volumeMounts:
  59. - name: datagen-schema-volume
  60. mountPath: /schemas
  61. readOnly: true
  62. volumes:
  63. - name: datagen-schema-volume
  64. configMap:
  65. name: datagen-schema