first commit
This commit is contained in:
commit
d0fb48ef2d
|
|
@ -0,0 +1,163 @@
|
||||||
|

|
||||||
|
|
||||||
|
# iX Official Catalog
|
||||||
|
|
||||||
|
A curated collection of TrueNAS SCALE enhanced Helm charts.
|
||||||
|
|
||||||
|
## TrueNAS SCALE Chart Structure
|
||||||
|
|
||||||
|
A TrueNAS SCALE chart repository differs slightly in directory structure from upstream repos in that it includes an `app version` directory.
|
||||||
|
|
||||||
|
A TrueNAS SCALE chart also has three additional files an `app-readme.md` file that provides a high level overview display in the TrueNAS SCALE UI and a `questions.yaml` file defining questions to prompt the user with and an `item.yaml` file outlining item specific details.
|
||||||
|
|
||||||
|
There are 2 directories `charts` and `test`, each representing a train. Chart releases created from catalog items in a specific train cannot be moved to another train. Currently only the `charts` train can be used inside the UI.
|
||||||
|
|
||||||
|
```
|
||||||
|
charts/ix-chart/<chart version>/
|
||||||
|
app-readme.md # TrueNAS SCALE Specific: Readme file for display in TrueNAS SCALE UI
|
||||||
|
charts/ # Directory containing dependency charts
|
||||||
|
Chart.yaml # Required Helm chart information file
|
||||||
|
questions.yaml # TrueNAS SCALE Specific: File containing questions for TrueNAS SCALE UI
|
||||||
|
README.md # Optional: Helm Readme file (will be rendered in TrueNAS SCALE UI as well)
|
||||||
|
templates/ # A directory of templates that, when combined with values.yml will generate K8s YAML
|
||||||
|
values.yaml # The default configuration values for this chart
|
||||||
|
```
|
||||||
|
*See the upstream Helm chart [developer reference](https://helm.sh/docs/topics/chart_template_guide/) for a complete walk through of developing charts.*
|
||||||
|
|
||||||
|
To convert an upstream chart to take advantage of TrueNAS SCALE enhanced UX, first create an `item.yaml` file.
|
||||||
|
This file among other catalog item information provides a list of categories that this chart fits into. This helps users navigate and filtering when browsing the catalog UI.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat charts/ix-chart/item.yaml
|
||||||
|
categories:
|
||||||
|
- generic
|
||||||
|
icon_url: "http://ix_url"
|
||||||
|
```
|
||||||
|
|
||||||
|
After that create `app-readme.md` file.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat charts/ix-chart/<chart version>/app-readme.md
|
||||||
|
|
||||||
|
# iX-Chart
|
||||||
|
|
||||||
|
iX-chart is a chart designed to let user deploy a docker image in a TrueNAS SCALE kubernetes cluster.
|
||||||
|
It provides a mechanism to specify workload type, add external host interfaces in the pods, configure volumes and allocate host resources to the workload.
|
||||||
|
```
|
||||||
|
|
||||||
|
Then add a `questions.yaml` file to prompt the user for something.
|
||||||
|
|
||||||
|
```
|
||||||
|
groups:
|
||||||
|
- name: "Container Images"
|
||||||
|
description: "Image to be used for container"
|
||||||
|
questions:
|
||||||
|
- variable: image
|
||||||
|
description: "Docker Image Details"
|
||||||
|
group: "Container Images"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
required: true
|
||||||
|
attrs:
|
||||||
|
- variable: repository
|
||||||
|
description: "Docker image repository"
|
||||||
|
label: "Image repository"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
- variable: tag
|
||||||
|
description: "Tag to use for specified image"
|
||||||
|
label: "Image Tag"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "latest"
|
||||||
|
- variable: pullPolicy
|
||||||
|
description: "Docker Image Pull Policy"
|
||||||
|
label: "Image Pull Policy"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "IfNotPresent"
|
||||||
|
enum:
|
||||||
|
- value: "IfNotPresent"
|
||||||
|
description: "Only pull image if not present on host"
|
||||||
|
- value: "Always"
|
||||||
|
description: "Always pull image even if present on host"
|
||||||
|
- value: "Never"
|
||||||
|
description: "Never pull image even if it's not present on host"
|
||||||
|
```
|
||||||
|
|
||||||
|
The above will prompt the user with 2 text fields and a dropdown in the UI getting details for image configuration in a helm chart.
|
||||||
|
|
||||||
|
#### Question Variable Reference
|
||||||
|
|
||||||
|
| Variable | Type | Required | Description |
|
||||||
|
| ------------- | ------------- | --- |------------- |
|
||||||
|
| variable | string | true | define the variable name specified in the `values.yaml`file. |
|
||||||
|
| label | string | true | define the UI label. |
|
||||||
|
| description | string | false | specify the description of the variable. |
|
||||||
|
| group | string | false | group questions by input value. |
|
||||||
|
| schema | dictionary | true | specify schema details for the `variable` |
|
||||||
|
| schema.type | string | true | specify type of value for `variable` (current supported types are string, int, boolean, path, hostpath, list, dict, ipaddr, and cron).|
|
||||||
|
| schema.required | bool | false | define if the variable is required or not (true \ false), defaults to false |
|
||||||
|
| schema.default | object | false | specify the default value. |
|
||||||
|
| schema.min_length | int | false | min character length for string type variable.|
|
||||||
|
| schema.max_length | int | false | max character length for string type variable.|
|
||||||
|
| schema.min | int | false | min integer length. |
|
||||||
|
| schema.max | int | false | max integer length. |
|
||||||
|
| schema.enum | []dictionary | false | specify the options when the variable type is `string`, for example, <br><br>enum:<br> - value: "RollingUpdate" <br> description: "Create new pods and then kill old ones"<br> - value: "Recreate"<br> description: "Kill existing pods before creating new ones"|
|
||||||
|
| schema.valid_chars | string | false | regular expression for input chars validation. |
|
||||||
|
| schema.subquestions | []subquestion | false | add an array of subquestions.|
|
||||||
|
| schema.show_if | string | false | show current variable if condition specified is true, for example `show_if: [["workloadType", "=", "CronJob"]]` |
|
||||||
|
| schema.show_subquestions_if | string | false | show subquestions if is true or equal to one of the options. for example `show_subquestion_if: "static"`. system will convert this to the filters format specifid for `shcema.show_if` automatically.|
|
||||||
|
| schema.attrs | []variables | false | specified when `schema.type` is dictionary to declare attributes allowed in the dictionary. |
|
||||||
|
| schema.items | []variables | false | specified when `schema.type` is list to declare attributes allowed in the list. |
|
||||||
|
| schema.private | bool | false | specified for declaring information sensitive fields. |
|
||||||
|
| schema.null | bool | false | specifies if the value for the variable can be null. defaults to false. |
|
||||||
|
|
||||||
|
**subquestions**: `subquestions[]` cannot contain `subquestions` or `show_subquestions_if` keys, but all other keys in the above table are supported. Also variables having `schema.type` list do not support `subquestions`.
|
||||||
|
|
||||||
|
There are some novel cases where we would like to provide ability to configure / manage resources for workloads with getting some data from system dynamically.
|
||||||
|
So a chart can specify certain actions to be performed by the system for a variable by defining a reference. An example better illustrates this concept:
|
||||||
|
```
|
||||||
|
- variable: volume
|
||||||
|
label: "Volume"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
$ref:
|
||||||
|
- "normalize/ixVolume"
|
||||||
|
attrs:
|
||||||
|
- variable: mountPath
|
||||||
|
label: "Mount Path"
|
||||||
|
description: "Path where the volume will be mounted inside the pod"
|
||||||
|
schema:
|
||||||
|
type: path
|
||||||
|
required: true
|
||||||
|
- variable: datasetName
|
||||||
|
label: "Dataset Name"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
```
|
||||||
|
|
||||||
|
In the above variable we define a `$ref` in schema which specifies that the system should take some action for normalising the value specified for the variable.
|
||||||
|
In this specific case, `ix_volume` is a concept introduced where we recommend using a volume which we are able to rollback automatically on chart release rollback. In essence,
|
||||||
|
it is just a `hostPath` volume for which the system automatically creates the dataset specified.
|
||||||
|
|
||||||
|
We have following types of actions supported in `$ref` right now:
|
||||||
|
1) definitions
|
||||||
|
2) normalize
|
||||||
|
|
||||||
|
For (1), system will automatically update schema for a particular definition. For example,
|
||||||
|
```
|
||||||
|
- variable: hostInterface
|
||||||
|
description: "Please specify host interface"
|
||||||
|
label: "Host Interface"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
$ref:
|
||||||
|
- "definitions/interface"
|
||||||
|
```
|
||||||
|
System will automatically populate available interfaces for the user based on what interfaces are available on the system.
|
||||||
|
|
||||||
|
For (2), system will normalize values or perform some actions as discussed above.
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
# OWNERS file for Kubernetes
|
||||||
|
OWNERS
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
apiVersion: v1
|
||||||
|
description: High Performance, Kubernetes Native Object Storage
|
||||||
|
name: minio
|
||||||
|
version: 1.1.0
|
||||||
|
appVersion: master
|
||||||
|
keywords:
|
||||||
|
- storage
|
||||||
|
- object-storage
|
||||||
|
- S3
|
||||||
|
home: https://min.io
|
||||||
|
icon: https://min.io/resources/img/logo/MINIO_wordmark.png
|
||||||
|
sources:
|
||||||
|
- https://github.com/minio/minio
|
||||||
|
- https://github.com/minio/charts
|
||||||
|
upstream_version: 8.0.5
|
||||||
|
dependencies:
|
||||||
|
- name: common
|
||||||
|
repository: file://../../../library/common/2101.0.0
|
||||||
|
version: 2101.0.0
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
MinIO
|
||||||
|
=====
|
||||||
|
|
||||||
|
[MinIO](https://min.io) is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads.
|
||||||
|
|
||||||
|
MinIO supports [distributed mode](https://docs.minio.io/docs/distributed-minio-quickstart-guide). In distributed mode, you can pool multiple drives (even on different machines) into a single object storage server.
|
||||||
|
|
||||||
|
For more detailed documentation please visit [here](https://docs.minio.io/)
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
------------
|
||||||
|
|
||||||
|
This chart bootstraps MinIO deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||||
|
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
-------------
|
||||||
|
|
||||||
|
The following table lists the configurable parameters of the MinIO chart and their default values.
|
||||||
|
|
||||||
|
| Parameter | Description | Default |
|
||||||
|
|:-------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|
|
||||||
|
| `image.repository` | Image repository | `minio/minio` |
|
||||||
|
| `image.tag` | MinIO image tag. Possible values listed [here](https://hub.docker.com/r/minio/minio/tags/). | `RELEASE.2020-11-06T23-17-07Z` |
|
||||||
|
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||||
|
| `extraArgs` | Additional command line arguments to pass to the MinIO server | `[]` |
|
||||||
|
| `accessKey` | Default access key (5 to 20 characters) | random 20 chars |
|
||||||
|
| `secretKey` | Default secret key (8 to 40 characters) | random 40 chars |
|
||||||
|
| `persistence.enabled` | Use persistent volume to store data | `true` |
|
||||||
|
| `persistence.size` | Size of persistent volume claim | `500Gi` |
|
||||||
|
| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` |
|
||||||
|
| `persistence.storageClass` | Storage class name of PVC | `nil` |
|
||||||
|
| `persistence.accessMode` | ReadWriteOnce or ReadOnly | `ReadWriteOnce` |
|
||||||
|
| `persistence.subPath` | Mount a sub directory of the persistent volume if set | `""` |
|
||||||
|
| `environment` | Set MinIO server relevant environment variables in `values.yaml` file. MinIO containers will be passed these variables when they start. | `MINIO_STORAGE_CLASS_STANDARD: EC:4"` |
|
||||||
|
|
||||||
|
Some parameters above map to the env variables defined in the [MinIO DockerHub image](https://hub.docker.com/r/minio/minio/).
|
||||||
|
|
||||||
|
Pass environment variables to MinIO containers
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
|
To pass environment variables to MinIO containers when deploying via Helm chart, use the below command line format
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ helm install --set environment.MINIO_BROWSER=on,environment.MINIO_DOMAIN=domain-name minio/minio
|
||||||
|
```
|
||||||
|
|
||||||
|
You can add as many environment variables as required, using the above format. Just add `environment.<VARIABLE_NAME>=<value>` under `set` flag.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
[MinIO](https://min.io) is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads.
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
## Set default image, imageTag, and imagePullPolicy. mode is used to indicate the
|
||||||
|
##
|
||||||
|
image:
|
||||||
|
repository: minio/minio
|
||||||
|
tag: RELEASE.2020-11-19T23-48-16Z
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
## Additional arguments to pass to minio binary
|
||||||
|
extraArgs: []
|
||||||
|
|
||||||
|
updateStrategy: RollingUpdate
|
||||||
|
|
||||||
|
service:
|
||||||
|
nodePort: 9000
|
||||||
|
|
||||||
|
environment:
|
||||||
|
## Please refer for comprehensive list https://docs.minio.io/docs/minio-server-configuration-guide.html
|
||||||
|
|
||||||
|
appVolumeMounts:
|
||||||
|
export:
|
||||||
|
emptyDir: true
|
||||||
|
mountPath: "/export"
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def migrate(values):
|
||||||
|
values.update({
|
||||||
|
'appVolumeMounts': {
|
||||||
|
'export': {
|
||||||
|
'hostPathEnabled': values['minioHostPathEnabled'],
|
||||||
|
**({'hostPath': values['minioHostPath']} if values.get('minioHostPath') else {})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return values
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
if os.path.exists(sys.argv[1]):
|
||||||
|
with open(sys.argv[1], 'r') as f:
|
||||||
|
print(json.dumps(migrate(json.loads(f.read()))))
|
||||||
|
|
@ -0,0 +1,181 @@
|
||||||
|
groups:
|
||||||
|
- name: "Container Images"
|
||||||
|
description: "Image to be used for container"
|
||||||
|
- name: "Workload Configuration"
|
||||||
|
description: "Configure workload deployment"
|
||||||
|
- name: "Storage"
|
||||||
|
description: "Configure Storage for Nextcloud"
|
||||||
|
- name: "Minio Configuration"
|
||||||
|
description: "Configure Minio credentials"
|
||||||
|
|
||||||
|
portals:
|
||||||
|
web_portal:
|
||||||
|
protocols:
|
||||||
|
- "http"
|
||||||
|
host:
|
||||||
|
- "$node_ip"
|
||||||
|
ports:
|
||||||
|
- "$variable-service.nodePort"
|
||||||
|
|
||||||
|
questions:
|
||||||
|
# Image related
|
||||||
|
- variable: image
|
||||||
|
description: "Docker Image Details"
|
||||||
|
label: "Docker Image"
|
||||||
|
group: "Container Images"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
required: true
|
||||||
|
attrs:
|
||||||
|
- variable: repository
|
||||||
|
description: "Docker image repository"
|
||||||
|
label: "Image repository"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "minio/minio"
|
||||||
|
required: true
|
||||||
|
- variable: tag
|
||||||
|
description: "Tag to use for specified image"
|
||||||
|
label: "Image Tag"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "RELEASE.2020-11-19T23-48-16Z"
|
||||||
|
- variable: pullPolicy
|
||||||
|
description: "Docker Image Pull Policy"
|
||||||
|
label: "Image Pull Policy"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "IfNotPresent"
|
||||||
|
enum:
|
||||||
|
- value: "IfNotPresent"
|
||||||
|
description: "Only pull image if not present on host"
|
||||||
|
- value: "Always"
|
||||||
|
description: "Always pull image even if present on host"
|
||||||
|
- value: "Never"
|
||||||
|
description: "Never pull image even if it's not present on host"
|
||||||
|
|
||||||
|
- variable: updateStrategy
|
||||||
|
label: "Minio update strategy"
|
||||||
|
group: "Workload Configuration"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "RollingUpdate"
|
||||||
|
enum:
|
||||||
|
- value: "RollingUpdate"
|
||||||
|
description: "Create new pods and then kill old ones"
|
||||||
|
- value: "Recreate"
|
||||||
|
description: "Kill existing pods before creating new ones"
|
||||||
|
|
||||||
|
- variable: extraArgs
|
||||||
|
label: "Minio Extra Arguments"
|
||||||
|
group: "Minio Configuration"
|
||||||
|
schema:
|
||||||
|
type: list
|
||||||
|
default: []
|
||||||
|
items:
|
||||||
|
- variable: arg
|
||||||
|
label: "Argument"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
- variable: accessKey
|
||||||
|
label: "Access Key"
|
||||||
|
group: "Minio Configuration"
|
||||||
|
description: "Enter the S3 access ID"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
private: true
|
||||||
|
required: true
|
||||||
|
min_length: 5
|
||||||
|
max_length: 20
|
||||||
|
|
||||||
|
- variable: secretKey
|
||||||
|
label: "Secret Key"
|
||||||
|
group: "Minio Configuration"
|
||||||
|
description: "Enter the S3 secret access key"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
private: true
|
||||||
|
required: true
|
||||||
|
min_length: 8
|
||||||
|
max_length: 40
|
||||||
|
|
||||||
|
- variable: environmentVariables
|
||||||
|
label: "Minio image environment"
|
||||||
|
group: "Minio Configuration"
|
||||||
|
schema:
|
||||||
|
type: list
|
||||||
|
default: []
|
||||||
|
items:
|
||||||
|
- variable: environmentVariable
|
||||||
|
label: "Environment Variable"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: name
|
||||||
|
label: "Name"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- variable: value
|
||||||
|
label: "Value"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
- variable: service
|
||||||
|
description: "Minio Service Configuration"
|
||||||
|
label: "Minio Service Configuration"
|
||||||
|
group: "Minio Configuration"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
required: true
|
||||||
|
attrs:
|
||||||
|
- variable: nodePort
|
||||||
|
label: "Node Port to use for Minio"
|
||||||
|
schema:
|
||||||
|
type: int
|
||||||
|
min: 9000
|
||||||
|
max: 65535
|
||||||
|
default: 9000
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- variable: appVolumeMounts
|
||||||
|
label: "Minio Storage"
|
||||||
|
group: "Storage"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: export
|
||||||
|
label: "Data Volume"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: datasetName
|
||||||
|
label: "Minio Data Volume Name"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
hidden: true
|
||||||
|
$ref:
|
||||||
|
- "normalize/ixVolume"
|
||||||
|
show_if: [["hostPathEnabled", "=", false]]
|
||||||
|
default: "ix-minio"
|
||||||
|
editable: false
|
||||||
|
- variable: mountPath
|
||||||
|
label: "Minio Data Mount Path"
|
||||||
|
description: "Path where the volume will be mounted inside the pod"
|
||||||
|
schema:
|
||||||
|
type: path
|
||||||
|
hidden: true
|
||||||
|
editable: false
|
||||||
|
default: "/export"
|
||||||
|
- variable: hostPathEnabled
|
||||||
|
label: "Enable Host Path for Minio Data Volume"
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
show_subquestions_if: true
|
||||||
|
subquestions:
|
||||||
|
- variable: hostPath
|
||||||
|
label: "Host Path for Minio Data Volume"
|
||||||
|
schema:
|
||||||
|
type: hostpath
|
||||||
|
required: true
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
dependencies:
|
||||||
|
- name: common
|
||||||
|
repository: file://../../../library/common/2101.0.0
|
||||||
|
version: 2101.0.0
|
||||||
|
digest: sha256:6ab46f958de11ae6a24d8f7e18417aa9852a8d968d5b0cc94ffa4700449931d6
|
||||||
|
generated: "2021-02-04T01:15:55.416388+05:00"
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
Minio can be accessed from the following URL:
|
||||||
|
http://$node_ip:{{ .Values.service.nodePort }}/
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{{/*
|
||||||
|
Determine secret name.
|
||||||
|
*/}}
|
||||||
|
{{- define "minio.secretName" -}}
|
||||||
|
{{- include "common.names.fullname" . -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
{{ $scheme := "http" }}
|
||||||
|
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ template "common.names.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "common.names.name" . }}
|
||||||
|
chart: {{ template "common.names.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ (default 1 .Values.replicas) }}
|
||||||
|
strategy:
|
||||||
|
type: {{ (default "Recreate" .Values.updateStrategy ) }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ template "common.names.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: {{ template "common.names.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "common.names.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
{{- include "common.labels.selectorLabels" . | nindent 8 }}
|
||||||
|
annotations: {{ include "common.annotations" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: {{ include "common.names.serviceAccountName" . | quote }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
|
||||||
|
{{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
|
||||||
|
command:
|
||||||
|
- "/bin/sh"
|
||||||
|
- "-ce"
|
||||||
|
- "/usr/bin/docker-entrypoint.sh minio server /export {{ (.Values.extraArgs | default list) | join " " }}"
|
||||||
|
ports:
|
||||||
|
- name: {{ $scheme }}
|
||||||
|
containerPort: 9000
|
||||||
|
env:
|
||||||
|
{{ $secretName := (include "minio.secretName" .) }}
|
||||||
|
{{ $envList := (default list .Values.environment) }}
|
||||||
|
{{ $envList = mustAppend $envList (dict "name" "MINIO_ACCESS_KEY" "valueFromSecret" true "secretName" $secretName "secretKey" "accesskey") }}
|
||||||
|
{{ $envList = mustAppend $envList (dict "name" "MINIO_SECRET_KEY" "valueFromSecret" true "secretName" $secretName "secretKey" "secretkey") }}
|
||||||
|
{{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
|
||||||
|
{{ include "common.storage.allAppVolumes" .Values | nindent 6 }}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ template "minio.secretName" . }}
|
||||||
|
labels: {{ include "common.labels" . | nindent 4 }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
accesskey: {{ if .Values.accessKey }}{{ .Values.accessKey | toString | b64enc | quote }}{{ else }}{{ randAlphaNum 20 | b64enc | quote }}{{ end }}
|
||||||
|
secretkey: {{ if .Values.secretKey }}{{ .Values.secretKey | toString | b64enc | quote }}{{ else }}{{ randAlphaNum 40 | b64enc | quote }}{{ end }}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{{ $svc := .Values.service }}
|
||||||
|
{{ $selectors := list }}
|
||||||
|
{{ $selectors = mustAppend $selectors (dict "key" "app" "value" (include "common.names.name" .) ) }}
|
||||||
|
{{ $selectors = mustAppend $selectors (dict "key" "release" "value" .Release.Name ) }}
|
||||||
|
{{ $ports := list }}
|
||||||
|
{{ $ports = mustAppend $ports (dict "name" "http" "port" $svc.nodePort "nodePort" $svc.nodePort "targetPort" 9000) }}
|
||||||
|
{{ $params := . }}
|
||||||
|
{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }}
|
||||||
|
{{ $_1 := set .Values "extraSelectorLabels" $selectors }}
|
||||||
|
{{ include "common.classes.service" $params }}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{{ include "common.serviceaccount" . }}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
## Set default image, imageTag, and imagePullPolicy. mode is used to indicate the
|
||||||
|
##
|
||||||
|
image:
|
||||||
|
repository: minio/minio
|
||||||
|
tag: RELEASE.2020-11-19T23-48-16Z
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
## Additional arguments to pass to minio binary
|
||||||
|
extraArgs: []
|
||||||
|
|
||||||
|
updateStrategy: RollingUpdate
|
||||||
|
|
||||||
|
service:
|
||||||
|
nodePort: 32001
|
||||||
|
|
||||||
|
environmentVariables: []
|
||||||
|
## Please refer for comprehensive list https://docs.minio.io/docs/minio-server-configuration-guide.html
|
||||||
|
|
||||||
|
emptyDirVolumes: true
|
||||||
|
appVolumeMounts:
|
||||||
|
export:
|
||||||
|
emptyDir: true
|
||||||
|
mountPath: "/export"
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
categories:
|
||||||
|
- generic
|
||||||
|
icon_url: https://min.io/resources/img/logo/MINIO_wordmark.png
|
||||||
Loading…
Reference in New Issue