From 18bf44ca49c1d339fd824773b04bc3b8c2e05402 Mon Sep 17 00:00:00 2001 From: georgep1ckers Date: Wed, 1 Nov 2023 15:13:04 +0000 Subject: [PATCH] combining service and deployment yamls --- order-processor-service.yaml | 11 ----------- ...sor-deployment.yaml => order-processor.yaml | 14 +++++++++++++- stock-controller-service.yaml | 11 ----------- ...er-deployment.yaml => stock-controller.yaml | 14 +++++++++++++- tracey-run.sh | 18 ++++++------------ ...deployment.yaml => warehouse-interface.yaml | 0 6 files changed, 32 insertions(+), 36 deletions(-) delete mode 100644 order-processor-service.yaml rename order-processor-deployment.yaml => order-processor.yaml (73%) delete mode 100644 stock-controller-service.yaml rename stock-controller-deployment.yaml => stock-controller.yaml (73%) rename warehouse-interface-deployment.yaml => warehouse-interface.yaml (100%) diff --git a/order-processor-service.yaml b/order-processor-service.yaml deleted file mode 100644 index 1c5d860..0000000 --- a/order-processor-service.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: order-processor -spec: - selector: - app: order-processor - ports: - - protocol: TCP - port: 8080 - targetPort: 8080 \ No newline at end of file diff --git a/order-processor-deployment.yaml b/order-processor.yaml similarity index 73% rename from order-processor-deployment.yaml rename to order-processor.yaml index 5c22dc0..bb0db79 100644 --- a/order-processor-deployment.yaml +++ b/order-processor.yaml @@ -24,4 +24,16 @@ spec: apiVersion: v1 fieldPath: spec.nodeName - name: OTEL_HOST - value: "$(KUBE_NODE_NAME):4317" \ No newline at end of file + value: "$(KUBE_NODE_NAME):4317" +--- +apiVersion: v1 +kind: Service +metadata: + name: order-processor +spec: + selector: + app: order-processor + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 \ No newline at end of file diff --git a/stock-controller-service.yaml b/stock-controller-service.yaml deleted file mode 100644 index 38cdd7e..0000000 --- a/stock-controller-service.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: stock-controller -spec: - selector: - app: stock-controller - ports: - - protocol: TCP - port: 8081 - targetPort: 8081 \ No newline at end of file diff --git a/stock-controller-deployment.yaml b/stock-controller.yaml similarity index 73% rename from stock-controller-deployment.yaml rename to stock-controller.yaml index cb88f9f..a1bd659 100644 --- a/stock-controller-deployment.yaml +++ b/stock-controller.yaml @@ -24,4 +24,16 @@ spec: apiVersion: v1 fieldPath: spec.nodeName - name: OTEL_HOST - value: "$(KUBE_NODE_NAME):4317" \ No newline at end of file + value: "$(KUBE_NODE_NAME):4317" +--- +apiVersion: v1 +kind: Service +metadata: + name: stock-controller +spec: + selector: + app: stock-controller + ports: + - protocol: TCP + port: 8081 + targetPort: 8081 \ No newline at end of file diff --git a/tracey-run.sh b/tracey-run.sh index 09116a4..3e449f3 100644 --- a/tracey-run.sh +++ b/tracey-run.sh @@ -1,16 +1,10 @@ #!/bin/bash -# Create tracey stock-controller deployment -kubectl apply -f stock-controller-deployment.yaml +# Create tracey stock-controller deployment & service combined yaml +kubectl apply -f stock-controller.yaml -# Create tracey stock-controller service -kubectl apply -f stock-controller-service.yaml +# Create tracey processor deployment & service combined yaml +kubectl apply -f order-processor.yaml -# Create tracey processor deployment -kubectl apply -f order-processor-deployment.yaml - -# Create tracey processor service -kubectl apply -f order-processor-service.yaml - -# Create tracey interface deployment -kubectl apply -f warehouse-interface-deployment.yaml \ No newline at end of file +# Create tracey interface deployment yaml +kubectl apply -f warehouse-interface.yaml \ No newline at end of file diff --git a/warehouse-interface-deployment.yaml b/warehouse-interface.yaml similarity index 100% rename from warehouse-interface-deployment.yaml rename to warehouse-interface.yaml