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 3dfc550 Misc changes on helm charts and fix the tests (#88)
3dfc550 is described below
commit 3dfc550c8afd73ab508e952e8337c756bd1c2115
Author: Kit Chan <[email protected]>
AuthorDate: Wed May 26 16:21:43 2021 -0700
Misc changes on helm charts and fix the tests (#88)
---
charts/ats-ingress/templates/deployment.yaml | 14 ++++++++------
charts/ats-ingress/values.yaml | 4 ++++
docs/ats-ingress-0.1.0.tgz | Bin 5063 -> 5111 bytes
docs/index.yaml | 6 +++---
tests/data/setup/traffic-server/ats-deployment.yaml | 19 +++++++++----------
tests/suite/test_ingress.py | 20 ++++++++++----------
6 files changed, 34 insertions(+), 29 deletions(-)
diff --git a/charts/ats-ingress/templates/deployment.yaml
b/charts/ats-ingress/templates/deployment.yaml
index fef27be..2bf32b1 100644
--- a/charts/ats-ingress/templates/deployment.yaml
+++ b/charts/ats-ingress/templates/deployment.yaml
@@ -57,6 +57,10 @@ spec:
spec:
serviceAccountName: {{ include "ats-ingress.serviceAccountName" . }}
terminationGracePeriodSeconds: {{
.Values.controller.terminationGracePeriodSeconds }}
+{{- with .Values.controller.topologySpreadConstraints }}
+ topologySpreadConstraints:
+ {{- toYaml . | nindent 8 }}
+{{- end }}
{{- if .Values.controller.podSecurityContext }}
securityContext:
{{ toYaml .Values.controller.podSecurityContext | indent 8 }}
@@ -95,9 +99,8 @@ spec:
mountPath: {{ .Values.controller.log.trafficserver.dir }}
- name: log-ingress
mountPath: {{ .Values.controller.log.ingress.dir }}
- {{- range .Values.controller.extraVolumeMounts }}
- - name: {{ .key }}
- value: {{ .value }}
+ {{- if .Values.controller.extraVolumeMounts -}}
+ {{- toYaml .Values.controller.extraVolumeMounts | nindent 10 }}
{{- end }}
env:
- name: POD_NAME
@@ -110,9 +113,8 @@ spec:
fieldPath: metadata.namespace
- name: POD_TLS_PATH
value: {{ .Values.controller.ssl.path | quote }}
- {{- range .Values.controller.extraEnvs }}
- - name: {{ .name }}
- value: {{ .value }}
+ {{- if .Values.controller.extraEnvs -}}
+ {{- toYaml .Values.controller.extraEnvs | nindent 10 }}
{{- end }}
ports:
- containerPort: 8080
diff --git a/charts/ats-ingress/values.yaml b/charts/ats-ingress/values.yaml
index 6ac2a07..b71eebf 100644
--- a/charts/ats-ingress/values.yaml
+++ b/charts/ats-ingress/values.yaml
@@ -165,6 +165,10 @@ controller:
## ref:
https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
+ ## Topology spread constraints
+ ## ref:
https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
+ topologySpreadConstraints: []
+
## Pod DNS Config
## ref:
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
dnsConfig: {}
diff --git a/docs/ats-ingress-0.1.0.tgz b/docs/ats-ingress-0.1.0.tgz
index 6d27920..25bd6e2 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 69a4340..5e716dc 100644
--- a/docs/index.yaml
+++ b/docs/index.yaml
@@ -3,12 +3,12 @@ entries:
ats-ingress:
- apiVersion: v2
appVersion: 0.1.0
- created: "2021-05-25T16:47:19.890189-07:00"
+ created: "2021-05-26T16:16:45.441455-07:00"
description: A Helm chart for Kubernetes
- digest: 96b1b44a14ab759231403351a4bda7b725f531d940ad7c27502a6f1a0aafa63a
+ digest: c892ccd1876b1634b7d76a11d0388c1e22bf11e5c89b29af9407511bd6644538
name: ats-ingress
type: application
urls:
-
https://apache.github.io/trafficserver-ingress-controller/ats-ingress-0.1.0.tgz
version: 0.1.0
-generated: "2021-05-25T16:47:19.8881-07:00"
+generated: "2021-05-26T16:16:45.440577-07:00"
diff --git a/tests/data/setup/traffic-server/ats-deployment.yaml
b/tests/data/setup/traffic-server/ats-deployment.yaml
index d432c4a..79dd276 100644
--- a/tests/data/setup/traffic-server/ats-deployment.yaml
+++ b/tests/data/setup/traffic-server/ats-deployment.yaml
@@ -68,12 +68,10 @@ spec:
- name: POD_TLS_PATH
value: "/etc/ats/ssl"
ports:
- - containerPort: 80
- hostPort: 80
+ - containerPort: 8080
name: http
protocol: TCP
- - containerPort: 443
- hostPort: 443
+ - containerPort: 8443
name: https
protocol: TCP
- name: log-collector
@@ -86,6 +84,7 @@ spec:
- name: trafficserver-exporter
image: ats-ingress-exporter:latest
imagePullPolicy: IfNotPresent
+ args: ["--endpoint=http://127.0.0.1:8080/_stats"]
ports:
- containerPort: 9122
volumes:
@@ -109,14 +108,14 @@ spec:
type: NodePort
ports:
- name: http
- port: 80
+ port: 8080
protocol: TCP
- targetPort: 80
- nodePort: 30000
+ targetPort: 8080
+ nodePort: 30080
- name: https
- port: 443
+ port: 8443
protocol: TCP
- targetPort: 443
- nodePort: 30043
+ targetPort: 8443
+ nodePort: 30443
selector:
app: trafficserver-test
diff --git a/tests/suite/test_ingress.py b/tests/suite/test_ingress.py
index 9ccd10a..dd05374 100644
--- a/tests/suite/test_ingress.py
+++ b/tests/suite/test_ingress.py
@@ -105,7 +105,7 @@ def get_expected_response_app2():
class TestIngress:
def test_basic_routing_edge_app1(self, minikubeip):
- req_url = "http://" + minikubeip + ":30000/app1"
+ req_url = "http://" + minikubeip + ":30080/app1"
resp = requests.get(req_url, headers={"host": "test.edge.com"})
assert resp.status_code == 200,\
@@ -113,7 +113,7 @@ class TestIngress:
assert ' '.join(resp.text.split()) == get_expected_response_app1()
def test_basic_routing_media_app1(self, minikubeip):
- req_url = "http://" + minikubeip + ":30000/app1"
+ req_url = "http://" + minikubeip + ":30080/app1"
resp = requests.get(req_url, headers={"host": "test.media.com"})
assert resp.status_code == 200,\
@@ -121,7 +121,7 @@ class TestIngress:
assert ' '.join(resp.text.split()) == get_expected_response_app1()
def test_basic_routing_edge_app2(self, minikubeip):
- req_url = "http://" + minikubeip + ":30000/app2"
+ req_url = "http://" + minikubeip + ":30080/app2"
resp = requests.get(req_url, headers={"host": "test.edge.com"})
assert resp.status_code == 200,\
@@ -129,7 +129,7 @@ class TestIngress:
assert ' '.join(resp.text.split()) == get_expected_response_app2()
def test_basic_routing_media_app2(self, minikubeip):
- req_url = "http://" + minikubeip + ":30000/app2"
+ req_url = "http://" + minikubeip + ":30080/app2"
resp = requests.get(req_url, headers={"host": "test.media.com"})
assert resp.status_code == 200,\
@@ -137,7 +137,7 @@ class TestIngress:
assert ' '.join(resp.text.split()) == get_expected_response_app2()
def test_basic_routing_edge_app2_https(self, minikubeip):
- req_url = "https://" + minikubeip + ":30043/app2"
+ req_url = "https://" + minikubeip + ":30443/app2"
resp = requests.get(req_url, headers={"host": "test.edge.com"},
verify=False)
assert resp.status_code == 200,\
@@ -146,7 +146,7 @@ class TestIngress:
def test_updating_ingress_media_app2(self, minikubeip):
kubectl_apply('data/ats-ingress-update.yaml')
- req_url = "http://" + minikubeip + ":30000/app2"
+ req_url = "http://" + minikubeip + ":30080/app2"
resp = requests.get(req_url, headers={"host": "test.media.com"})
assert resp.status_code == 200,\
@@ -155,7 +155,7 @@ class TestIngress:
def test_deleting_ingress_media_app2(self, minikubeip):
kubectl_apply('data/ats-ingress-delete.yaml')
- req_url = "http://" + minikubeip + ":30000/app2"
+ req_url = "http://" + minikubeip + ":30080/app2"
resp = requests.get(req_url, headers={"host": "test.media.com"})
assert resp.status_code == 404,\
@@ -163,7 +163,7 @@ class TestIngress:
def test_add_ingress_media(self, minikubeip):
kubectl_apply('data/ats-ingress-add.yaml')
- req_url = "http://" + minikubeip + ":30000/test"
+ req_url = "http://" + minikubeip + ":30080/test"
resp = requests.get(req_url, headers={"host": "test.media.com"})
assert resp.status_code == 200,\
@@ -172,11 +172,11 @@ class TestIngress:
def test_snippet_edge_app2(self, minikubeip):
kubectl_apply('data/ats-ingress-snippet.yaml')
- req_url = "http://" + minikubeip + ":30000/app2"
+ req_url = "http://" + minikubeip + ":30080/app2"
resp = requests.get(req_url, headers={"host":
"test.edge.com"},allow_redirects=False)
assert resp.status_code == 301,\
f"Expected: 301 response code for test_snippet_edge_app2"
assert resp.headers['Location'] == 'https://test.edge.com/app2'
-
\ No newline at end of file
+