diff --git a/glance-system/glance-helper.yaml b/glance-system/glance-helper.yaml index 1411edd..0238466 100644 --- a/glance-system/glance-helper.yaml +++ b/glance-system/glance-helper.yaml @@ -349,65 +349,90 @@ data: apiVersion: apps/v1 kind: Deployment metadata: + annotations: + argocd.argoproj.io/tracking-id: glance:apps/Deployment:glance-system/glance-helper + deployment.kubernetes.io/revision: "9" + reloader.stakater.com/auto: "true" name: glance-helper namespace: glance-system - labels: - app.kubernetes.io/name: glance-helper spec: + progressDeadlineSeconds: 600 replicas: 1 + revisionHistoryLimit: 10 selector: matchLabels: - app.kubernetes.io/name: glance-helper + app: glance-helper + strategy: + type: Recreate template: metadata: + creationTimestamp: null labels: + app: glance-helper app.kubernetes.io/name: glance-helper spec: containers: - - name: glance-helper - image: python:3.12-bookworm - ports: - - containerPort: 8000 - env: - - name: IDOKEP_URL - value: "https://www.idokep.hu/idojaras/Budapest%20VII.%20ker" - - name: PLACE_NAME - value: "Budapest VII. ker" - - name: TZ - value: "Europe/Budapest" - - name: TANDOOR_INTERNAL_URL - value: "http://tandoor.tandoor-system.svc.cluster.local:8080" - - name: TANDOOR_PUBLIC_URL - value: "https://tandoor.dooplex.hu" - - name: GLANCE_HELPER_PUBLIC_URL - value: "https://glance-helper.dooplex.hu" - - name: GLANCE_HELPER_KEY - value: "oplQqnLnJK2vErRVYJpvVUcSDBOSbCHZSbsYY2bwSifgTMfT" - - name: DATA_DIR - value: "/data" - - name: TANDOOR_TOKEN - value: "tda_8a8b169c_5d1f_4962_83a2_0f2719c7d61a" - volumeMounts: - - name: app - mountPath: /app - - name: data - mountPath: /data - command: ["/bin/bash","-lc"] - args: - - | - set -e - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl tzdata dnsutils iputils-ping - pip install --no-cache-dir fastapi uvicorn requests beautifulsoup4 prometheus_client - cd /app - uvicorn app:APP --host 0.0.0.0 --port 8000 + - args: + - |- + set -eux; + export DEBIAN_FRONTEND=noninteractive; + apt-get update; + apt-get install -y --no-install-recommends curl ca-certificates iputils-ping dnsutils tzdata net-tools; + rm -rf /var/lib/apt/lists/*; + pip install --no-cache-dir fastapi uvicorn requests beautifulsoup4 prometheus-client; + python -c "import uvicorn; uvicorn.run('app:APP', host='0.0.0.0', port=8000)" + command: + - /bin/sh + - -lc + env: + - name: STAKATER_GLANCE_HELPER_APP_CONFIGMAP + value: c6e34df8429997db4bd9c1b119c5a6f1e2337ecb + - name: IDOKEP_URL + value: https://www.idokep.hu/idojaras/Budapest%20VII.%20ker + - name: PLACE_NAME + value: Budapest VII. ker + - name: TANDOOR_INTERNAL_URL + value: http://tandoor.tandoor-system.svc.cluster.local:8080 + - name: TANDOOR_PUBLIC_URL + value: https://tandoor.dooplex.hu + - name: TANDOOR_TOKEN + value: tda_8a8b169c_5d1f_4962_83a2_0f2719c7d61a + - name: GLANCE_HELPER_PUBLIC_URL + value: https://glance-helper.dooplex.hu + - name: DATA_DIR + value: /data + - name: GLANCE_HELPER_KEY + value: oplQqnLnJK2vErRVYJpvVUcSDBOSbCHZSbsYY2bwSifgTMfT + - name: TZ + value: Europe/Budapest + image: python:3.12-bookworm + imagePullPolicy: IfNotPresent + name: glance-helper + ports: + - containerPort: 8000 + protocol: TCP + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /app + name: app + - mountPath: /data + name: data + workingDir: /app + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 volumes: - - name: app - configMap: - name: glance-helper-app - - name: data - persistentVolumeClaim: - claimName: glance-helper-data + - configMap: + defaultMode: 420 + name: glance-helper-app + name: app + - name: data + persistentVolumeClaim: + claimName: glance-helper-data --- apiVersion: v1 kind: Service