Skip to content

Commit

Permalink
Migrate to go1.12 only builds, change license to MinIO
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Jun 26, 2019
1 parent 1660ff8 commit 1d2a6c4
Show file tree
Hide file tree
Showing 1,565 changed files with 521 additions and 580,772 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.7
FROM alpine:3.9

LABEL maintainer="Minio Inc <dev@minio.io>"
LABEL maintainer="MinIO Inc <dev@min.io>"

COPY minio-operator /usr/bin/

Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Minio Operator Guide
# MinIO Operator Guide

[![Slack](https://slack.minio.io/slack?type=svg)](https://slack.minio.io) [![Docker Pulls](https://img.shields.io/docker/pulls/minio/minio.svg?maxAge=604800)](https://hub.docker.com/r/minio/minio/)
[![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![Docker Pulls](https://img.shields.io/docker/pulls/minio/minio.svg?maxAge=604800)](https://hub.docker.com/r/minio/minio/)

Minio is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. Minio is designed in a cloud-native manner to scale sustainably in multi-tenant environments. Orchestration platforms like Kubernetes provide perfect launchpad for Minio to scale. There are multiple options to deploy Minio on Kubernetes:
MinIO is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. MinIO is designed in a cloud-native manner to scale sustainably in multi-tenant environments. Orchestration platforms like Kubernetes provide perfect launchpad for MinIO to scale. There are multiple options to deploy MinIO on Kubernetes:

- Helm Chart: Minio Helm Chart offers customizable and easy Minio deployment with a single command. Refer [Minio Helm Chart repository documentation](https://github.com/helm/charts/tree/master/stable/minio) for more details.
- Helm Chart: MinIO Helm Chart offers customizable and easy MinIO deployment with a single command. Refer [MinIO Helm Chart repository documentation](https://github.com/helm/charts/tree/master/stable/minio) for more details.

- YAML File: Minio can be deployed with yaml files via kubectl. Refer [Minio yaml file documentation](https://docs.minio.io/docs/deploy-minio-on-kubernetes.html) to deploy Minio using yaml files.
- YAML File: MinIO can be deployed with yaml files via kubectl. Refer [MinIO yaml file documentation](https://docs.min.io/docs/deploy-minio-on-kubernetes.html) to deploy MinIO using yaml files.

- Minio-Operator: Operator creates and manages distributed Minio deployments running on Kubernetes, using CustomResourceDefinitions and Controller.
- MinIO-Operator: Operator creates and manages distributed MinIO deployments running on Kubernetes, using CustomResourceDefinitions and Controller.

## Getting Started

Expand All @@ -19,24 +19,24 @@ Minio is a high performance distributed object storage server, designed for larg

### Create Operator and related resources

To start Minio-Operator, use the `docs/minio-operator.yaml` file.
To start MinIO-Operator, use the `docs/minio-operator.yaml` file.

```
kubectl create -f https://github.com/minio/minio-operator/blob/master/docs/minio-operator.yaml?raw=true
```

This will create all relevant resources required for the Operator to work. Here is a list of resources created by above `yaml` file:

- `Namespace`: Custom namespace for Minio-Operator. By default it is names as `minio-operator-ns`.
- `CustomResourceDefinition`: Custom resource definition named as `minioinstances.miniocontroller.minio.io`.
- `Namespace`: Custom namespace for MinIO-Operator. By default it is names as `minio-operator-ns`.
- `CustomResourceDefinition`: Custom resource definition named as `minioinstances.miniocontroller.min.io`.
- `ClusterRole`: A cluster wide role for the controller. It is named as `minio-operator-role`. This is used for RBAC.
- `ServiceAccount`: Service account is used by the custom controller to access the cluster. Account name by default is `minio-operator-sa`.
- `ClusterRoleBinding`: This cluster wide binding binds the service account `minio-operator-sa` to cluster role `minio-operator-role`.
- `Deployment`: Deployment creates a pod using the Minio-Operator Docker image. This is where the custom controller runs and looks after any changes in custom resource.
- `Deployment`: Deployment creates a pod using the MinIO-Operator Docker image. This is where the custom controller runs and looks after any changes in custom resource.

### Create a Minio instance
### Create a MinIO instance

Once Minio-Operator deployment is running, you can create Minio instances using the below command
Once MinIO-Operator deployment is running, you can create MinIO instances using the below command

```
kubectl create -f https://github.com/minio/minio-operator/blob/master/docs/minio-examples/minio-secret.yaml?raw=true
Expand All @@ -45,10 +45,10 @@ kubectl create -f https://github.com/minio/minio-operator/blob/master/docs/minio

## Features

Minio-Operator currently supports following features:
MinIO-Operator currently supports following features:

- Create and delete highly available distributed Minio clusters.
- Upgrading existing distributed Minio clusters.
- Create and delete highly available distributed MinIO clusters.
- Upgrading existing distributed MinIO clusters.

Refer [`minioinstance.yaml`](https://github.com/minio/minio-operator/blob/master/docs/minio-examples/minioinstance.yaml?raw=true) for details on how to pass supported fields to
the operator.
Expand All @@ -59,7 +59,7 @@ the operator.

## Explore Further

- [Minio Erasure Code QuickStart Guide](https://docs.minio.io/docs/minio-erasure-code-quickstart-guide)
- [Use `mc` with Minio Server](https://docs.minio.io/docs/minio-client-quickstart-guide)
- [Use `aws-cli` with Minio Server](https://docs.minio.io/docs/aws-cli-with-minio)
- [The Minio documentation website](https://docs.minio.io)
- [MinIO Erasure Code QuickStart Guide](https://docs.min.io/docs/minio-erasure-code-quickstart-guide)
- [Use `mc` with MinIO Server](https://docs.min.io/docs/minio-client-quickstart-guide)
- [Use `aws-cli` with MinIO Server](https://docs.min.io/docs/aws-cli-with-minio)
- [The MinIO documentation website](https://docs.min.io)
22 changes: 11 additions & 11 deletions docs/minio-examples/minioinstance.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
apiVersion: miniocontroller.minio.io/v1beta1
kind: MinioInstance
apiVersion: miniocontroller.min.io/v1beta1
kind: MinIOInstance
metadata:
name: minio
spec:
## Supply number of replicas, (should be an even number).
replicas: 4
## Minio release version, (minio/minio image tag).
version: RELEASE.2018-11-22T02-51-56Z
## Secret with credentials to be used by Minio instance.
## MinIO release version, (minio/minio image tag).
version: RELEASE.2019-06-19T18-24-42Z
## Secret with credentials to be used by MinIO instance.
credsSecret:
name: minio-creds-secret
## 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
## 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
## Affinity settings for MinIO pods. Read more about affinity
## here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity.
# affinity:
## Secret with certificates to configure TLS for Minio certs. Create secrets as explained
# affinity:
## 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
# sslSecret:
# name: tls-ssl-minio
## Mountpath where PV will be mounted inside container(s). Defaults to "/export".
# mountPath: /export
## Subpath inside Mountpath where Minio starts. Defaults to "".
## Subpath inside Mountpath where MinIO starts. Defaults to "".
# subPath: /data
volumeClaimTemplate:
metadata:
Expand Down
10 changes: 5 additions & 5 deletions docs/minio-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: minioinstances.miniocontroller.minio.io
name: minioinstances.miniocontroller.min.io
spec:
group: miniocontroller.minio.io
group: miniocontroller.min.io
version: v1beta1
names:
kind: MinioInstance
kind: MinIOInstance
plural: minioinstances
scope: Namespaced
---
Expand Down Expand Up @@ -45,13 +45,13 @@ rules:
- patch
- watch
- apiGroups:
- miniocontroller.minio.io
- miniocontroller.min.io
resources:
- "*"
verbs:
- "*"
- apiGroups:
- minio.io
- min.io
resources:
- "*"
verbs:
Expand Down
35 changes: 35 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module github.com/minio/minio-operator

go 1.12

require (
github.com/davecgh/go-spew v1.1.1
github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4
github.com/gogo/protobuf v0.0.0-20170702163824-dda3e8acadcc
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4
github.com/golang/protobuf v1.2.0
github.com/google/btree v1.0.0
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf
github.com/googleapis/gnostic v0.0.0-20180520015035-48a0ecefe2e4
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7
github.com/hashicorp/golang-lru v0.5.0
github.com/imdario/mergo v0.3.6
github.com/json-iterator/go v1.1.5
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
github.com/modern-go/reflect2 v1.0.1
github.com/peterbourgon/diskv v0.0.0-20180312054125-0646ccaebea1
github.com/spf13/pflag v1.0.3
golang.org/x/crypto v0.0.0-20180808211826-de0752318171
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
golang.org/x/sys v0.0.0-20180814072032-4e1fef560951
golang.org/x/text v0.3.0
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
gopkg.in/inf.v0 v0.9.1
gopkg.in/yaml.v2 v2.2.1
k8s.io/api v0.0.0-20181014053814-bbf5c193d86c
k8s.io/apimachinery v0.0.0-20181015213631-60666be32c5d
k8s.io/client-go v0.0.0-20181016014101-70926af6e803
k8s.io/kube-openapi v0.0.0-20180719232738-d8ea2fe547a4
)
69 changes: 69 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4 h1:bRzFpEzvausOAt4va+I/22BZ1vXDtERngp0BNYDKej0=
github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gogo/protobuf v0.0.0-20170702163824-dda3e8acadcc h1:GvfI9UViag4LjQk95XUXCywcUNxbMEQEQqe/BgaFEig=
github.com/gogo/protobuf v0.0.0-20170702163824-dda3e8acadcc/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4 h1:6UVLWz0fIIrv0UVj6t0A7cL48n8IyAdLVQqAYzEfsKI=
github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/protobuf v1.1.0 h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc=
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck=
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/googleapis/gnostic v0.0.0-20180520015035-48a0ecefe2e4 h1:yxHFSapGMUoyn+3v6LiJJxoJhvbDqIq8me0gAWehnSU=
github.com/googleapis/gnostic v0.0.0-20180520015035-48a0ecefe2e4/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE=
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/peterbourgon/diskv v0.0.0-20180312054125-0646ccaebea1 h1:k/dnb0bixQwWsDLxwr6/w7rtZCVDKdbQnGQkeZGYsws=
github.com/peterbourgon/diskv v0.0.0-20180312054125-0646ccaebea1/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
golang.org/x/crypto v0.0.0-20180808211826-de0752318171 h1:vYogbvSFj2YXcjQxFHu/rASSOt9sLytpCaSkiwQ135I=
golang.org/x/crypto v0.0.0-20180808211826-de0752318171/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20180611182652-db08ff08e862 h1:JZi6BqOZ+iSgmLWe6llhGrNnEnK+YB/MRkStwnEfbqM=
golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180814072032-4e1fef560951 h1:VfGaXvV9wRnTJreeGDE0FWEDiQP1WWUDmutCjCThDz8=
golang.org/x/sys v0.0.0-20180814072032-4e1fef560951/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.0.0-20180629073911-c0fe8dde8a10 h1:RQY8hTq6ooDn4BzIXSV9w7BGebihrnWJd1O4No1kqng=
golang.org/x/text v0.0.0-20180629073911-c0fe8dde8a10/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
k8s.io/api v0.0.0-20181014053814-bbf5c193d86c h1:HRWh0qb07rT5MtgZuVqr4hYMhRhNH3FWDxtlBCbNBpE=
k8s.io/api v0.0.0-20181014053814-bbf5c193d86c/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
k8s.io/apimachinery v0.0.0-20181015213631-60666be32c5d h1:It9QEnTmJaV0JD1PckL64/3zjGwqi96UrI7gK6NlTbY=
k8s.io/apimachinery v0.0.0-20181015213631-60666be32c5d/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
k8s.io/client-go v0.0.0-20181016014101-70926af6e803 h1:btIbc6nQzMYY+j65qFdnY6mbpeFqH2uwO68fQR7+tso=
k8s.io/client-go v0.0.0-20181016014101-70926af6e803/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s=
k8s.io/kube-openapi v0.0.0-20180719232738-d8ea2fe547a4 h1:C8xi0mJeE8wOFsLofmG7JVxRV2ZAgjYftRc9m2ypdmo=
k8s.io/kube-openapi v0.0.0-20180719232738-d8ea2fe547a4/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
26 changes: 16 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// +build go1.12

/*
* Minio-Operator - Manage Minio clusters in Kubernetes
* MinIO-Operator - Manage MinIO clusters in Kubernetes
*
* Minio (C) 2018 Minio, Inc.
* MinIO Cloud Storage, (C) 2018, 2019 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,12 +22,13 @@ package main

import (
"flag"
"github.com/minio/minio-operator/pkg/constants"
"os"
"os/signal"
"syscall"
"time"

"github.com/minio/minio-operator/pkg/constants"

"github.com/golang/glog"

kubeinformers "k8s.io/client-go/informers"
Expand All @@ -38,16 +41,19 @@ import (
"github.com/minio/minio-operator/pkg/controller/cluster"
)

var masterURL string
var kubeconfig string
var imagePath string
var onlyOneSignalHandler = make(chan struct{})
var shutdownSignals = []os.Signal{os.Interrupt, syscall.SIGTERM}
var (
masterURL string
kubeconfig string
imagePath string

onlyOneSignalHandler = make(chan struct{})
shutdownSignals = []os.Signal{os.Interrupt, syscall.SIGTERM}
)

func init() {
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
flag.StringVar(&masterURL, "master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
flag.StringVar(&imagePath, "image", constants.DefaultMinioImagePath, "The minio image path.")
flag.StringVar(&imagePath, "image", constants.DefaultMinIOImagePath, "Custom minio container image.")
}

func main() {
Expand Down Expand Up @@ -82,7 +88,7 @@ func main() {

controller := cluster.NewController(kubeClient, controllerClient,
kubeInformerFactory.Apps().V1().StatefulSets(),
minioInformerFactory.Minio().V1beta1().MinioInstances(),
minioInformerFactory.MinIO().V1beta1().MinIOInstances(),
kubeInformerFactory.Core().V1().Services(),
imagePath)

Expand Down
7 changes: 4 additions & 3 deletions pkg/apis/miniocontroller/register.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Minio-Operator - Manage Minio clusters in Kubernetes
* MinIO-Operator - Manage MinIO clusters in Kubernetes
*
* Minio (C) 2018 Minio, Inc.
* MinIO Cloud Storage, (C) 2018, 2019 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@

package miniocontroller

// Controller MinIO group name.
const (
GroupName = "miniocontroller.minio.io"
GroupName = "miniocontroller.min.io"
)
6 changes: 3 additions & 3 deletions pkg/apis/miniocontroller/v1beta1/doc.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Minio-Operator - Manage Minio clusters in Kubernetes
* MinIO-Operator - Manage MinIO clusters in Kubernetes
*
* Minio (C) 2018 Minio, Inc.
* MinIO Cloud Storage, (C) 2018, 2019 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,5 +19,5 @@
// +k8s:deepcopy-gen=package

// Package v1beta1 is the v1beta1 version of the API.
// +groupName=minio.io.io
// +groupName=min.io.io
package v1beta1
Loading

0 comments on commit 1d2a6c4

Please sign in to comment.