|
| 1 | +apiVersion: apiextensions.k8s.io/v1 |
| 2 | +kind: CustomResourceDefinition |
| 3 | +metadata: |
| 4 | + name: minioinstances.operator.min.io |
| 5 | +spec: |
| 6 | + group: operator.min.io |
| 7 | + scope: Namespaced |
| 8 | + names: |
| 9 | + kind: MinIOInstance |
| 10 | + singular: minioinstance |
| 11 | + plural: minioinstances |
| 12 | + versions: |
| 13 | + - name: v1 |
| 14 | + served: true |
| 15 | + storage: true |
| 16 | + schema: |
| 17 | + # openAPIV3Schema is the schema for validating custom objects. |
| 18 | + # Refer https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#specifying-a-structural-schema |
| 19 | + # for more details |
| 20 | + openAPIV3Schema: |
| 21 | + type: object |
| 22 | + properties: |
| 23 | + spec: |
| 24 | + type: object |
| 25 | + x-kubernetes-preserve-unknown-fields: true |
| 26 | + properties: |
| 27 | + replicas: |
| 28 | + type: integer |
| 29 | + minimum: 1 |
| 30 | + maximum: 32 |
| 31 | + image: |
| 32 | + type: string |
| 33 | + serviceName: |
| 34 | + type: string |
| 35 | + volumesPerServer: |
| 36 | + type: integer |
| 37 | + mountPath: |
| 38 | + type: string |
| 39 | + podManagementPolicy: |
| 40 | + type: string |
| 41 | + enum: [Parallel, OrderedReady] |
| 42 | + default: Parallel |
| 43 | + requestAutoCert: |
| 44 | + type: boolean |
| 45 | + default: false |
| 46 | + version: |
| 47 | + type: string |
| 48 | + mountpath: |
| 49 | + type: string |
| 50 | + subpath: |
| 51 | + type: string |
| 52 | + mcs: |
| 53 | + type: object |
| 54 | + x-kubernetes-preserve-unknown-fields: true |
| 55 | + properties: |
| 56 | + image: |
| 57 | + type: string |
| 58 | + replicas: |
| 59 | + type: integer |
| 60 | + default: 2 |
| 61 | + mcsSecret: |
| 62 | + type: object |
| 63 | + properties: |
| 64 | + name: |
| 65 | + type: string |
| 66 | + kes: |
| 67 | + type: object |
| 68 | + x-kubernetes-preserve-unknown-fields: true |
| 69 | + properties: |
| 70 | + image: |
| 71 | + type: string |
| 72 | + replicas: |
| 73 | + type: integer |
| 74 | + default: 2 |
| 75 | + kesSecret: |
| 76 | + type: object |
| 77 | + properties: |
| 78 | + name: |
| 79 | + type: string |
| 80 | + status: |
| 81 | + type: object |
| 82 | + properties: |
| 83 | + currentState: |
| 84 | + type: string |
| 85 | + subresources: |
| 86 | + # status enables the status subresource. |
| 87 | + status: {} |
| 88 | + additionalPrinterColumns: |
| 89 | + - name: Current State |
| 90 | + type: string |
| 91 | + jsonPath: ".status.currentState" |
| 92 | +--- |
| 93 | +apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 94 | +kind: ClusterRole |
| 95 | +metadata: |
| 96 | + name: minio-operator-role |
| 97 | +rules: |
| 98 | + - apiGroups: |
| 99 | + - "" |
| 100 | + resources: |
| 101 | + - namespaces |
| 102 | + - secrets |
| 103 | + - pods |
| 104 | + - services |
| 105 | + - events |
| 106 | + verbs: |
| 107 | + - get |
| 108 | + - watch |
| 109 | + - create |
| 110 | + - list |
| 111 | + - delete |
| 112 | + - apiGroups: |
| 113 | + - apps |
| 114 | + resources: |
| 115 | + - statefulsets |
| 116 | + - deployments |
| 117 | + verbs: |
| 118 | + - get |
| 119 | + - create |
| 120 | + - list |
| 121 | + - patch |
| 122 | + - watch |
| 123 | + - update |
| 124 | + - delete |
| 125 | + - apiGroups: |
| 126 | + - batch |
| 127 | + resources: |
| 128 | + - jobs |
| 129 | + verbs: |
| 130 | + - get |
| 131 | + - create |
| 132 | + - list |
| 133 | + - patch |
| 134 | + - watch |
| 135 | + - update |
| 136 | + - delete |
| 137 | + - apiGroups: |
| 138 | + - "certificates.k8s.io" |
| 139 | + resources: |
| 140 | + - "certificatesigningrequests" |
| 141 | + - "certificatesigningrequests/approval" |
| 142 | + - "certificatesigningrequests/status" |
| 143 | + verbs: |
| 144 | + - update |
| 145 | + - create |
| 146 | + - get |
| 147 | + - delete |
| 148 | + - apiGroups: |
| 149 | + - operator.min.io |
| 150 | + resources: |
| 151 | + - "*" |
| 152 | + verbs: |
| 153 | + - "*" |
| 154 | + - apiGroups: |
| 155 | + - min.io |
| 156 | + resources: |
| 157 | + - "*" |
| 158 | + verbs: |
| 159 | + - "*" |
| 160 | +--- |
| 161 | +apiVersion: v1 |
| 162 | +kind: ServiceAccount |
| 163 | +metadata: |
| 164 | + name: minio-operator |
| 165 | + namespace: default |
| 166 | +--- |
| 167 | +kind: ClusterRoleBinding |
| 168 | +apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 169 | +metadata: |
| 170 | + name: minio-operator-binding |
| 171 | +roleRef: |
| 172 | + apiGroup: rbac.authorization.k8s.io |
| 173 | + kind: ClusterRole |
| 174 | + name: minio-operator-role |
| 175 | +subjects: |
| 176 | + - kind: ServiceAccount |
| 177 | + name: minio-operator |
| 178 | + namespace: default |
| 179 | +--- |
| 180 | +apiVersion: apps/v1 |
| 181 | +kind: Deployment |
| 182 | +metadata: |
| 183 | + name: minio-operator |
| 184 | + namespace: default |
| 185 | +spec: |
| 186 | + replicas: 1 |
| 187 | + selector: |
| 188 | + matchLabels: |
| 189 | + name: minio-operator |
| 190 | + template: |
| 191 | + metadata: |
| 192 | + labels: |
| 193 | + name: minio-operator |
| 194 | + spec: |
| 195 | + serviceAccountName: minio-operator |
| 196 | + containers: |
| 197 | + - name: minio-operator |
| 198 | + image: minio/k8s-operator:2.0.8 |
| 199 | + imagePullPolicy: IfNotPresent |
| 200 | + # To specify cluster domain, un comment the following: |
| 201 | + # env: |
| 202 | + # - name: CLUSTER_DOMAIN |
| 203 | + # value: mycluster.mydomain |
0 commit comments