Browse Source

testing tests

pull/45/head
Petti, Ken 5 years ago
parent
commit
a23193b186
  1. 1
      helm-socks-frontend/templates/front-end-dep.yaml
  2. 13
      helm-socks-frontend/templates/front-end-int-svc.yaml
  3. 1
      helm-socks-frontend/templates/front-end-svc.yaml
  4. 4
      helm-socks-frontend/templates/namespace.yaml
  5. 24
      helm-socks-frontend/templates/tests/failure.yaml
  6. 22
      helm-socks-frontend/templates/tests/hook.yaml
  7. 24
      helm-socks-frontend/templates/tests/success.yaml
  8. 4
      helm-socks-frontend/templates/tests/test-namespace.yaml

1
helm-socks-frontend/templates/front-end-dep.yaml

@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "helm-socks-frontend.fullname" . }}
namespace: {{ include "helm-socks-frontend.fullname" . }}
labels:
{{- include "helm-socks-frontend.labels" . | nindent 4 }}
spec:

13
helm-socks-frontend/templates/front-end-int-svc.yaml

@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "helm-socks-frontend.fullname" . }}-int
labels:
{{- include "helm-socks-frontend.labels" . | nindent 4 }}
spec:
ports:
- port: 80
targetPort: 8079
selector:
name: front-end

1
helm-socks-frontend/templates/front-end-svc.yaml

@ -3,6 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "helm-socks-frontend.fullname" . }}
namespace: {{ include "helm-socks-frontend.fullname" . }}
labels:
{{- include "helm-socks-frontend.labels" . | nindent 4 }}
annotations:

4
helm-socks-frontend/templates/namespace.yaml

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ include "helm-socks-frontend.fullname" . }}

24
helm-socks-frontend/templates/tests/failure.yaml

@ -0,0 +1,24 @@
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ include "helm-socks-frontend.fullname" . }}-credentials-test-failure"
annotations:
helm.sh/hook: test-failure
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
namespace: {{ include "helm-socks-frontend.fullname" . }}-tests
spec:
template:
spec:
containers:
- name: check-service-up
image: appropriate/curl
command:
- 'curl'
- '-X'
- 'POST'
- '-H "Content-Type: application/json"'
- '-d "{"status":"failure"}"'
- 'https://webhook.site/c1d94793-b1b1-424b-b412-3f429a6825bb'
restartPolicy: Never

22
helm-socks-frontend/templates/tests/hook.yaml

@ -0,0 +1,22 @@
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ include "helm-socks-frontend.fullname" . }}-credentials-test"
annotations:
helm.sh/hook: test
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
namespace: {{ include "helm-socks-frontend.fullname" . }}-tests
spec:
template:
spec:
containers:
- name: check-service-up
image: appropriate/curl
command:
- 'curl'
- '-X'
- 'GET'
- 's-fe-helm-socks-frontend'
restartPolicy: Never

24
helm-socks-frontend/templates/tests/success.yaml

@ -0,0 +1,24 @@
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ include "helm-socks-frontend.fullname" . }}-credentials-test-success"
annotations:
helm.sh/hook: test-success
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
namespace: {{ include "helm-socks-frontend.fullname" . }}-tests
spec:
template:
spec:
containers:
- name: check-service-up
image: appropriate/curl
command:
- 'curl'
- '-X'
- 'POST'
- '-H "Content-Type: application/json"'
- '-d "{"status":"success"}"'
- 'https://webhook.site/c1d94793-b1b1-424b-b412-3f429a6825bb'
restartPolicy: Never

4
helm-socks-frontend/templates/tests/test-namespace.yaml

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ include "helm-socks-frontend.fullname" . }}-tests
Loading…
Cancel
Save