Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the Kubernetes manifests for the App, Api, Real Fake Sensors, and Sensational Sensors. Additionally, supporting services for the Istio service mesh and ingress are established.
🏋️ Changes
🧪 To test
This deployment uses the Istio Ingress load balancer on the cluster, which currently exposes http://35.203.112.8/ on port 80.
preformatteddisplay of{"detail":"Not Found"}, this is the API server's 404 response, which means it's responding!/sensorsroute on the Api endpoint http://35.203.112.8/iot/sensor-api/sensors. You should get some JSON of the sensor data.🚅 Notes for the future
Since we don't have an associated hostname for now, I've exposed it on the
/iotroute on the load balancer. When there is a hostname to attach to, we can alter the manifest for the Istio virtual services and gateway to take advantage of it.🤔 Additional info
🌱 Deployment process
These manifests are currently manually applied using the following method:
./connect.shscript from button-inc/k8s-cluster at task-738 (github.com)kubectl create ns iot.kubectl label namespace iot istio-injection=enabled.kubectl create secret docker-registry ghcr-login-secret --docker-server=https://ghcr.io --docker-username=GITHUB_USERNAME --docker-password=ghp_PERSONAL_ACCESS_TOKEN_KEY -n iot.kubectl apply -f ./manifest.yaml -n iot.🧜♀️ Manifest diagram
Here's a graphic showing the components we create (squared nodes) and how they're connected, vaugley.
flowchart TD subgraph iot ["iot" namespace in cluster] iG[_Istio_ gateway] <--> VS[_Istio_ virtual service] subgraph App [Application] AppS[service] --> AppD[deployment] end subgraph Api [API] ApiS[service] --> ApiD[deployment] end subgraph RFs [Real Fake sensors] RFsS[service] --> RFsD[deployment] end subgraph Ss [Sensational sensors] SsS[service] --> SsD[deployment] end Api -.in-cluster traffic.-> RFs Api -.in-cluster traffic.-> Ss VS --> AppS VS --> ApiS end subgraph cluster iot iI([Cluster-wide Istio Ingress]) end www((Public internet client)) -.external traffic.-> iI --> iG