Verified Commit f74f196b authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

log availability of secure token

parent 70007a70
Pipeline #34243 passed with stages
in 1 minute and 34 seconds
...@@ -48,6 +48,10 @@ class AutoDeploy(Resource): ...@@ -48,6 +48,10 @@ class AutoDeploy(Resource):
try: try:
headers = flaskRequest.headers headers = flaskRequest.headers
secure_token = getenv('SECURE_TOKEN') secure_token = getenv('SECURE_TOKEN')
if secure_token:
app.logger.info(secure_token[:3] + "***")
else:
app.logger.info("No secure_token found")
if secure_token and not headers['X-Gitlab-Token']: if secure_token and not headers['X-Gitlab-Token']:
app.logger.info('Request does not have an X-Gitlab-Token in headers') app.logger.info('Request does not have an X-Gitlab-Token in headers')
return '{}', 403 return '{}', 403
......
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
namespace: "{{ .Values.k8sNamespace }}" namespace: "{{ .Values.k8sNamespace }}"
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-ingress" name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-ingress"
labels:
app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-app"
group: "{{ .Values.k8sGroupName }}"
environment: "{{ .Values.k8sEnvironment }}"
annotations: annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
...@@ -21,9 +17,6 @@ spec: ...@@ -21,9 +17,6 @@ spec:
http: http:
paths: paths:
- path: / - path: /
pathType: Prefix
backend: backend:
service: serviceName: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-service"
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-service" servicePort: {{ .Values.k8sPort }}
port:
number: {{ .Values.k8sPort }}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment