# The producer Pico Pod hosted by the Manifold RuntimeEnvironment. # # This Pod plays the role of a Pico engine hosting the Pico Element # "hello-producer-pico" in the Phase 7 vocabulary. It publishes exactly one # event of EventType "hello.greeting" onto the Wrangler-declared Channel # "greeting" and exits. The consumer Pico ("hello-consumer-pico") is # subscribed to that same Channel and reacts by producing one Observation. # # The producer connects to the Channel via the in-cluster DNS name of the # greeting Service ("greeting.manifold.svc.cluster.local:8080"), which # resolves to the consumer Pod behind the Channel. Apply this manifest # AFTER the consumer Pod is Ready so the connection succeeds. apiVersion: v1 kind: Pod metadata: name: hello-producer-pico namespace: manifold labels: app: hello-producer-pico oe.academy/pico: hello-producer-pico oe.academy/hosted-by: manifold oe.academy/publishes-to: greeting spec: restartPolicy: Never containers: - name: pico-engine image: busybox:1.36 command: - /bin/sh - -c - | set -eu echo "pico-engine: hosted by manifold on kubernetes; hello-producer-pico publishing one hello.greeting event onto channel 'greeting'" payload='{"eventType":"hello.greeting","channel":"greeting","from":"hello-producer-pico","value":"Hello, Pico!"}' printf '%s' "${payload}" | nc -w 2 greeting.manifold.svc.cluster.local 8080 echo "pico[hello-producer-pico] sent: hello.greeting to hello-consumer-pico via channel 'greeting'"