apiVersion: v1 kind: ConfigMap metadata: name: endpoint data: mock.yaml: |- when: method: POST path: /events header: - name: content-type value: application/json then: status: 200 header: - name: content-type value: application/json delay: 50 --- apiVersion: apps/v1 kind: Deployment metadata: name: endpoint labels: app: endpoint spec: replicas: 1 selector: matchLabels: app: endpoint template: metadata: labels: app: endpoint spec: containers: - name: main image: alexliesenfeld/httpmock:0.6.2 ports: - containerPort: 5000 env: - name: "RUST_LOG" value: "info" - name: "HTTPMOCK_MOCK_FILES_DIR" value: "/etc/httpmock" resources: requests: memory: 100Mi cpu: 50m limits: memory: 500Mi cpu: 200m volumeMounts: - mountPath: /etc/httpmock name: mock-config volumes: - name: mock-config configMap: name: endpoint --- apiVersion: v1 kind: Service metadata: name: endpoint spec: selector: app: endpoint ports: - protocol: TCP port: 5000 targetPort: 5000