From f9faad7404c7e962539e58b12e5db010d4ea8e10 Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Thu, 2 Jul 2020 18:47:02 -0500 Subject: [PATCH 1/2] chore: add readiness probes --- nginx.yaml | 6 ++++++ quake.yaml | 6 ++++++ react-app.yaml | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/nginx.yaml b/nginx.yaml index ef8d6e3..272f3e5 100644 --- a/nginx.yaml +++ b/nginx.yaml @@ -7,4 +7,10 @@ spec: - name: app image: nginx@sha256:3e2ffcf0edca2a4e9b24ca442d227baea7b7f0e33ad654ef1eb806fbd9bedcf0 command: ["nginx", "-g", "daemon off;"] + readinessProbe: + httpGet: + path: / + port: 80 + failureThreshold: 10 + periodSeconds: 1 port: 80 diff --git a/quake.yaml b/quake.yaml index 2011ad0..193e2ba 100644 --- a/quake.yaml +++ b/quake.yaml @@ -6,4 +6,10 @@ spec: containers: - name: app image: feraltc/quakejs-codius@sha256:be48c9fc47ea5defd1d5f9a039c47b826a833c849c3e7e564e8ad216fae51632 + readinessProbe: + httpGet: + path: / + port: 27960 + failureThreshold: 10 + periodSeconds: 1 port: 27960 diff --git a/react-app.yaml b/react-app.yaml index b351c74..4222f9b 100644 --- a/react-app.yaml +++ b/react-app.yaml @@ -6,4 +6,10 @@ spec: containers: - name: app image: androswong418/example-pod-1@sha256:8933bced1637e7d3b08c4aa50b96a45aef0b63f504f595bb890f57253af68b11 + readinessProbe: + httpGet: + path: / + port: 3000 + failureThreshold: 10 + periodSeconds: 1 port: 3000 From 11250ace6fe786bbe04bca4c450e084bd4089165 Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Fri, 24 Jul 2020 14:29:51 -0500 Subject: [PATCH 2/2] chore: convert from k8s resources to YAML for services API --- README.md | 2 +- nginx.yaml | 4 ---- quake.yaml | 4 ---- react-app.yaml | 4 ---- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/README.md b/README.md index f036418..6b14cd5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Codius Examples -> Example [Codius services](https://godoc.org/github.com/codius/codius-crd-operator/api/v1alpha1#Service) +> Example [Codius services](https://godoc.org/github.com/codius/codius-operator/servers#Service) ### nginx diff --git a/nginx.yaml b/nginx.yaml index 272f3e5..09f74d5 100644 --- a/nginx.yaml +++ b/nginx.yaml @@ -1,7 +1,3 @@ -apiVersion: core.codius.org/v1alpha1 -kind: Service -metadata: - name: nginx-codius-pod spec: containers: - name: app diff --git a/quake.yaml b/quake.yaml index 193e2ba..df7d7ac 100644 --- a/quake.yaml +++ b/quake.yaml @@ -1,7 +1,3 @@ -apiVersion: core.codius.org/v1alpha1 -kind: Service -metadata: - name: quake3-codius-pod spec: containers: - name: app diff --git a/react-app.yaml b/react-app.yaml index 4222f9b..60c59df 100644 --- a/react-app.yaml +++ b/react-app.yaml @@ -1,7 +1,3 @@ -apiVersion: core.codius.org/v1alpha1 -kind: Service -metadata: - name: my-codius-create-react-app spec: containers: - name: app