-
-
Save cab105/446c07cc54c646913dca459d2ddd9a9f to your computer and use it in GitHub Desktop.
Sample Kubernetes Configuration to leverage TriggerMesh transformation in a Spring Boot Migrator generated service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This YAML file requires a Kubernetes cluster with Knative and TriggerMesh installed. | |
# Instantiate the Dataweave transformation service | |
apiVersion: flow.triggermesh.io/v1alpha1 | |
kind: DataWeaveTransformation | |
metadata: | |
name: dw | |
namespace: default # change this to your target namespace | |
spec: | |
allowPerEventDwSpell: true | |
# Uncomment to allow the transformation to be accessible outside of the cluster | |
#adapterOverrides: | |
# public: true | |
--- | |
# The Knative Sink Binding to associate the generated service with the Dataweave transformation | |
apiVersion: sources.knative.dev/v1 | |
kind: SinkBinding | |
metadata: | |
name: mule-binding | |
spec: | |
subject: | |
apiVersion: apps/v1 | |
kind: Deployment | |
name: mule-deployment # Ensure this reflects the target deployment | |
sink: | |
ref: | |
apiVersion: flow.triggermesh.io/v1alpha1 | |
kind: DataWeaveTransformation | |
name: dw | |
--- | |
# The generated deployment | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: mule-deployment | |
labels: | |
app: MuleSoftMigratedService # Should be specific to your service name | |
spec: | |
selector: | |
matchLabels: | |
app: MuleSoftMigratedService | |
template: | |
metadata: | |
labels: | |
app: MuleSoftMigratedService | |
spec: | |
containers: | |
# This needs to reflect your generated service coordinates in the docker registry | |
- name: mule-migrated-sbm-svc | |
image: gcr.io/triggermesh/mule-migrated-sbm-svc:latest | |
--- | |
# Create a regular Kubernetes service to expose your service | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mule-migrated-sbm-svc | |
spec: | |
selector: | |
app: MuleSoftMigratedService | |
type: LoadBalancer | |
ports: | |
- protocol: TCP | |
port: 8081 | |
targetPort: 8081 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment