Updated installation and components
[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         # Note, in later releases only SSO seem to be possible
48         # so earlier release kept to be able to login with user/pwd
49         image: minio/minio:RELEASE.2022-10-21T22-37-48Z
50         imagePullPolicy: IfNotPresent
51         ports:
52         - name: tcpmain
53           containerPort: 9000
54         - name: httpweb
55           containerPort: 9001
56         args:
57         - server
58         - "--console-address"
59         - ":9001"
60         - /data/0/
61         env:
62         - name: MINIO_ROOT_USER
63           value: admin
64         - name: MINIO_ROOT_PASSWORD
65           value: adminadmin
66         - name: MINIO_POLICY_PLUGIN_URL
67           value: http://opa-minio.nonrtric:8181/v1/data/minio/authz/allow
68         - name: MINIO_IDENTITY_OPENID_CONFIG_URL
69           value: http://keycloak.nonrtric:8080/realms/nonrtric-realm/.well-known/openid-configuration
70         volumeMounts:
71         - mountPath: /data
72           name: data-vol
73       volumes:
74         - name: data-vol
75           emptyDir: {}
76
77