apiVersion: apps/v1
kind: Deployment
metadata:
  name: jwt-decode
  namespace: api-gateway-system
  labels:
    app.kubernetes.io/instance: jwt-decode
    app.kubernetes.io/managed-by: tmax-cloud
    app.kubernetes.io/name: jwt-decode
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: jwt-decode
      app.kubernetes.io/name: jwt-decode
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: jwt-decode
        app.kubernetes.io/name: jwt-decode
    spec:
      containers:
        - env:
            - name: AUTH_HEADER_KEY
              value: Authorization
            - name: CACHE_ENABLED
              value: "true"
            - name: CLAIM_MAPPING_FILE_PATH
              value: /claim-mappings/config.json
            - name: JWKS_URL
              value: https://hyperauth.tmaxcloud.org/auth/realms/tmax/protocol/openid-connect/certs
            - name: LOG_LEVEL
              value: debug
            - name: LOG_TYPE
              value: pretty
            - name: MAX_CACHE_KEYS
              value: "10000"
            - name: PORT
              value: "8080"
            - name: TOKEN_VALIDATED_HEADER_KEY
              value: jwt-token-validated
          image: tmaxcloudck/jwt-decode:5.0.0.0
          imagePullPolicy: IfNotPresent
          name: traefik-jwt-decode
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
          resources: {}
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /claim-mappings
              name: claim-mappings
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
        - configMap:
            defaultMode: 420
            name: traefik-jwt-decode
          name: claim-mappings
