diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..6e9f482a7f7c3e86dc8e81d263dacbbd608c2f81 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,4 @@ +include: + - project: 'platform-one/big-bang/pipeline-templates/pipeline-templates' + ref: master + file: '/templates/package-tests.yml' diff --git a/CODEOWNERS.txt b/CODEOWNERS.txt index 3d0f6553fe4b783523e9f6dad9574685970aad90..727de5d84662855ecdc6ef6205eb513dbcaa80de 100644 --- a/CODEOWNERS.txt +++ b/CODEOWNERS.txt @@ -1 +1 @@ -* @big-bang +* @big-bang @LynnStill diff --git a/README.md b/README.md index 4fa3c558bcaf4d753cafe7a674a877c5ee7fa7d2..e558b7ecea5fee87db8d7079346e2e11f68a103e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ -# Minio Operator +# Minio Instances Project [here](https://github.com/minio/minio-operator). MinIO is a high performance, distributed object storage system. It is software-defined, runs on industry standard hardware and is 100% open source under the Apache V2 license. -App Version: Operator 2.0.9, instance 2.0.9 +Operator version based on: 2.0.9 +Instance deployment version: 2.0.9 Plugins: Additional docs for using and its plugins can be found at $URL @@ -58,4 +59,17 @@ git add . git commit -m "Made a change for reasons" Push commits to upstream branch git push -u origin -Create a new merge request \ No newline at end of file +Create a new merge request + +# MINIO Operator + +Minio Operator on Kubernetes Operator chart. + + +## Deployment +``` +git clone https://repo1.dsop.io/platform-one/big-bang/apps/application-utilities/minio.git +cd minio +helm install minio chart +``` + diff --git a/chart/Chart.yaml b/chart/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1faeae47ccb83cabf5452a08bedabb4db348ba6f --- /dev/null +++ b/chart/Chart.yaml @@ -0,0 +1,30 @@ +apiVersion: v2 + +name: minio-instance + +description: |- + A Helm chart for deploying the Minio instances based on use of the Minio operator + +#home: https://github.com/elastic/cloud-on-k8s + +type: application + +version: 1.0.0 + +appVersion: 2.0.9 + +kubeVersion: ">=1.12.0-0" + +keywords: + - Minio + - Instance + +maintainers: + - name: me + email: + +dependencies: +# - name: eck-operator-crds +# version: 1.3.0 +# condition: installCRDs +# repository: "file://eck-operator-crds" diff --git a/chart/templates/default-secret.yaml b/chart/templates/default-secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c79e87de13e6aad205d6dd03a06e327dd3e2d964 --- /dev/null +++ b/chart/templates/default-secret.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: default-minio-creds-secret + namespace: {{ .Release.Namespace }} +type: Opaque +data: + accesskey: bWluaW8= # base 64 encoded "minio" (echo -n 'minio' | base64) + secretkey: bWluaW8xMjM= # based 64 encoded "minio123" (echo -n 'minio123' | base64) +--- diff --git a/chart/templates/minioinstance.yaml b/chart/templates/minioinstance.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c5637d72b18b693b43dbee4eb15c60babfd8a5ac --- /dev/null +++ b/chart/templates/minioinstance.yaml @@ -0,0 +1,101 @@ +apiVersion: operator.min.io/v1 +kind: MinIOInstance +metadata: + name: minio +## If specified, MinIOInstance pods will be dispatched by specified scheduler. +## If not specified, the pod will be dispatched by default scheduler. +# scheduler: +# name: my-custom-scheduler +spec: + ## Add metadata to the all pods created by the StatefulSet + metadata: + ## Optionally pass labels to be applied to the statefulset pods + labels: + app: minio + annotations: + prometheus.io/path: /minio/prometheus/metrics + prometheus.io/port: "9000" + prometheus.io/scrape: "true" + ## Registry location and Tag to download MinIO Server image + image: {{ .Values.image.name }}:{{ .Values.image.tag }} + serviceAccountName: {{ .Values.serviceAccountName }} + ## A ClusterIP Service will be created with the given name + serviceName: minio-internal-service + zones: + - name: "zone-0" + ## Number of MinIO servers/pods in this zone. + ## For standalone mode, supply 1. For distributed mode, supply 4 or more. + ## Note that the operator does not support upgrading from standalone to distributed mode. + servers: {{ .Values.zones.servers }} + ## Supply number of volumes to be mounted per MinIO server instance. + ## 2 is minimum volumes with 3 servers + volumesPerServer: {{ .Values.volumesPerServer }} + ## Mount path where PV will be mounted inside container(s). Defaults to "/export". + mountPath: /export + ## Sub path inside Mount path where MinIO starts. Defaults to "". + # subPath: /data + ## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO cluster. + ## Please do not change the volumeClaimTemplate field while expanding the cluster, this may + ## lead to unbound PVCs and missing data + volumeClaimTemplate: + metadata: + name: data + spec: + accessModes: + - {{ .Values.volumeClaimTemplate.accessModes}} + resources: + requests: + storage: {{ .Values.volumeClaimTemplate.storage}} + ## Secret with credentials to be used by MinIO instance. + credsSecret: + name: {{ .Values.minioUICreds }} + ## PodManagement policy for pods created by StatefulSet. Can be "OrderedReady" or "Parallel" + ## Refer https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#pod-management-policy + ## for details. Defaults to "Parallel" + podManagementPolicy: Parallel + ## Secret with certificates to configure TLS for MinIO certs. Create secrets as explained + ## here: https://github.com/minio/minio/tree/master/docs/tls/kubernetes#2-create-kubernetes-secret + # externalCertSecret: + # name: tls-ssl-minio + ## Enable Kubernetes based certificate generation and signing as explained in + ## https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster + requestAutoCert: false + ## Used when "requestAutoCert" is set to true. Set CommonName for the auto-generated certificate. + ## Internal DNS name for the pod will be used if CommonName is not provided. + ## DNS name format is minio-{0...3}.minio.default.svc.cluster.local + certConfig: + commonName: "" + organizationName: [] + dnsNames: [] + ## Used to specify a toleration for a pod + # tolerations: + # - effect: NoSchedule + # key: dedicated + # operator: Equal + # value: storage + ## Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config) + # env: + # - name: MINIO_BROWSER + # value: "off" # to turn-off browser + # - name: MINIO_STORAGE_CLASS_STANDARD + # value: "EC:2" + ## Configure resource requests and limits for MinIO containers + # resources: + # requests: + # memory: 20Gi + ## Liveness probe detects situations where MinIO server instance + ## is not working properly and needs restart. Kubernetes automatically + ## restarts the pods if liveness checks fail. + liveness: + initialDelaySeconds: 10 + periodSeconds: 1 + timeoutSeconds: 1 + ## nodeSelector parameters for MinIO Pods. It specifies a map of key-value pairs. For the pod to be + ## eligible to run on a node, the node must have each of the + ## indicated key-value pairs as labels. + ## Read more here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + # nodeSelector: + # disktype: ssd + ## Affinity settings for MinIO pods. Read more about affinity + ## here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity. + # affinity: diff --git a/chart/templates/service-account.yaml b/chart/templates/service-account.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cb910dc4ccf910cba0804d8ab2f18f1302b06995 --- /dev/null +++ b/chart/templates/service-account.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccountName }} + namespace: {{ .Release.Namespace }} +imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 2 }} diff --git a/chart/templates/service.yaml b/chart/templates/service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e2cd82ed790c3fdfa34932a7429fd9206063c5e1 --- /dev/null +++ b/chart/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: minio-service +spec: + type: ClusterIP + ports: + - port: 9000 + targetPort: 9000 + protocol: TCP + # Optional field + # By default and for convenience, the Kubernetes control plane will allocate a port from a range (default: 30000-32767) + # nodePort: 30007 + selector: + app: minio diff --git a/chart/values.yaml b/chart/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2f2c57e9298d8b21221d5c2f03912642a1b89cc1 --- /dev/null +++ b/chart/values.yaml @@ -0,0 +1,26 @@ +# Configure number of MinIO Operator Deployment Replicas +replicas: + count: 1 + +# Configure repo and tag of MinIO Operator Image +image: + name: registry1.dso.mil/ironbank/opensource/minio/minio + tag: RELEASE.2020-07-02T00-15-09Z + imagePullPolicy: IfNotPresent + +zones: + # refer to documentation for number of servers versus volumes per server + # https://docs.min.io/docs/minio-server-limits-per-tenant.html + servers: 3 # scale to 3 for dev + +volumesPerServer: 2 # 2 is minimum volumes with 3 servers + +volumeClaimTemplate: + accessModes: ReadWriteOnce + storage: 1Gi # scale down for dev + +minioUICreds: default-minio-creds-secret + +imagePullSecrets: [ ] + +serviceAccountName: minio-service-account \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 3116a21a55cbadf105068144d6d32b5185c6eacf..44c854fcda96b7968a9c7edd7d55342bb18bdb1b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,3 +1,6 @@ + + + # Minio Operator Project [here](https://github.com/minio/minio-operator). diff --git a/tests/dependencies.yaml b/tests/dependencies.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2f46730f8243bb623c9ca74299510470c60f2cf2 --- /dev/null +++ b/tests/dependencies.yaml @@ -0,0 +1,4 @@ +dependencyname: + git: "https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio-operator.git" + tag: "2.0.9-bb.1" + namespace: "minio-operator" diff --git a/tests/test-values.yml b/tests/test-values.yml new file mode 100644 index 0000000000000000000000000000000000000000..7640ac2b6372dbb84c49c3df85302be28aa4d854 --- /dev/null +++ b/tests/test-values.yml @@ -0,0 +1,25 @@ +# Configure number of MinIO Operator Deployment Replicas +replicas: + count: 1 + +# Configure repo and tag of MinIO Operator Image +image: + name: registry1.dso.mil/ironbank/opensource/minio/minio + tag: RELEASE.2020-07-02T00-15-09Z + imagePullPolicy: IfNotPresent + +zones: + # refer to documentation for number of servers versus volumes per server + # https://docs.min.io/docs/minio-server-limits-per-tenant.html + servers: 3 # scale to 3 for dev + +volumesPerServer: 2 # 2 is minimum volumes with 3 servers + +volumeClaimTemplate: + accessModes: ReadWriteOnce + storage: 1Gi # scale down for dev + +minioUICreds: default-minio-creds-secret + +imagePullSecrets: + - name: private-registry-mil \ No newline at end of file