Skip to content

Commit

Permalink
wrc141 Disable giftless debug (#45)
Browse files Browse the repository at this point in the history
* default env var to false

* correct templating

* set variable to empty, as unsetting it completely doesnt work well
  • Loading branch information
mixmixmix authored Nov 28, 2024
1 parent 8ad6181 commit a1169d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions group_vars/all/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ use_giftless: false
giftless_url: "http://{{ ckan_fqdn }}/giftless"
giftless_image: "ghcr.io/fjelltopp/fjelltopp-base-images/giftless"
giftless_version: "v0.4.0-fjelltopp"
giftless_debug: "false" #set to literal "true" to enable

# Google analytics
ckan_googleanalytics_enable: false
Expand Down
21 changes: 12 additions & 9 deletions roles/ckan/templates/kubernetes/giftless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type: Opaque
---
apiVersion: apps/v1
kind: Deployment
metadata:
metadata:
name: giftless
annotations:
reloader.stakater.com/auto: "true"
Expand All @@ -29,11 +29,11 @@ spec:
strategy:
type: Recreate
selector:
matchLabels:
matchLabels:
app: giftless
template:
metadata:
labels:
labels:
app: giftless
spec:
containers:
Expand All @@ -51,8 +51,13 @@ spec:
- --http
- 0.0.0.0:5001
env:
{% if giftless_debug == 'true' %}
- name: GIFTLESS_DEBUG
value: "1"
{% else %}
- name: GIFTLESS_DEBUG
value: ""
{% endif %}
- name: GIFTLESS_CONFIG_FILE
value: /app/giftless.yaml
image: "{{ giftless_image }}:{{ giftless_version }}"
Expand Down Expand Up @@ -80,15 +85,15 @@ spec:
---
apiVersion: v1
kind: Service
metadata:
metadata:
name: giftless
{% if fjelltopp_env_type != 'local' and giftless_s3_bucket is defined %}
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: {{ certificate_acm.certificates[0].certificate_arn }}
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "giftless-http"
{% endif %}
{% if giftless_azure_blob_string is defined %}
{% if giftless_azure_blob_string is defined %}
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "true"
service.beta.kubernetes.io/azure-pls-create: "true"
Expand All @@ -98,13 +103,11 @@ metadata:
service.beta.kubernetes.io/azure-pls-visibility: "*"
{% endif %}
spec:
{% if giftless_azure_blob_string is defined %}
{% if giftless_azure_blob_string is defined %}
type: LoadBalancer
{% endif %}
ports:
- name: 'giftless-http'
port: 5001
selector:
selector:
app: giftless


0 comments on commit a1169d7

Please sign in to comment.