github.com/kyma-project/kyma-environment-broker@v0.0.1/utils/kyma-environments-cleanup-job/kyma-environments-cleanup-job.yaml (about) 1 apiVersion: batch/v1 2 kind: CronJob 3 metadata: 4 name: "kcp-kyma-environments-cleanup" 5 namespace: kcp-system 6 spec: 7 schedule: "0 0 * * *" 8 failedJobsHistoryLimit: 5 9 successfulJobsHistoryLimit: 1 10 concurrencyPolicy: Forbid 11 jobTemplate: 12 metadata: 13 labels: 14 cronjob: kyma-environments-cleanup 15 spec: 16 template: 17 metadata: 18 name: kyma-environments-cleanup-job 19 labels: 20 cronjob: kyma-environments-cleanup 21 spec: 22 shareProcessNamespace: true 23 serviceAccountName: kcp-kyma-environment-broker 24 securityContext: 25 runAsUser: 2000 26 restartPolicy: Never 27 containers: 28 - name: kyma-environments-cleanup 29 command: ["/bin/main"] 30 image: europe-docker.pkg.dev/kyma-project/prod/control-plane/kyma-environments-cleanup-job:v20231107-1e28423d 31 imagePullPolicy: IfNotPresent 32 env: 33 - name: DATABASE_EMBEDDED 34 value: "false" 35 - name: APP_MAX_AGE_HOURS 36 value: 24h 37 - name: APP_GARDENER_PROJECT 38 value: kyma-dev 39 - name: APP_GARDENER_KUBECONFIG_PATH 40 value: /gardener/kubeconfig/kubeconfig 41 - name: APP_PROVISIONER_URL 42 value: http://kcp-provisioner.kcp-system.svc.cluster.local:3000/graphql 43 - name: APP_DATABASE_SECRET_KEY 44 valueFrom: 45 secretKeyRef: 46 name: kcp-storage-client-secret 47 key: secretKey 48 optional: true 49 - name: APP_DATABASE_USER 50 valueFrom: 51 secretKeyRef: 52 key: postgresql-broker-username 53 name: kcp-postgresql 54 - name: APP_DATABASE_PASSWORD 55 valueFrom: 56 secretKeyRef: 57 key: postgresql-broker-password 58 name: kcp-postgresql 59 - name: APP_DATABASE_HOST 60 valueFrom: 61 secretKeyRef: 62 key: postgresql-serviceName 63 name: kcp-postgresql 64 - name: APP_DATABASE_PORT 65 valueFrom: 66 secretKeyRef: 67 key: postgresql-servicePort 68 name: kcp-postgresql 69 - name: APP_DATABASE_NAME 70 valueFrom: 71 secretKeyRef: 72 key: postgresql-broker-db-name 73 name: kcp-postgresql 74 - name: APP_DATABASE_SSLMODE 75 valueFrom: 76 secretKeyRef: 77 key: postgresql-sslMode 78 name: kcp-postgresql 79 - name: APP_DATABASE_SSLROOTCERT 80 value: /secrets/cloudsql-sslrootcert/server-ca.pem 81 - name: APP_BROKER_URL 82 value: http://kcp-kyma-environment-broker 83 volumeMounts: 84 - name: gardener-kubeconfig 85 mountPath: /gardener/kubeconfig 86 readOnly: true 87 - name: cloudsql-proxy 88 image: europe-docker.pkg.dev/kyma-project/prod/tpi/cloudsql-docker/gce-proxy:v1.33.8-afb993b8 89 imagePullPolicy: IfNotPresent 90 command: ${SCRIPT_CLOUDSQL_PROXY_COMMAND} # set by script 91 volumes: 92 - name: gardener-kubeconfig 93 secret: 94 secretName: gardener-credentials 95 defaultMode: 420 96 optional: true