Skip to content

Commit

Permalink
Merge branch 'minio-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bytamine committed Jan 2, 2022
2 parents b9f1624 + debd1c3 commit 6d0fc06
Show file tree
Hide file tree
Showing 102 changed files with 6,378 additions and 4,153 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/codeql.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.16.x, 1.17.x]
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
operator
minio-operator
!minio-operator/
!operator/
!tenant/
.idea/
dist/
kubectl-minio/kubectl-minio
Expand Down
6,564 changes: 4,720 additions & 1,844 deletions CREDITS

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GOPATH := $(shell go env GOPATH)
GOARCH := $(shell go env GOARCH)
GOOS := $(shell go env GOOS)

HELM_HOME=helm/minio-operator
HELM_HOME=helm/operator
HELM_CRDS=$(HELM_HOME)/crds

KUSTOMIZE_HOME=resources
Expand Down Expand Up @@ -39,8 +39,8 @@ install: all

lint:
@echo "Running $@ check"
@GO111MODULE=on golangci-lint cache clean
@GO111MODULE=on golangci-lint run --timeout=5m --config ./.golangci.yml
@GO111MODULE=on ${GOPATH}/bin/golangci-lint cache clean
@GO111MODULE=on ${GOPATH}/bin/golangci-lint run --timeout=5m --config ./.golangci.yml

govet:
@go vet ./...
Expand All @@ -56,17 +56,17 @@ clean:
@rm -rf dist/

regen-crd:
@GO111MODULE=on go install github.com/minio/controller-tools/cmd/controller-gen@v0.4.7
@go install -v github.com/minio/controller-tools/cmd/controller-gen@v0.4.7
@echo "WARNING: installing our fork github.com/minio/controller-tools/cmd/controller-gen@v0.4.7"
@echo "Any other controller-gen will cause the generated CRD to lose the volumeClaimTemplate metadata to be lost"
@controller-gen crd:maxDescLen=0,generateEmbeddedObjectMeta=true paths="./..." output:crd:artifacts:config=$(KUSTOMIZE_CRDS)
@${GOPATH}/bin/controller-gen crd:maxDescLen=0,generateEmbeddedObjectMeta=true paths="./..." output:crd:artifacts:config=$(KUSTOMIZE_CRDS)
@kustomize build resources/patch-crd > $(TMPFILE)
@mv -f $(TMPFILE) resources/base/crds/minio.min.io_tenants.yaml
@cp -f resources/base/crds/minio.min.io_tenants.yaml $(HELM_CRDS)/minio.min.io_tenants.yaml

regen-crd-docs:
@which crd-ref-docs 1>/dev/null || (echo "Installing crd-ref-docs" && GO111MODULE=on go install github.com/elastic/crd-ref-docs)
@crd-ref-docs --source-path=./pkg/apis/minio.min.io/v2 --config=docs/templates/config.yaml --renderer=asciidoctor --output-path=docs/crd.adoc --templates-dir=docs/templates/asciidoctor/
@which crd-ref-docs 1>/dev/null || (echo "Installing crd-ref-docs" && GO111MODULE=on go install -v github.com/elastic/crd-ref-docs@latest)
@${GOPATH}/bin/crd-ref-docs --source-path=./pkg/apis/minio.min.io/v2 --config=docs/templates/config.yaml --renderer=asciidoctor --output-path=docs/crd.adoc --templates-dir=docs/templates/asciidoctor/

plugin: regen-crd
@echo "Building 'kubectl-minio' binary"
Expand Down
34 changes: 5 additions & 29 deletions docs/crd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
[id="{p}-api-reference"]
== API Reference

:minio-image: https://hub.docker.com/r/minio/minio/tags[minio/minio:RELEASE.2021-11-09T03-21-45Z]
:minio-image: https://hub.docker.com/r/minio/minio/tags[minio/minio:RELEASE.2021-12-27T07-23-18Z]
:kes-image: https://hub.docker.com/r/minio/kes/tags[minio/kes:v0.16.1]
:prometheus-image: https://quay.io/prometheus/prometheus:latest[prometheus/prometheus:latest]
:logsearch-image: https://hub.docker.com/r/minio/logsearchapi/tags[minio/logsearchapi:v4.3.5]
:logsearch-image: https://hub.docker.com/r/minio/logsearchapi/tags[minio/logsearchapi:v4.3.8]
:postgres-image: https://github.com/docker-library/postgres[library/postgres]


Expand Down Expand Up @@ -621,30 +621,6 @@ PrometheusConfig (`prometheus`) defines the configuration of a Prometheus instan
|===


[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-prometheusoperatorconfig"]
==== PrometheusOperatorConfig

PrometheusOperatorConfig (`prometheus`) defines the configuration of a Prometheus service monitor object as part of the MinIO tenant. The Operator automatically configures the Prometheus service monitor to scrape and store metrics from the MinIO tenant. +
Specify if the https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md#include-servicemonitors[Service Monitor] to be created for this tenant.

.Appears In:
****
- xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-tenantspec[$$TenantSpec$$]
****

[cols="25a,75a", options="header"]
|===
| Field | Description

|*`labels`* __object (keys:string, values:string)__
|*Optional* +
If provided, use these labels for Prometheus Object Meta labels

|*`annotations`* __object (keys:string, values:string)__
|*Optional* +
If provided, use these annotations for Prometheus Object Meta annotations

|===


[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-s3features"]
Expand Down Expand Up @@ -898,10 +874,10 @@ TenantSpec (`spec`) defines the configuration of a MinIO Tenant object. +
Directs the MinIO Operator to deploy and configure Prometheus for collecting tenant metrics. +
For example, `minio.<namespace>.svc.<cluster-domain>.<example>/minio/v2/metrics/cluster`. The specific DNS name for the service depends on your Kubernetes cluster configuration. See the Kubernetes documentation on https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/[DNS for Services and Pods] for more information.

|*`prometheusOperator`* __xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-prometheusoperatorconfig[$$PrometheusOperatorConfig$$]__
|*`prometheusOperator`* __boolean__
|*Optional* +
Directs the MinIO Operator to deploy a ServiceMonitor object. +
ServiceMonitor object allows native integration with Prometheus Operator.
Directs the MinIO Operator to use prometheus operator. +
Tenant scrape configuration will be added to prometheus managed by the prometheus-operator.

|*`serviceAccountName`* __string__
|*Optional* +
Expand Down
3 changes: 2 additions & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ This example will deploy a MinIO tenant with TLS using certificates provided by
### Prerequisites

- You can generate certificates using `Vault CA`, `Openssl` or `Mkcert`, for this example we will use https://github.com/FiloSottile/mkcert
- Assuming your Tenant name will be `minio` you should generate the following certificate keypairs:
- Assuming your Tenant name is `storage` and your namespace is `minio-tenant` you should generate the following certificate keypairs:

```sh
mkcert "*.minio-tenant.svc.cluster.local"
Expand Down Expand Up @@ -106,6 +106,7 @@ You can deploy a preconfigured example by running the following command:
```$xslt
kustomize build examples/kustomization/base | kubectl apply -f -
```
You can include all the certificates that you want in your Tenant and `MinIO` will serve them to its client via [SNI](https://en.wikipedia.org/wiki/Server_Name_Indication)

## MinIO Tenant with TLS via customer provided certificates and Encryption enabled via Vault KMS

Expand Down
4 changes: 2 additions & 2 deletions docs/templates/asciidoctor/gv_list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
[id="{p}-api-reference"]
== API Reference

:minio-image: https://hub.docker.com/r/minio/minio/tags[minio/minio:RELEASE.2021-11-09T03-21-45Z]
:minio-image: https://hub.docker.com/r/minio/minio/tags[minio/minio:RELEASE.2021-12-27T07-23-18Z]
:kes-image: https://hub.docker.com/r/minio/kes/tags[minio/kes:v0.16.1]
:prometheus-image: https://quay.io/prometheus/prometheus:latest[prometheus/prometheus:latest]
:logsearch-image: https://hub.docker.com/r/minio/logsearchapi/tags[minio/logsearchapi:v4.3.5]
:logsearch-image: https://hub.docker.com/r/minio/logsearchapi/tags[minio/logsearchapi:v4.3.8]
:postgres-image: https://github.com/docker-library/postgres[library/postgres]

{{ range $groupVersions }}
Expand Down
4 changes: 2 additions & 2 deletions examples/kustomization/base/tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ spec:
## https://github.com/minio/minio/tree/master/docs/tls/kubernetes#2-create-kubernetes-secret
# externalClientCertSecret: {}
## Registry location and Tag to download MinIO Server image
image: minio/minio:RELEASE.2021-11-09T03-21-45Z
image: quay.io/minio/minio:RELEASE.2021-12-27T07-23-18Z
imagePullSecret: { }
## Mount path where PV will be mounted inside container(s).
mountPath: /export
Expand Down Expand Up @@ -184,7 +184,7 @@ spec:
# app: minio-sm
## LogSearch API setup for MinIO Tenant.
log:
image: "" # defaults to minio/logsearchapi:v4.3.2
image: "" # defaults to minio/logsearchapi:v4.3.8
resources: { }
nodeSelector: { }
affinity:
Expand Down
99 changes: 87 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
module github.com/minio/operator

go 1.16
go 1.17

require (
cloud.google.com/go v0.60.0 // indirect
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017
github.com/golang-jwt/jwt v3.2.1+incompatible
github.com/google/go-containerregistry v0.1.2
github.com/gorilla/mux v1.8.0
github.com/hashicorp/go-version v1.3.0
github.com/minio/madmin-go v1.0.12
github.com/minio/minio-go/v7 v7.0.11-0.20210302210017-6ae69c73ce78
github.com/minio/pkg v1.0.11
github.com/onsi/ginkgo v1.16.1 // indirect
github.com/onsi/gomega v1.11.0 // indirect
github.com/minio/madmin-go v1.1.23
github.com/minio/minio-go/v7 v7.0.20
github.com/minio/pkg v1.1.11
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.46.0
github.com/prometheus-operator/prometheus-operator/pkg/client v0.46.0
github.com/shirou/gopsutil/v3 v3.21.5 // indirect
github.com/stretchr/testify v1.7.0
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/api v0.20.2
k8s.io/apiextensions-apiserver v0.20.2
k8s.io/apimachinery v0.20.2
Expand All @@ -32,3 +24,86 @@ require (
k8s.io/klog/v2 v2.4.0
sigs.k8s.io/controller-runtime v0.8.0
)

require (
cloud.google.com/go v0.60.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.1 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.0 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 // indirect
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7 // indirect
github.com/docker/docker-credential-helpers v0.6.3 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
github.com/go-logr/logr v0.3.0 // indirect
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.3 // indirect
github.com/go-openapi/jsonreference v0.19.3 // indirect
github.com/go-openapi/spec v0.19.3 // indirect
github.com/go-openapi/swag v0.19.5 // indirect
github.com/goccy/go-json v0.4.8 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/imdario/mergo v0.3.10 // indirect
github.com/json-iterator/go v1.1.10 // indirect
github.com/klauspost/cpuid/v2 v2.0.4 // indirect
github.com/lestrrat-go/backoff/v2 v2.0.7 // indirect
github.com/lestrrat-go/blackmagic v1.0.0 // indirect
github.com/lestrrat-go/httpcc v1.0.0 // indirect
github.com/lestrrat-go/iter v1.0.1 // indirect
github.com/lestrrat-go/jwx v1.2.0 // indirect
github.com/lestrrat-go/option v1.0.0 // indirect
github.com/mailru/easyjson v0.7.0 // indirect
github.com/minio/argon2 v1.0.0 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/onsi/ginkgo v1.16.1 // indirect
github.com/onsi/gomega v1.11.0 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rs/xid v1.2.1 // indirect
github.com/secure-io/sio-go v0.3.1 // indirect
github.com/shirou/gopsutil/v3 v3.21.6 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tinylib/msgp v1.1.3 // indirect
github.com/tklauser/go-sysconf v0.3.6 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect
golang.org/x/mod v0.4.1 // indirect
golang.org/x/net v0.0.0-20210421230115-4e50805a0758 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/tools v0.0.0-20210114065538-d78b04bdf963 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.26.0 // indirect
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.57.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/gengo v0.0.0-20201113003025-83324d819ded // indirect
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.0.2 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)
Loading

0 comments on commit 6d0fc06

Please sign in to comment.