diff --git a/deploy/pipelines/double_number.yml b/deploy/pipelines/double_number.yml new file mode 100644 index 0000000..0cb7384 --- /dev/null +++ b/deploy/pipelines/double_number.yml @@ -0,0 +1,13 @@ +components: + first_addition: + init_parameters: + add: 2 + type: haystack.testing.sample_components.add_value.AddFixedValue + double: + init_parameters: {} + type: haystack.testing.sample_components.double.Double +connections: +- receiver: double.value + sender: first_addition.result +max_loops_allowed: 100 +metadata: {} diff --git a/deploy/pipelines/greetings.yml b/deploy/pipelines/greetings.yml new file mode 100644 index 0000000..a8e7a33 --- /dev/null +++ b/deploy/pipelines/greetings.yml @@ -0,0 +1,14 @@ +components: + hello: + init_parameters: {} + type: hayhooks.testing.components.Hello + fstring: + init_parameters: + template: "This is the greeting: {greeting}!" + variables: ["greeting"] + type: haystack.testing.sample_components.fstring.FString +connections: +- receiver: fstring.greeting + sender: hello.output +max_loops_allowed: 100 +metadata: {} diff --git a/deploy/service_with_confiigmap.yaml b/deploy/service_with_confiigmap.yaml new file mode 100644 index 0000000..5e46f9f --- /dev/null +++ b/deploy/service_with_confiigmap.yaml @@ -0,0 +1,40 @@ +kind: Pod +apiVersion: v1 +metadata: + name: hayhooks + labels: + app: haystack +spec: + containers: + # We use the unstable release to keep this example fresh and relevant. + - image: deepset/hayhooks:main + name: hayhooks + # Since we're using the moving tag `main`, we have to always pull + # to be sure we're getting the latest. + imagePullPolicy: Always + # Mount the ConfigMap containing the pipelines under + # /opt/pipelines in the container + volumeMounts: + - name: config-volume + mountPath: /opt/pipelines + # Instruct Hayhooks that the pipelines we want to run at startup + # will be found under /opt/pipelines + env: + - name: HAYHOOKS_PIPELINES_DIR + value: /opt/pipelines + volumes: + - name: config-volume + configMap: + name: pipelines +--- + +kind: Service +apiVersion: v1 +metadata: + name: haystack-service +spec: + selector: + app: haystack + ports: + # Default port used by the Hayhooks Docker image + - port: 1416 diff --git a/deploy/service_with_deployment.yaml b/deploy/service_with_deployment.yaml new file mode 100644 index 0000000..74cd235 --- /dev/null +++ b/deploy/service_with_deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: haystack-deployment +spec: + replicas: 3 + selector: + matchLabels: + app: haystack + template: + metadata: + labels: + app: haystack + spec: + containers: + # We use the unstable release to keep this example fresh and relevant. + - image: deepset/hayhooks:main + name: hayhooks + # Since we're using the moving tag `main`, we have to always pull + # to be sure we're getting the latest. + imagePullPolicy: Always + # Mount the ConfigMap containing the pipelines under + # /opt/pipelines in the container + volumeMounts: + - name: config-volume + mountPath: /opt/pipelines + # Instruct Hayhooks that the pipelines we want to run at startup + # will be found under /opt/pipelines + env: + - name: HAYHOOKS_PIPELINES_DIR + value: /opt/pipelines + volumes: + - name: config-volume + configMap: + name: pipelines + +--- + +kind: Service +apiVersion: v1 +metadata: + name: haystack-service +spec: + selector: + app: haystack + ports: + # Default port used by the Hayhooks Docker image + - port: 1416 diff --git a/deploy/simple_service.yaml b/deploy/simple_service.yaml new file mode 100644 index 0000000..ee8e3c4 --- /dev/null +++ b/deploy/simple_service.yaml @@ -0,0 +1,27 @@ +kind: Pod +apiVersion: v1 +metadata: + name: hayhooks + labels: + app: haystack +spec: + containers: + # We use the unstable release to keep this example fresh and relevant. + - image: deepset/hayhooks:main + name: hayhooks + # Since we're using the moving tag `main`, we have to always pull + # to be sure we're getting the latest. + imagePullPolicy: Always + +--- + +kind: Service +apiVersion: v1 +metadata: + name: haystack-service +spec: + selector: + app: haystack + ports: + # Default port used by the Hayhooks Docker image + - port: 1416