You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ki...@apache.org on 2020/12/05 00:58:16 UTC

[trafficserver-ingress-controller] branch master updated: Add probe support to helm chart + more lgtm fixes (#66)

This is an automated email from the ASF dual-hosted git repository.

kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 3730a32  Add probe support to helm chart + more lgtm fixes (#66)
3730a32 is described below

commit 3730a32472a3888578dd51ae0fa17446468ec3b1
Author: Kit Chan <ki...@apache.org>
AuthorDate: Fri Dec 4 16:58:07 2020 -0800

    Add probe support to helm chart + more lgtm fixes (#66)
---
 .lgtm.yml                                    |   2 +-
 charts/ats-ingress/templates/deployment.yaml |  12 ++++++++++++
 charts/ats-ingress/values.yaml               |   6 ++++++
 docs/ats-ingress-0.1.0.tgz                   | Bin 4872 -> 4975 bytes
 docs/index.yaml                              |   6 +++---
 k8s/images/node-app-1/server.js              |   6 +++---
 k8s/images/node-app-2/server.js              |   4 ++--
 7 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/.lgtm.yml b/.lgtm.yml
index f4e8704..ea135d7 100644
--- a/.lgtm.yml
+++ b/.lgtm.yml
@@ -18,4 +18,4 @@ extraction:
   javascript:
     index:
       exclude:
-        - k8s
+        - docs
diff --git a/charts/ats-ingress/templates/deployment.yaml b/charts/ats-ingress/templates/deployment.yaml
index 586551c..4e307b3 100644
--- a/charts/ats-ingress/templates/deployment.yaml
+++ b/charts/ats-ingress/templates/deployment.yaml
@@ -114,6 +114,18 @@ spec:
             protocol: TCP
           resources:
             {{- toYaml .Values.controller.resources | nindent 12 }}
+          {{- if .Values.controller.livenessProbe }}
+          livenessProbe:
+{{ toYaml .Values.controller.livenessProbe | indent 12 }}
+          {{- end }}
+          {{- if .Values.controller.readinessProbe }}
+          readinessProbe:
+{{ toYaml .Values.controller.readinessProbe | indent 12 }}
+          {{- end }}
+          {{- if .Values.controller.startupProbe }}
+          startupProbe:
+{{ toYaml .Values.controller.startupProbe | indent 12 }}
+          {{- end }}
           {{- if .Values.controller.securityContext }}
           securityContext:
 {{ toYaml .Values.controller.securityContext | indent 12 }}
diff --git a/charts/ats-ingress/values.yaml b/charts/ats-ingress/values.yaml
index bd51dd5..46f9341 100644
--- a/charts/ats-ingress/values.yaml
+++ b/charts/ats-ingress/values.yaml
@@ -64,6 +64,12 @@ controller:
   ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
   securityContext: {}
 
+  ## Controller Container liveness/readiness probe configuration
+  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
+  livenessProbe: {}
+  readinessProbe: {}
+  startupProbe: {}  
+
   ## Controller Service configuration
   ## ref: https://kubernetes.io/docs/concepts/services-networking/service/
   service:
diff --git a/docs/ats-ingress-0.1.0.tgz b/docs/ats-ingress-0.1.0.tgz
index a42eeeb..b659a53 100644
Binary files a/docs/ats-ingress-0.1.0.tgz and b/docs/ats-ingress-0.1.0.tgz differ
diff --git a/docs/index.yaml b/docs/index.yaml
index 1a0bce1..4ff94a9 100644
--- a/docs/index.yaml
+++ b/docs/index.yaml
@@ -3,12 +3,12 @@ entries:
   ats-ingress:
   - apiVersion: v2
     appVersion: 0.1.0
-    created: "2020-11-28T22:08:57.684474-08:00"
+    created: "2020-12-04T16:32:09.3516-08:00"
     description: A Helm chart for Kubernetes
-    digest: 42530c3ea67730cb10b2b4df1119d98772f6413c72b63b9db32902b07d0b0b5b
+    digest: 0fba84900e7381643d871faa16a08e9120f232d9d2c7ed440946ddfe9c8b2f33
     name: ats-ingress
     type: application
     urls:
     - https://apache.github.io/trafficserver-ingress-controller/ats-ingress-0.1.0.tgz
     version: 0.1.0
-generated: "2020-11-28T22:08:57.683727-08:00"
+generated: "2020-12-04T16:32:09.35058-08:00"
diff --git a/k8s/images/node-app-1/server.js b/k8s/images/node-app-1/server.js
index 59a6b85..4179bba 100644
--- a/k8s/images/node-app-1/server.js
+++ b/k8s/images/node-app-1/server.js
@@ -25,15 +25,15 @@ app.get('/', (req, res) => {
 });
 
 app.get('/test', (req, res) => {
-  res.sendFile('hello.html', {root: __dirname });
+  res.sendFile('hello.html', {root: __dirname }); // lgtm[js/missing-rate-limiting]
 })
 
 app.get('/app1', (req, res) => {
-  res.sendFile('hello.html', {root: __dirname });
+  res.sendFile('hello.html', {root: __dirname }); // lgtm[js/missing-rate-limiting]
 })
 
 app.get('/app2', (req, res) => {
-  res.sendFile('hello-updated.html', {root: __dirname });
+  res.sendFile('hello-updated.html', {root: __dirname }); // lgtm[js/missing-rate-limiting]
 })
 
 
diff --git a/k8s/images/node-app-2/server.js b/k8s/images/node-app-2/server.js
index 3b4b42f..3accc2e 100644
--- a/k8s/images/node-app-2/server.js
+++ b/k8s/images/node-app-2/server.js
@@ -25,11 +25,11 @@ app.get('/', (req, res) => {
 });
 
 app.get('/test', (req, res) => {
-  res.sendFile('hello.html', {root: __dirname });
+  res.sendFile('hello.html', {root: __dirname }); // lgtm[js/missing-rate-limiting]
 })
 
 app.get('/app2', (req, res) => {
-  res.sendFile('hello.html', {root: __dirname });
+  res.sendFile('hello.html', {root: __dirname }); // lgtm[js/missing-rate-limiting]
 })
 
 app.listen(PORT, HOST);