5154bad50d6c67c3bd1a6e24153977febe819428
[nonrtric/plt/ranpm.git] / install / helm / nrt-base-1 / charts / minio / templates / app-statefulset.yaml
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2023 Nordix Foundation. All rights reserved.
3 #  ========================================================================
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #  ============LICENSE_END=================================================
16 #
17
18 apiVersion: apps/v1
19 kind: StatefulSet
20 metadata:
21   name: minio
22   namespace: nonrtric
23   labels:
24     app: minio
25 spec:
26   serviceName: minio
27   replicas: 1
28   selector:
29     matchLabels:
30       app: minio
31   template:
32     metadata:
33       labels:
34         app: minio
35     spec:
36       initContainers:
37       - name: init
38         image: alpine:latest
39         imagePullPolicy: IfNotPresent
40         command: ["ash","-c"]
41         args: ["IDX=${HOSTNAME##*-} && mkdir -p /data/ && rm -rf /data//*"]
42         volumeMounts:
43         - mountPath: /data
44           name: data-vol
45       containers:
46       - name: minio
47         image: minio/minio:RELEASE.2023-02-27T18-10-45Z
48         imagePullPolicy: IfNotPresent
49         ports:
50         - name: tcpmain
51           containerPort: 9000
52         - name: httpweb
53           containerPort: 9001
54         args:
55         - server
56         - "--console-address"
57         - ":9001"
58         - /data/0/
59         env:
60         - name: MINIO_ROOT_USER
61           value: admin
62         - name: MINIO_ROOT_PASSWORD
63           value: adminadmin
64         - name: MINIO_POLICY_PLUGIN_URL
65           value: http://opa-minio.nonrtric:8181/v1/data/minio/authz/allow
66         - name: MINIO_IDENTITY_OPENID_CONFIG_URL
67           value: http://keycloak.nonrtric:8080/realms/nonrtric-realm/.well-known/openid-configuration
68         volumeMounts:
69         - mountPath: /data
70           name: data-vol
71       volumes:
72         - name: data-vol
73           emptyDir: {}
74
75