blob: 50ea488dcdf3e5907e40a994a829b60a1c939ce4 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: submarine-minio-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: "submarine-storageclass"
resources:
requests:
storage: "10Gi"
---
apiVersion: v1
kind: Service
metadata:
name: submarine-minio-service
spec:
type: ClusterIP
selector:
app: submarine-minio
ports:
- protocol: TCP
port: 9000
targetPort: 9000
name: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: submarine-minio
spec:
selector:
matchLabels:
app: submarine-minio
template:
metadata:
labels:
app: submarine-minio
annotations:
sidecar.istio.io/inject: "false"
spec:
serviceAccountName: "submarine-storage"
containers:
- name: submarine-minio-container
image: minio/minio:RELEASE.2021-02-14T04-01-33Z
imagePullPolicy: IfNotPresent
args:
- server
- /data
env:
- name: MINIO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: submarine-minio-secret
key: MINIO_ACCESS_KEY
- name: MINIO_SECRET_KEY
valueFrom:
secretKeyRef:
name: submarine-minio-secret
key: MINIO_SECRET_KEY
ports:
- containerPort: 9000
volumeMounts:
- mountPath: "/data"
name: "volume"
subPath: "submarine-minio"
volumes:
- name: "volume"
persistentVolumeClaim:
claimName: "submarine-minio-pvc"
---
apiVersion: v1
kind: Secret
metadata:
name: submarine-minio-secret
type: Opaque
stringData:
MINIO_ACCESS_KEY: "submarine_minio"
MINIO_SECRET_KEY: "submarine_minio"