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):
try:
headers = flaskRequest.headers
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']:
app.logger.info('Request does not have an X-Gitlab-Token in headers')
return '{}', 403
......
apiVersion: networking.k8s.io/v1
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
namespace: "{{ .Values.k8sNamespace }}"
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-ingress"
labels:
app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-app"
group: "{{ .Values.k8sGroupName }}"
environment: "{{ .Values.k8sEnvironment }}"
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
......@@ -21,9 +17,6 @@ spec:
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-service"
port:
number: {{ .Values.k8sPort }}
serviceName: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-service"
servicePort: {{ .Values.k8sPort }}
Markdown is supported
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