a7fd28ee by Adam Heath

A simple single-node minio instance.

1 parent ac6237ff
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./minio-simple.yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: minio-simple-configenv
data:
configenv: null
---
apiVersion: v1
kind: ConfigMap
metadata:
name: minio-simple
data:
---
apiVersion: v1
kind: Secret
metadata:
name: minio-simple
stringData:
access_key: admin
secret_key: admin
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-simple-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: minio-simple
spec:
type: ClusterIP
selector:
app: minio-simple
ports:
- name: http-minio
protocol: TCP
port: 9000
targetPort: 9000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio-simple
labels:
app: minio-simple
spec:
selector:
matchLabels:
app: minio-simple
template:
metadata:
labels:
app: minio-simple
spec:
restartPolicy: Always
securityContext:
runAsUser: 0
runAsGroup: 0
volumes:
- name: minio-simple-data
persistentVolumeClaim:
claimName: minio-simple-data
- name: configenv
configMap:
name: minio-simple-configenv
items:
- key: configenv
path: config.env
- name: access-secrets
secret:
secretName: minio-simple
items:
- key: access_key
path: access_key
- key: secret_key
path: secret_key
containers:
- name: minio
image: minio/minio
args: ["server", "/data"]
env:
- name: MINIO_ACCESS_KEY_FILE
value: /access-secrets/access_key
- name: MINIO_SECRET_KEY_FILE
value: /access-secrets/secret_key
- name: MINIO_ROOT_USER_FILE
value: /access-secrets/access_key
- name: MINIO_ROOT_PASSWORD_FILE
value: /access-secrets/secret_key
- name: MINIO_CONFIG_ENV_FILE
value: /configenv/config.env
envFrom:
- configMapRef:
name: minio-simple
volumeMounts:
- name: configenv
mountPath: /configenv
- name: access-secrets
mountPath: /access-secrets
- name: minio-simple-data
mountPath: /data
namespace: default
name: test
minio:
enabled: true
configenv: ''
config: {}
persistence:
storageClass: null
size: 500M
access_key: admin
secret_key: adminsecret
bases:
- ../common/environments.yaml
---
repositories:
releases:
- name: minio-simple
chart: charts/minio-simple
namespace: {{ .Values.namespace }}
condition: minio.enabled
values:
- namePrefix: {{ .Values.name }}-
strategicMergePatches:
- apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Values.namespace }}
name: {{ .Values.name }}-minio-simple-configenv
data:
configenv: {{ .Values.configenv | quote }}
- apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Values.namespace }}
name: {{ .Values.name }}-minio-simple
data:
{{ .Values.config | toYaml | nindent 12 }}
- apiVersion: v1
kind: Secret
metadata:
namespace: {{ .Values.namespace }}
name: {{ .Values.name }}-minio-simple
stringData:
access_key: {{ .Values.access_key | quote }}
secret_key: {{ .Values.secret_key | quote }}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: {{ .Values.namespace }}
name: {{ .Values.name }}-minio-simple-data
spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
- apiVersion: v1
kind: Service
metadata:
namespace: {{ .Values.namespace }}
name: {{ .Values.name }}-minio-simple
spec:
selector:
app: {{ .Values.name }}-minio-simple
- apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ .Values.namespace }}
name: {{ .Values.name }}-minio-simple
labels:
app: {{ .Values.name }}-minio-simple
spec:
selector:
matchLabels:
app: {{ .Values.name }}-minio-simple
template:
metadata:
labels:
app: {{ .Values.name }}-minio-simple