Skip to content

Instantly share code, notes, and snippets.

@arsalanses
Last active October 17, 2024 12:10
Show Gist options
  • Save arsalanses/91da6ddaafe1cf5f55149b32df9aba6e to your computer and use it in GitHub Desktop.
Save arsalanses/91da6ddaafe1cf5f55149b32df9aba6e to your computer and use it in GitHub Desktop.
arvancaas minio api svc ingress
apiVersion: batch/v1
kind: CronJob
metadata:
name: minio-cleanup
namespace: devops-storage
spec:
schedule: "0 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: minio-cleanup
image: minio/mc
command:
- /bin/sh
- -c
- |
mc alias set miniocaas https://minio.io:9000 secret access
mc find miniocaas/bucket --larger 4m --older-than 12h --exec "mc rm {}"
restartPolicy: OnFailure
# kubectl create job --from=cronjob/minio-cleanup manual01
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app-minio-api
namespace: devops
labels:
app.kubernetes.io/instance: app-minio
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: minio
app.kubernetes.io/version: 2024.10.2
helm.sh/chart: minio-14.7.15
annotations: {}
spec:
rules:
- host: minio-api.apps.ir-thr-ba1.arvancaas.ir
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: app-minio
port:
name: minio-api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment