Skip to content

rllzyy/minio-resources-operator

Repository files navigation

Minio Resources Operator

Kubernetes Operator that manage buckets and users on a Minio server.

Docker Pulls

Develop

  • Open directory in VSCode as a container.
  • Configure Kubernetes client in the container, such as create a /root/.kube/config file.
  • Run task Install CRDs to create CRD.

You can run operator by running task Run Operator.

Installation

Install helm chart minio-resources-operator version 0.1.3 in repository https://robotinfra-charts.sgp1.digitaloceanspaces.com/.

Values can be found at deploy/values.yaml.

Usage

Create a MinioServer:

apiVersion: minio.robotinfra.com/v1alpha1
kind: MinioServer
metadata:
  name: test
spec:
  hostname: myserver.example.com
  port: 9000
  accessKey: admin
  secretKey: testtest
  ssl: false

Create a MinioBucket:

apiVersion: minio.robotinfra.com/v1alpha1
kind: MinioBucket
metadata:
  name: bucket
spec:
  name: mybucket
  server: test
  policy: |
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Action": [
            "s3:GetObject"
          ],
          "Effect": "Allow",
          "Principal": {
            "AWS": ["*"]
          },
          "Resource": [
            "arn:aws:s3:::mybucket/*"
          ],
          "Sid": ""
        }
      ]
    }

Create a MinioUser:

apiVersion: minio.robotinfra.com/v1alpha1
kind: MinioUser
metadata:
  name: test
spec:
  server: test
  accessKey: myUsername
  secretKey: mySecurePassword
  policy: |
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Action": [
            "s3:*"
          ],
          "Effect": "Allow",
          "Resource": [
            "arn:aws:s3:::mybucket/*",
            "arn:aws:s3:::mybucket"
          ],
          "Sid": ""
        }
      ]
    }