Skip to content

Commit

Permalink
Merge branch 'master' into recommend-trivial-parity
Browse files Browse the repository at this point in the history
  • Loading branch information
allanrogerr committed Feb 16, 2024
2 parents 8128af3 + 7a4d426 commit 302793d
Show file tree
Hide file tree
Showing 268 changed files with 21,392 additions and 878 deletions.
91 changes: 40 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,47 +165,14 @@ performance:

## Procedure

### 1) Install the MinIO Operator

Run the following commands to install the MinIO Operator and Plugin using the Kubernetes ``krew`` plugin manager:

```sh
kubectl krew update
kubectl krew install minio
```

See the ``krew`` [installation documentation](https://krew.sigs.k8s.io/docs/user-guide/setup/install/) for instructions
on installing ``krew``.

Run the following command to verify installation of the plugin:

```sh
kubectl minio version
```

As an alternative to `krew`, you can download the `kubectl-minio` plugin from
the [Operator Releases Page](https://github.com/minio/operator/releases). Download the `kubectl-minio` package
appropriate for your operating system and extract the contents as `kubectl-minio`. Set the `kubectl-minio` binary to be
executable (e.g. `chmod +x`) and place it in your system `PATH`.

For example, the following code downloads the latest stable version of the MinIO Kubernetes Plugin and installs it to
the system ``$PATH``. The example assumes a Linux operating system:
### 1) Install the MinIO Operator via Kustomization
Follow the [Install `kustomize`](https://kubectl.docs.kubernetes.io/installation/kustomize/) guide for your host system before starting this procedure.

```sh
wget -qO- https://github.com/minio/operator/releases/latest/download/kubectl-minio_linux_amd64_v1.zip | sudo bsdtar -xvf- -C /usr/local/bin
sudo chmod +x /usr/local/bin/kubectl-minio
```

Run the following command to verify installation of the plugin:

```sh
kubectl minio version
```

Run the following command to initialize the Operator:

```sh
kubectl minio init
VERSION=v5.0.11
TIMEOUT=120 # By default is 27, sometimes connection is slow, allow more time to fetch it.
kustomize build "github.com/minio/operator/resources/?timeout=120&ref=${VERSION}" > operator.yaml
kubectl apply -f operator.yaml
```

Run the following command to verify the status of the Operator:
Expand All @@ -227,24 +194,46 @@ interface for creating and managing MinIO Tenants.

The `minio-operator-*` pod runs the MinIO Operator itself.

### 2) Access the Operator Console
### 2) Access the Operator Console via NodePort

Run the following command to create a local proxy to the MinIO Operator
Console:
Get the token:

```sh
kubectl minio proxy -n minio-operator
kubectl apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: console-sa-secret
namespace: minio-operator
annotations:
kubernetes.io/service-account.name: console-sa
type: kubernetes.io/service-account-token
EOF
SA_TOKEN=$(kubectl -n minio-operator get secret console-sa-secret -o jsonpath="{.data.token}" | base64 --decode)
echo $SA_TOKEN
```

The output resembles the following:

```sh
kubectl minio proxy
Starting port forward of the Console UI.
Change the console service to use NodePort:

To connect open a browser and go to http://localhost:9090
Current JWT to login: TOKENSTRING
```yaml
spec:
ports:
- name: http
protocol: TCP
port: 9090
targetPort: 9090
nodePort: 30080 <--------------- Using this port in the node
- name: https
protocol: TCP
port: 9443
targetPort: 9443
nodePort: 30869
selector:
app: console
clusterIP: 10.96.69.150
clusterIPs:
- 10.96.69.150
type: NodePort <-------------------- Using NodePort
```

Open your browser to the provided address and use the JWT token to log in
Expand Down
2 changes: 1 addition & 1 deletion api/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (

// Image versions

KESImageVersion = "minio/kes:2023-11-10T10-44-28Z"
KESImageVersion = "minio/kes:2024-01-11T13-09-29Z"

// Constants for common configuration
MinioImage = "OPERATOR_MINIO_IMAGE"
Expand Down
4 changes: 2 additions & 2 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ LABEL operators.operatorframework.io.bundle.package.v1=minio-operator
LABEL operators.operatorframework.io.bundle.channels.v1=stable

# Copy files to locations specified by labels.
COPY bundles/community-operators/5.0.11/manifests /manifests/
COPY bundles/community-operators/5.0.11/metadata /metadata/
COPY bundles/community-operators/5.0.12/manifests /manifests/
COPY bundles/community-operators/5.0.12/metadata /metadata/
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
data:
CONSOLE_PORT: "9090"
CONSOLE_TLS_PORT: "9443"
kind: ConfigMap
metadata:
annotations:
operator.min.io/authors: MinIO, Inc.
operator.min.io/license: AGPLv3
operator.min.io/support: https://subnet.min.io
name: console-env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
annotations:
kubernetes.io/service-account.name: console-sa
operator.min.io/authors: MinIO, Inc.
operator.min.io/license: AGPLv3
operator.min.io/support: https://subnet.min.io
name: console-sa-secret
type: kubernetes.io/service-account-token
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v1
kind: Service
metadata:
annotations:
operator.min.io/authors: MinIO, Inc.
operator.min.io/license: AGPLv3
operator.min.io/support: https://subnet.min.io
service.beta.openshift.io/serving-cert-secret-name: console-tls
creationTimestamp: null
labels:
app.kubernetes.io/instance: minio-operator
app.kubernetes.io/name: operator
name: console
name: console
spec:
ports:
- name: http
port: 9090
targetPort: 0
- name: https
port: 9443
targetPort: 0
selector:
app: console
status:
loadBalancer: {}
120 changes: 120 additions & 0 deletions bundles/certified-operators/5.0.12/manifests/job.min.io_miniojobs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
operator.min.io/authors: MinIO, Inc.
operator.min.io/license: AGPLv3
operator.min.io/support: https://subnet.min.io
creationTimestamp: null
name: miniojobs.job.min.io
spec:
group: job.min.io
names:
kind: MinIOJob
listKind: MinIOJobList
plural: miniojobs
shortNames:
- miniojob
singular: miniojob
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.tenant.name
name: Tenant
type: string
- jsonPath: .spec.status.phase
name: Phase
type: string
name: v1alpha1
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
commands:
items:
properties:
args:
additionalProperties:
type: string
type: object
dependsOn:
items:
type: string
type: array
name:
type: string
op:
type: string
required:
- op
type: object
type: array
execution:
default: parallel
enum:
- parallel
- sequential
type: string
failureStrategy:
default: continueOnFailure
enum:
- continueOnFailure
- stopOnFailure
type: string
serviceAccountName:
type: string
tenant:
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
required:
- commands
- serviceAccountName
- tenant
type: object
status:
properties:
commands:
items:
properties:
message:
type: string
name:
type: string
result:
type: string
required:
- result
type: object
type: array
phase:
type: string
required:
- commands
- phase
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Loading

0 comments on commit 302793d

Please sign in to comment.