diff --git a/Weather/SerialReader/azure-pipelines.yml b/Weather/SerialReader/deploy/azure-pipelines.yml similarity index 100% rename from Weather/SerialReader/azure-pipelines.yml rename to Weather/SerialReader/deploy/azure-pipelines.yml diff --git a/Weather/SerialReader/deploy/queue.yaml b/Weather/SerialReader/deploy/manifest.yaml similarity index 55% rename from Weather/SerialReader/deploy/queue.yaml rename to Weather/SerialReader/deploy/manifest.yaml index 5850866..efc89b0 100644 --- a/Weather/SerialReader/deploy/queue.yaml +++ b/Weather/SerialReader/deploy/manifest.yaml @@ -65,4 +65,49 @@ spec: port: 15672 selector: app: weather-queue - type: ClusterIP \ No newline at end of file + type: ClusterIP +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: weather-serial-reader + namespace: home-monitor + labels: + app: weather-serial-reader +spec: + replicas: 1 + selector: + matchLabels: + app: weather-serial-reader + template: + metadata: + labels: + app: weather-serial-reader + spec: + containers: + - name: weather-serial-reader + image: ckaczor/home-monitor-weather-serialreader:{TAG} + terminationMessagePath: "/dev/termination-log" + terminationMessagePolicy: File + imagePullPolicy: Always + securityContext: + privileged: true + env: + - name: Weather__Queue__Host + value: weather-queue + - name: Weather__Queue__User + valueFrom: + secretKeyRef: + name: weather-queue-credentials + key: username + - name: Weather__Queue__Password + valueFrom: + secretKeyRef: + name: weather-queue-credentials + key: password + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + nodeSelector: + kubernetes.io/hostname: weather + schedulerName: default-scheduler \ No newline at end of file diff --git a/Weather/SerialReader/deploy/service.yaml b/Weather/SerialReader/deploy/service.yaml deleted file mode 100644 index 0bc4ac1..0000000 --- a/Weather/SerialReader/deploy/service.yaml +++ /dev/null @@ -1,45 +0,0 @@ ---- -kind: Deployment -apiVersion: apps/v1 -metadata: - name: weather-serial-reader - namespace: home-monitor - labels: - app: weather-serial-reader -spec: - replicas: 1 - selector: - matchLabels: - app: weather-serial-reader - template: - metadata: - labels: - app: weather-serial-reader - spec: - containers: - - name: weather-serial-reader - image: ckaczor/home-monitor-weather-serialreader - terminationMessagePath: "/dev/termination-log" - terminationMessagePolicy: File - imagePullPolicy: Always - securityContext: - privileged: true - env: - - name: Weather__Queue__Host - value: weather-queue - - name: Weather__Queue__User - valueFrom: - secretKeyRef: - name: weather-queue-credentials - key: username - - name: Weather__Queue__Password - valueFrom: - secretKeyRef: - name: weather-queue-credentials - key: password - restartPolicy: Always - terminationGracePeriodSeconds: 30 - dnsPolicy: ClusterFirst - nodeSelector: - kubernetes.io/hostname: weather - schedulerName: default-scheduler \ No newline at end of file