apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: dev-cron-cancel-booking
spec:
  schedule: '*/15 * * * *'
  concurrencyPolicy: Replace
  suspend: false
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: cron-cancel-booking
            image: 414928843086.dkr.ecr.ap-southeast-1.amazonaws.com/core-api-v2:<VERSION>
            imagePullPolicy: Always
            args: ["run","start-cron:cancel-booking:prod"]
            env:
              - name: NODE_ENV
                value: development
              - name: PORT
                value: "3000"
              - name: HOST
                value: "0.0.0.0"
              - name: DB_DIALECT
                valueFrom:
                  secretKeyRef:
                    key: DB_DIALECT
                    name: core-api
              - name: DB_PORT
                valueFrom:
                  secretKeyRef:
                    key: DB_PORT
                    name: core-api
              - name: DB_HOST
                valueFrom:
                  secretKeyRef:
                    key: DB_HOST
                    name: core-api
              - name: DB_USERNAME
                valueFrom:
                  secretKeyRef:
                    key: DB_USERNAME
                    name: core-api
              - name: DB_PASSWORD
                valueFrom:
                  secretKeyRef:
                    key: DB_PASSWORD
                    name: core-api
              - name: DB_NAME
                valueFrom:
                  secretKeyRef:
                    key: DB_NAME
                    name: core-api
              - name: JWT_SECRET
                valueFrom:
                  secretKeyRef:
                    key: JWT_SECRET
                    name: core-api
              - name: JWT_EXPIRATION
                valueFrom:
                  secretKeyRef:
                    key: JWT_EXPIRATION
                    name: core-api
              - name: DEFAULT_COMMISSION
                valueFrom:
                  secretKeyRef:
                    key: DEFAULT_COMMISSION
                    name: core-api
              - name: TERMINATION_NOTICE_DAYS
                valueFrom:
                  secretKeyRef:
                    key: TERMINATION_NOTICE_DAYS
                    name: core-api
              - name: FILTER_BY_STOCK_URL
                valueFrom:
                  secretKeyRef:
                    name: core-api
                    key: FILTER_BY_STOCK_URL
              - name: TWILIO_ACCOUNT_SID
                valueFrom:
                  secretKeyRef:
                    key: TWILIO_ACCOUNT_SID
                    name: twilio-secret
              - name: TWILIO_AUTH_TOKEN
                valueFrom:
                  secretKeyRef:
                    key: TWILIO_AUTH_TOKEN
                    name: twilio-secret
              - name: TWILIO_SENDER_PHONE
                valueFrom:
                  secretKeyRef:
                    key: TWILIO_SENDER_PHONE
                    name: twilio-secret
              - name: AWS_S3_ACCESS_KEY
                valueFrom:
                  secretKeyRef:
                    key: AWS_S3_ACCESS_KEY
                    name: aws-secret
              - name: AWS_S3_SECRET_ACCESS_KEY
                valueFrom:
                  secretKeyRef:
                    key: AWS_S3_SECRET_ACCESS_KEY
                    name: aws-secret
              - name: AWS_S3_REGION
                valueFrom:
                  secretKeyRef:
                    key: AWS_S3_REGION
                    name: aws-secret
              - name: AWS_S3_BUCKET_NAME
                valueFrom:
                  secretKeyRef:
                    key: AWS_S3_BUCKET_NAME
                    name: aws-secret
              - name: AWS_S3_BUCKET_URL
                valueFrom:
                  secretKeyRef:
                    key: AWS_S3_BUCKET_URL
                    name: aws-secret
              - name: DEFAULT_RESIZE_WIDTH
                valueFrom:
                  secretKeyRef:
                    key: DEFAULT_RESIZE_WIDTH
                    name: aws-secret
              - name: SUPPORT_MIME_TYPE
                valueFrom:
                  secretKeyRef:
                    key: SUPPORT_MIME_TYPE
                    name: aws-secret
              - name: SENDGRID_API_KEY
                valueFrom:
                  secretKeyRef:
                    key: SENDGRID_API_KEY
                    name: core-api
              - name: REFRESH_TOKEN_EXPIRATION
                valueFrom:
                  secretKeyRef:
                    key: REFRESH_TOKEN_EXPIRATION
                    name: core-api
              - name: GOOGLE_CLIENT_ID
                valueFrom:
                  secretKeyRef:
                    key: GOOGLE_CLIENT_ID
                    name: google-secret
              - name: GOOGLE_CLIENT_SECRET
                valueFrom:
                  secretKeyRef:
                    key: GOOGLE_CLIENT_SECRET
                    name: google-secret
              - name: GOOGLE_CALLBACK_URL
                valueFrom:
                  secretKeyRef:
                    key: GOOGLE_CALLBACK_URL
                    name: google-secret
              - name: CLIENT_BASE_URL
                valueFrom:
                  secretKeyRef:
                    key: CLIENT_BASE_URL
                    name: google-secret
              - name: STRIPE_SECRET_KEY
                valueFrom:
                  secretKeyRef:
                    key: STRIPE_SECRET_KEY
                    name: stripe-secret
              - name: FACEBOOK_CLIENT_ID
                valueFrom:
                  secretKeyRef:
                    key: FACEBOOK_CLIENT_ID
                    name: facebook-secret
              - name: FACEBOOK_CLIENT_SECRET
                valueFrom:
                  secretKeyRef:
                    key: FACEBOOK_CLIENT_SECRET
                    name: facebook-secret
              - name: FACEBOOK_CALLBACK_URL
                valueFrom:
                  secretKeyRef:
                    key: FACEBOOK_CALLBACK_URL
                    name: facebook-secret
              - name: SITE_LINK_LOGIN_URL
                valueFrom:
                  secretKeyRef:
                    key: SITE_LINK_LOGIN_URL
                    name: sitelink-secret
              - name: SITE_LINK_UNITS_URL
                valueFrom:
                  secretKeyRef:
                    key: SITE_LINK_UNITS_URL
                    name: sitelink-secret
              - name: SITE_LINK_USER
                valueFrom:
                  secretKeyRef:
                    key: SITE_LINK_USER
                    name: sitelink-secret
              - name: SITE_LINK_PASS
                valueFrom:
                  secretKeyRef:
                    key: SITE_LINK_PASS
                    name: sitelink-secret
              - name: SITE_LINK_CODE
                valueFrom:
                  secretKeyRef:
                    key: SITE_LINK_CODE
                    name: sitelink-secret
              - name: SITE_LINK_COMMISSION_PERCENT
                valueFrom:
                  secretKeyRef:
                    key: SITE_LINK_COMMISSION_PERCENT
                    name: sitelink-secret
              - name: SITE_LINK_SITES_URL
                valueFrom:
                  secretKeyRef:
                    key: SITE_LINK_SITES_URL
                    name: sitelink-secret
              - name: BROWSER_URL
                valueFrom:
                  secretKeyRef:
                    key: BROWSERLESS_URL
                    name: sitelink-secret
              - name: GOGOX_CLIENT_ID
                valueFrom:
                  secretKeyRef:
                    name: gogox-secret
                    key: GOGOX_CLIENT_ID
              - name: GOGOX_CLIENT_SECRET
                valueFrom:
                  secretKeyRef:
                    name: gogox-secret
                    key: GOGOX_CLIENT_SECRET
              - name: GOGOX_API_URL
                valueFrom:
                  secretKeyRef:
                    name: gogox-secret
                    key: GOGOX_API_URL
              - name: YOTPO_API_KEY
                valueFrom:
                  secretKeyRef:
                    name: yotpo-secret
                    key: YOTPO_API_KEY
              - name: YOTPO_API_SECRET
                valueFrom:
                  secretKeyRef:
                    name: yotpo-secret
                    key: YOTPO_API_SECRET
              - name: SITE_LINK_USER_JWD
                valueFrom:
                  secretKeyRef:
                    name: sitelink-secret
                    key: SITE_LINK_USER_JWD
              - name: SITE_LINK_PASS_JWD
                valueFrom:
                  secretKeyRef:
                    name: sitelink-secret
                    key: SITE_LINK_PASS_JWD
              - name: SITE_LINK_CODE_JWD
                valueFrom:
                  secretKeyRef:
                    name: sitelink-secret
                    key: SITE_LINK_CODE_JWD
              - name: SITE_LINK_LOCATION_JWD
                valueFrom:
                  secretKeyRef:
                    name: sitelink-secret
                    key: SITE_LINK_LOCATION_JWD
              - name: RABBITMQ_URL
                valueFrom:
                  secretKeyRef:
                    name: site-stock-service
                    key: RABBITMQ_URL
              - name: SND_EXCHANGE
                valueFrom:
                  secretKeyRef:
                    name: site-stock-service
                    key: SND_EXCHANGE
              - name: SND_UPDATE_ES_KEY
                valueFrom:
                  secretKeyRef:
                    name: site-stock-service
                    key: SND_UPDATE_ES_KEY
              - name: SND_UPDATE_STOCK_KEY
                valueFrom:
                  secretKeyRef:
                    name: site-stock-service
                    key: SND_UPDATE_STOCK_KEY
              - name: CLEVERTAP_ACCOUNT_ID
                valueFrom:
                  secretKeyRef:
                    name: clevertap-secret
                    key: CLEVERTAP_ACCOUNT_ID
              - name: CLEVERTAP_ACCOUNT_PASSCODE
                valueFrom:
                  secretKeyRef:
                    name: clevertap-secret
                    key: CLEVERTAP_ACCOUNT_PASSCODE
          restartPolicy: OnFailure
