remove offical
This commit is contained in:
parent
dde87cc2fe
commit
d86885bc24
|
@ -1,23 +0,0 @@
|
|||
# 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
|
|
@ -1,15 +0,0 @@
|
|||
apiVersion: v1
|
||||
description: High Performance, Kubernetes Native Object Storage
|
||||
name: minio
|
||||
version: 1.0.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
|
|
@ -1,48 +0,0 @@
|
|||
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.
|
|
@ -1 +0,0 @@
|
|||
[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.
|
|
@ -1,160 +0,0 @@
|
|||
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"
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
required: true
|
||||
min_length: 5
|
||||
max_length: 20
|
||||
|
||||
- variable: secretKey
|
||||
label: "Secret Key"
|
||||
group: "Minio Configuration"
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
required: true
|
||||
min_length: 8
|
||||
max_length: 40
|
||||
|
||||
- variable: environment
|
||||
label: "Minio image environment"
|
||||
group: "Minio Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
additional_attrs: true
|
||||
attrs: []
|
||||
|
||||
- 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: minioHostPathEnabled
|
||||
label: "Configure Host Path for Minio data"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
show_subquestions_if: true
|
||||
subquestions:
|
||||
- variable: minioHostPath
|
||||
label: "Specify HostPath for Minio data"
|
||||
schema:
|
||||
type: hostpath
|
||||
|
||||
- variable: minioDataVolume
|
||||
label: "Configure iXVolume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
show_if: [["minioHostPathEnabled", "=", false]]
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
description: "Path where the volume will be mounted inside the pod"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/export"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-minio"
|
||||
editable: false
|
|
@ -1,2 +0,0 @@
|
|||
Minio can be accessed from the following URL:
|
||||
http://$node_ip:{{ .Values.service.nodePort }}/
|
|
@ -1,84 +0,0 @@
|
|||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "minio.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "minio.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "minio.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for deployment.
|
||||
*/}}
|
||||
{{- define "minio.deployment.apiVersion" -}}
|
||||
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.Version -}}
|
||||
{{- print "apps/v1beta2" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for statefulset.
|
||||
*/}}
|
||||
{{- define "minio.statefulset.apiVersion" -}}
|
||||
{{- if semverCompare "<1.17-0" .Capabilities.KubeVersion.Version -}}
|
||||
{{- print "apps/v1beta2" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Determine secret name.
|
||||
*/}}
|
||||
{{- define "minio.secretName" -}}
|
||||
{{- include "minio.fullname" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Determine service account name for deployment or statefulset.
|
||||
*/}}
|
||||
{{- define "minio.serviceAccountName" -}}
|
||||
{{- (include "minio.fullname" .) | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Determine name for scc role and rolebinding
|
||||
*/}}
|
||||
{{- define "minio.sccRoleName" -}}
|
||||
{{- printf "%s-%s" "scc" (include "minio.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Properly format optional additional arguments to Minio binary
|
||||
*/}}
|
||||
{{- define "minio.extraArgs" -}}
|
||||
{{- range .Values.extraArgs -}}
|
||||
{{ " " }}{{ . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,23 +0,0 @@
|
|||
{{/*
|
||||
Retrieve host path from ix volumes based on dataset name
|
||||
*/}}
|
||||
{{- define "retrieveHostPathFromiXVolume" -}}
|
||||
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
|
||||
{{- $dsName := base $hostPathConfiguration.hostPath -}}
|
||||
{{- if eq $.datasetName $dsName -}}
|
||||
{{- $hostPathConfiguration.hostPath -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve host path for minio
|
||||
*/}}
|
||||
{{- define "configuredMinioHostPath" -}}
|
||||
{{- if .Values.minioHostPathEnabled -}}
|
||||
{{- .Values.minioHostPath -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.minioDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,67 +0,0 @@
|
|||
{{ $scheme := "http" }}
|
||||
apiVersion: {{ template "minio.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "minio.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
chart: {{ template "minio.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
strategy:
|
||||
type: {{ .Values.updateStrategy }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "minio.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "minio.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
annotations:
|
||||
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||
spec:
|
||||
serviceAccountName: {{ include "minio.serviceAccountName" . | quote }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- "-ce"
|
||||
- "/usr/bin/docker-entrypoint.sh minio server /export {{- template "minio.extraArgs" . }}"
|
||||
volumeMounts:
|
||||
- name: export
|
||||
mountPath: /export
|
||||
ports:
|
||||
- name: {{ $scheme }}
|
||||
containerPort: 9000
|
||||
env:
|
||||
- name: MINIO_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "minio.secretName" . }}
|
||||
key: accesskey
|
||||
- name: MINIO_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "minio.secretName" . }}
|
||||
key: secretkey
|
||||
{{- range $key, $val := .Values.environment }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
{{- end}}
|
||||
volumes:
|
||||
- name: export
|
||||
{{- if .Values.emptyDirVolumes }}
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
hostPath:
|
||||
path: {{ template "configuredMinioHostPath" . }}
|
||||
{{- end }}
|
||||
- name: minio-user
|
||||
secret:
|
||||
secretName: {{ template "minio.secretName" . }}
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "minio.secretName" . }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
chart: {{ template "minio.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
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 }}
|
|
@ -1,21 +0,0 @@
|
|||
{{ $scheme := "http" }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "minio.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
chart: {{ template "minio.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
type: "NodePort"
|
||||
ports:
|
||||
- name: {{ $scheme }}
|
||||
port: {{ .Values.service.nodePort }}
|
||||
protocol: TCP
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
targetPort: 9000
|
||||
selector:
|
||||
app: {{ template "minio.name" . }}
|
||||
release: {{ .Release.Name }}
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "minio.serviceAccountName" . | quote }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
chart: {{ template "minio.chart" . }}
|
||||
release: "{{ .Release.Name }}"
|
|
@ -1,19 +0,0 @@
|
|||
## 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: 32000
|
||||
|
||||
environment:
|
||||
## Please refer for comprehensive list https://docs.minio.io/docs/minio-server-configuration-guide.html
|
||||
|
||||
emptyDirVolumes: true
|
|
@ -1,17 +0,0 @@
|
|||
## 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
|
|
@ -1,4 +0,0 @@
|
|||
categories:
|
||||
- storage
|
||||
- S3
|
||||
icon_url: https://min.io/resources/img/logo/MINIO_wordmark.png
|
|
@ -1,21 +0,0 @@
|
|||
# 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
|
|
@ -1,17 +0,0 @@
|
|||
apiVersion: v2
|
||||
name: nextcloud
|
||||
version: 1.1.0
|
||||
appVersion: 19.0.3
|
||||
description: A file sharing server that puts the control and security of your own data back into your hands.
|
||||
keywords:
|
||||
- nextcloud
|
||||
- storage
|
||||
- http
|
||||
- web
|
||||
- php
|
||||
home: https://nextcloud.com/
|
||||
icon: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg
|
||||
sources:
|
||||
- https://github.com/nextcloud/docker
|
||||
- https://github.com/nextcloud/helm
|
||||
upstream_version: 2.3.2
|
|
@ -1,11 +0,0 @@
|
|||
# nextcloud
|
||||
|
||||
[nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands.
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps an [nextcloud](https://hub.docker.com/_/nextcloud/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
## Configuration
|
||||
|
||||
Please refer to questions.yaml for a detailed overview on supported configurable values.
|
|
@ -1,3 +0,0 @@
|
|||
# nextcloud
|
||||
|
||||
[nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands.
|
|
@ -1,198 +0,0 @@
|
|||
groups:
|
||||
- name: "Container Images"
|
||||
description: "Image to be used for container"
|
||||
- name: "Nextcloud Configuration"
|
||||
description: "Configuration details for Nextcloud workload"
|
||||
- name: "Storage"
|
||||
description: "Configure Storage for Nextcloud"
|
||||
- name: "Container Configuration"
|
||||
description: "Configure nextcloud container parameters"
|
||||
- name: "Postgresql Configuration"
|
||||
description: "Configure Postgresql for nextcloud"
|
||||
|
||||
portals:
|
||||
web_portal:
|
||||
protocols:
|
||||
- "http"
|
||||
host:
|
||||
- "$variable-nextcloud.host"
|
||||
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: "nextcloud"
|
||||
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"
|
||||
|
||||
- variable: nextcloud
|
||||
description: "Nextcloud configuration details"
|
||||
label: "Nextcloud Configuration"
|
||||
group: "Nextcloud Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
required: true
|
||||
additional_attrs: true
|
||||
attrs:
|
||||
- variable: host
|
||||
description: "Nextcloud host to create application URLs"
|
||||
label: "Nextcloud host"
|
||||
schema:
|
||||
type: string
|
||||
$ref:
|
||||
- "definitions/nodeIP"
|
||||
- variable: username
|
||||
label: "Username"
|
||||
schema:
|
||||
type: string
|
||||
default: "admin"
|
||||
required: true
|
||||
- variable: password
|
||||
label: "Password"
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
default: "changeme"
|
||||
required: true
|
||||
- variable: datadir
|
||||
label: "Nextcloud data directory"
|
||||
schema:
|
||||
type: path
|
||||
default: "/var/www/html/data"
|
||||
required: true
|
||||
- variable: strategy
|
||||
label: "Nextcloud update strategy"
|
||||
schema:
|
||||
type: string
|
||||
default: "Recreate"
|
||||
enum:
|
||||
- value: "RollingUpdate"
|
||||
description: "Create new pods and then kill old ones"
|
||||
- value: "Recreate"
|
||||
description: "Kill existing pods before creating new ones"
|
||||
|
||||
- variable: service
|
||||
description: "Nextcloud Service Configuration"
|
||||
label: "Nextcloud Service Configuration"
|
||||
group: "Nextcloud Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
required: true
|
||||
attrs:
|
||||
- variable: nodePort
|
||||
label: "Node Port to use for Nextcloud"
|
||||
schema:
|
||||
type: int
|
||||
min: 9000
|
||||
max: 65535
|
||||
default: 9001
|
||||
required: true
|
||||
|
||||
- variable: nextcloudDataHostPathEnabled
|
||||
label: "Configure Host Path for Nextcloud data"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
show_subquestions_if: true
|
||||
subquestions:
|
||||
- variable: nextcloudHostPath
|
||||
label: "Specify HostPath for Nextcloud data"
|
||||
schema:
|
||||
type: hostpath
|
||||
|
||||
- variable: nextcloudDataVolume
|
||||
label: "Configure iXVolume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
show_if: [["nextcloudDataHostPathEnabled", "=", false]]
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
description: "Path where the volume will be mounted inside the pod"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/var/www"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-nextcloud_data"
|
||||
editable: false
|
||||
|
||||
- variable: postgresBackupVolume
|
||||
label: "Postgres Backup Volume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/postgres_backups"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-postgres_backups"
|
||||
editable: false
|
||||
|
||||
- variable: postgresDataVolume
|
||||
label: "Postgresql Data Volume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/var/lib/postgresql/data"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-postgres_data"
|
||||
editable: false
|
|
@ -1,3 +0,0 @@
|
|||
1. Get the nextcloud URL by running:
|
||||
|
||||
echo http://{{ .Values.nextcloud.host }}:{{ .Values.service.nodePort }}/
|
|
@ -1,114 +0,0 @@
|
|||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "nextcloud.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "nextcloud.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "nextcloud.mariadb.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified redis app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "nextcloud.redis.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "nextcloud.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve host path from ix volumes based on dataset name
|
||||
*/}}
|
||||
{{- define "retrieveHostPathFromiXVolume" -}}
|
||||
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
|
||||
{{- $dsName := base $hostPathConfiguration.hostPath -}}
|
||||
{{- if eq $.datasetName $dsName -}}
|
||||
{{- $hostPathConfiguration.hostPath -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve host path defined in volume
|
||||
*/}}
|
||||
{{- define "configuredHostPath" -}}
|
||||
{{- if .Values.emptyDirVolumes -}}
|
||||
{{- printf "" -}}
|
||||
{{- else if .Values.nextcloudDataHostPathEnabled -}}
|
||||
{{- required "Please specify a host path for nextcloud" .Values.nextcloudHostPath -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.nextcloudDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve backup postgresql host path defined in volume
|
||||
*/}}
|
||||
{{- define "configuredBackupPostgresHostPath" -}}
|
||||
{{- if .Values.emptyDirVolumes -}}
|
||||
{{- printf "" -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.postgresBackupVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve postgresql data host path defined in volume
|
||||
*/}}
|
||||
{{- define "configuredPostgresHostPath" -}}
|
||||
{{- if .Values.emptyDirVolumes -}}
|
||||
{{- printf "" -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.postgresDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "nextcloud.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Nextcloud service account
|
||||
*/}}
|
||||
{{- define "nextcloud.serviceAccountName" -}}
|
||||
{{- printf "%s-service-account" .Release.Name -}}
|
||||
{{- end -}}
|
|
@ -1,28 +0,0 @@
|
|||
{{/*
|
||||
Get Nextloud Postgres Database Name
|
||||
*/}}
|
||||
{{- define "postgres.DatabaseName" -}}
|
||||
{{- print "nextcloud" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Postgres Selector labels
|
||||
*/}}
|
||||
{{- define "nextcloud.postgres.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}-postgres
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}-postgres
|
||||
{{- end }}
|
||||
|
||||
{{- define "postgres.imageName" -}}
|
||||
{{- print "postgres:13.1" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve postgres backup name
|
||||
This will return a unique name based on revision and chart numbers specified.
|
||||
*/}}
|
||||
{{- define "postgres.backupName" -}}
|
||||
{{- $upgradeDict := .Values.ixChartContext.upgradeMetadata -}}
|
||||
{{- printf "postgres-backup-from-%s-to-%s-revision-%d" $upgradeDict.oldChartVersion $upgradeDict.newChartVersion (int64 $upgradeDict.preUpgradeRevision) -}}
|
||||
{{- end }}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{{/*
|
||||
Retrieve previous chart version from which we are upgrading to a newer chart version
|
||||
*/}}
|
||||
{{- define "tn.chart.old_version" -}}
|
||||
{{- if .Values.ixChartContext.is_upgrade -}}
|
||||
{{- .Values.ixChartContext.upgradeMetadata.oldChartVersion -}}
|
||||
{{- else -}}
|
||||
{{- fail "A chart upgrade is not taking place" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve new chart version to which we are upgrading from an old chart version
|
||||
*/}}
|
||||
{{- define "tn.chart.new_version" -}}
|
||||
{{- if .Values.ixChartContext.is_upgrade -}}
|
||||
{{- .Values.ixChartContext.upgradeMetadata.newChartVersion -}}
|
||||
{{- else -}}
|
||||
{{- fail "A chart upgrade is not taking place" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,15 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "postgres-backup-hook-config-map"
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
data:
|
||||
entrypoint.sh: |-
|
||||
#!/bin/sh
|
||||
cmd="/docker-entrypoint.sh postgres"
|
||||
eval "${cmd}" & disown;
|
||||
until pg_isready; do
|
||||
sleep 5;
|
||||
done;
|
||||
pg_dump -U $POSTGRES_USER -d {{ template "postgres.DatabaseName" . }} > /postgres_backups/$BACKUP_NAME;
|
|
@ -1,57 +0,0 @@
|
|||
{{- if .Values.ixChartContext.isUpgrade -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: "pre-upgrade-hook2"
|
||||
annotations:
|
||||
"helm.sh/hook": pre-upgrade
|
||||
"helm.sh/hook-weight": "1"
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: "pre-upgrade-hook2"
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
serviceAccountName: "{{ template "nextcloud.serviceAccountName" . }}"
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-postgres-backup
|
||||
image: {{ template "postgres.imageName" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-user
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-password
|
||||
- name: BACKUP_NAME
|
||||
value: {{ template "postgres.backupName" . }}
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
- name: postgres-backup
|
||||
mountPath: /postgres_backups
|
||||
- name: backup-script-configmap
|
||||
mountPath: /bin/backup_entrypoint.sh
|
||||
readOnly: true
|
||||
subPath: entrypoint.sh
|
||||
command:
|
||||
- "/bin/backup_entrypoint.sh"
|
||||
volumes:
|
||||
- name: postgres-data
|
||||
hostPath:
|
||||
path: {{ template "configuredPostgresHostPath" . }}
|
||||
- name: postgres-backup
|
||||
hostPath:
|
||||
path: {{ template "configuredBackupPostgresHostPath" . }}
|
||||
- name: backup-script-configmap
|
||||
configMap:
|
||||
defaultMode: 0700
|
||||
name: "postgres-backup-hook-config-map"
|
||||
{{- end -}}
|
|
@ -1,113 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "nextcloud.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
helm.sh/chart: {{ include "nextcloud.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: app
|
||||
{{- if .Values.deploymentAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.deploymentAnnotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: {{ .Values.nextcloud.strategy }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: app
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
{{- if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: init-postgresdb
|
||||
image: {{ template "postgres.imageName" . }}
|
||||
command: ['sh', '-c', "until pg_isready -h {{ template "nextcloud.fullname" . }}-postgres; do echo waiting for postgres; sleep 2; done"]
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: POSTGRES_HOST
|
||||
value: {{ template "nextcloud.fullname" . }}-postgres:5432
|
||||
- name: POSTGRES_DB
|
||||
value: {{ template "postgres.DatabaseName" . }}
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-user
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-password
|
||||
- name: NEXTCLOUD_ADMIN_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "nextcloud.fullname" . }}
|
||||
key: nextcloud-username
|
||||
- name: NEXTCLOUD_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "nextcloud.fullname" . }}
|
||||
key: nextcloud-password
|
||||
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
||||
value: {{ .Values.nextcloud.host }}
|
||||
- name: NEXTCLOUD_DATA_DIR
|
||||
value: {{ .Values.nextcloud.datadir | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/
|
||||
subPath: "root"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/html
|
||||
subPath: "html"
|
||||
- name: nextcloud-data
|
||||
mountPath: {{ .Values.nextcloud.datadir }}
|
||||
subPath: "data"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/html/config
|
||||
subPath: "config"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/html/custom_apps
|
||||
subPath: "custom_apps"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/tmp
|
||||
subPath: "tmp"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/html/themes
|
||||
subPath: "themes"
|
||||
volumes:
|
||||
- name: nextcloud-data
|
||||
{{- if ne (include "configuredHostPath" .) "" }}
|
||||
hostPath:
|
||||
path: {{ template "configuredHostPath" . }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
# Will mount configuration files as www-data (id: 33) for nextcloud
|
||||
securityContext:
|
||||
fsGroup: 33
|
|
@ -1,22 +0,0 @@
|
|||
{{- if .Values.ixChartContext.isUpgrade -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: "pre-upgrade-hook1"
|
||||
annotations:
|
||||
"helm.sh/hook": pre-upgrade
|
||||
"helm.sh/hook-weight": "-1"
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: "pre-upgrade-hook1"
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
serviceAccountName: "{{ template "nextcloud.serviceAccountName" . }}"
|
||||
containers:
|
||||
- name: kubectl
|
||||
image: "bitnami/kubectl:1.19"
|
||||
command: ["kubectl", "delete" , "deployment", "{{ template "nextcloud.fullname" . }}", "{{ template "nextcloud.fullname" . }}-postgres"]
|
||||
{{- end -}}
|
|
@ -1,64 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "nextcloud.fullname" . }}-postgres
|
||||
labels:
|
||||
helm.sh/chart: {{ include "nextcloud.chart" . }}
|
||||
{{- include "nextcloud.postgres.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: database
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: {{ .Values.nextcloud.strategy }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "nextcloud.postgres.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: database
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "nextcloud.postgres.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: database
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-postgres
|
||||
image: {{ template "postgres.imageName" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-user
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-password
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
- name: postgres-backup
|
||||
mountPath: /postgres_backups
|
||||
ports:
|
||||
- name: postgres-tcp
|
||||
containerPort: 5432
|
||||
protocol: TCP
|
||||
volumes:
|
||||
- name: postgres-data
|
||||
{{- if ne (include "configuredPostgresHostPath" .) "" }}
|
||||
hostPath:
|
||||
path: {{ template "configuredPostgresHostPath" . }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: postgres-backup
|
||||
{{- if ne (include "configuredBackupPostgresHostPath" .) "" }}
|
||||
hostPath:
|
||||
path: {{ template "configuredBackupPostgresHostPath" . }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: db-details
|
||||
data:
|
||||
db-user: postgres
|
||||
{{- if .Release.IsInstall }}
|
||||
db-password: {{ randAlphaNum 15 | b64enc | quote }}
|
||||
{{ else }}
|
||||
# `index` function is necessary because the property name contains a dash.
|
||||
# Otherwise (...).data.db_password would have worked too.
|
||||
db-password: {{ index (lookup "v1" "Secret" .Release.Namespace "db-details").data "db-password" }}
|
||||
{{ end }}
|
|
@ -1,18 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "nextcloud.fullname" . }}-postgres
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}-postgres
|
||||
helm.sh/chart: {{ include "nextcloud.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: app
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 5432
|
||||
protocol: TCP
|
||||
name: postgres-tcp
|
||||
selector:
|
||||
{{- include "nextcloud.postgres.selectorLabels" . | nindent 4 }}
|
|
@ -1,17 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "nextcloud.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
helm.sh/chart: {{ include "nextcloud.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
type: Opaque
|
||||
data:
|
||||
nextcloud-username: {{ .Values.nextcloud.username | b64enc | quote }}
|
||||
{{ if .Values.nextcloud.password }}
|
||||
nextcloud-password: {{ .Values.nextcloud.password | b64enc | quote }}
|
||||
{{ else }}
|
||||
nextcloud-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{ end }}
|
|
@ -1,20 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "nextcloud.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
helm.sh/chart: {{ include "nextcloud.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: app
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
nodePort: {{ default "" .Values.service.nodePort}}
|
||||
selector:
|
||||
{{- include "nextcloud.selectorLabels" . | nindent 4 }}
|
|
@ -1,39 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: "{{ template "nextcloud.serviceAccountName" . }}"
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-service-account-role-binding"
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: "{{ template "nextcloud.serviceAccountName" . }}"
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: "{{ .Release.Name }}-service-account-role"
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-service-account-role"
|
||||
namespace: {{ .Release.Namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "apps"
|
||||
resources:
|
||||
- pods
|
||||
- deployments
|
||||
verbs:
|
||||
- delete
|
||||
- get
|
||||
- list
|
|
@ -1,28 +0,0 @@
|
|||
## Official nextcloud image version
|
||||
## ref: https://hub.docker.com/r/library/nextcloud/tags/
|
||||
##
|
||||
image:
|
||||
repository: nextcloud
|
||||
tag: 19.0.3-apache
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
nextcloud:
|
||||
host: nextcloud.kube.home
|
||||
username: admin
|
||||
password: changeme
|
||||
datadir: /var/www/html/data
|
||||
strategy: "Recreate"
|
||||
|
||||
postgresql:
|
||||
backupVolume:
|
||||
mountPath: "/postgres_backups"
|
||||
datasetName: "ix-postgres_backups"
|
||||
dataVolume:
|
||||
mountPath: "/var/lib/postgresql/data"
|
||||
datasetName: "ix-postgres_data"
|
||||
|
||||
service:
|
||||
nodePort: 31000
|
||||
|
||||
emptyDirVolumes: true
|
||||
ixChartContext: {}
|
|
@ -1,17 +0,0 @@
|
|||
## Official nextcloud image version
|
||||
## ref: https://hub.docker.com/r/library/nextcloud/tags/
|
||||
##
|
||||
image:
|
||||
repository: nextcloud
|
||||
tag: 19.0.3-apache
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
nextcloud:
|
||||
host: nextcloud.kube.home
|
||||
username: admin
|
||||
password: changeme
|
||||
datadir: /var/www/html/data
|
||||
strategy: "Recreate"
|
||||
|
||||
service:
|
||||
nodePort: 9001
|
|
@ -1,3 +0,0 @@
|
|||
categories:
|
||||
- productivity
|
||||
icon_url: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg
|
|
@ -1,24 +0,0 @@
|
|||
# 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
|
||||
.vscode/
|
||||
# OWNERS file for Kubernetes
|
||||
OWNERS
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: v2
|
||||
appVersion: 1.20.2.3402
|
||||
description: Plex Media Server
|
||||
name: plex
|
||||
version: 1.0.0
|
||||
keywords:
|
||||
- plex
|
||||
home: https://plex.tv/
|
||||
icon: https://www.plex.tv/wp-content/uploads/2018/01/pmp-icon-1.png
|
||||
sources:
|
||||
- https://hub.docker.com/r/plexinc/pms-docker/
|
||||
- https://github.com/k8s-at-home/charts/tree/master/charts/plex
|
||||
upstream_version: 2.1.0
|
|
@ -1,5 +0,0 @@
|
|||
# Plex Media Server helm chart
|
||||
|
||||
## Configuration
|
||||
|
||||
Please refer to questions.yaml for a detailed overview on supported configurable items.
|
|
@ -1,3 +0,0 @@
|
|||
# Plex
|
||||
|
||||
Plex chart is a chart designed to deploy plex in a TrueNAS SCALE kubernetes cluster.
|
|
@ -1,274 +0,0 @@
|
|||
groups:
|
||||
- name: "Container Images"
|
||||
description: "Image to be used for container"
|
||||
- name: "Container Entrypoint"
|
||||
description: "Configuration of the executable that will be run when the container is started"
|
||||
- name: "Container Environment Variables"
|
||||
description: "Set the environment that will be visible to the container"
|
||||
- name: "Networking"
|
||||
description: "Configure networking for container"
|
||||
- name: "Storage"
|
||||
description: "Persist and share data that is separate from the lifecycle of the container"
|
||||
- name: "Plex Configuration"
|
||||
description: "Configure plex deployment"
|
||||
- name: "Workload Details"
|
||||
description: "Configure how workload should be deployed"
|
||||
- name: "Scaling/Upgrade Policy"
|
||||
description: "Configure how pods are replaced when configuration is upgraded"
|
||||
- name: "Restart Policy"
|
||||
description: "Configure when pod should be restarted in case of failure"
|
||||
- name: "Resource Reservation"
|
||||
description: "Specify resources to be allocated to workload"
|
||||
|
||||
portals:
|
||||
web_portal:
|
||||
protocols:
|
||||
- "http"
|
||||
host:
|
||||
- "$node_ip"
|
||||
ports:
|
||||
- "$variable-plexServiceTCP.port"
|
||||
path: "/web"
|
||||
|
||||
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
|
||||
required: true
|
||||
default: "plexinc/pms-docker"
|
||||
- variable: tag
|
||||
description: "Tag to use for specified image"
|
||||
label: "Image Tag"
|
||||
schema:
|
||||
type: string
|
||||
default: "1.20.2.3402-0fec14d92"
|
||||
- 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: claimToken
|
||||
label: "Plex Claim Token"
|
||||
group: "Plex Configuration"
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
- variable: advertiseIp
|
||||
label: "Plex Advertise IP"
|
||||
group: "Plex Configuration"
|
||||
schema:
|
||||
type: string
|
||||
|
||||
- variable: extraEnv
|
||||
label: "Environment variables for plex"
|
||||
group: "Plex Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
additional_attrs: true
|
||||
attrs: []
|
||||
|
||||
- variable: proxy
|
||||
label: "Configure Proxy environment variable"
|
||||
group: "Plex Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: enabled
|
||||
label: "Enable Proxy"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: http
|
||||
label: "HTTP Proxy"
|
||||
schema:
|
||||
type: string
|
||||
- variable: https
|
||||
label: "HTTPS Proxy"
|
||||
schema:
|
||||
type: string
|
||||
|
||||
- variable: hostNetwork
|
||||
label: "Configure Host Network"
|
||||
group: "Networking"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
- variable: timezone
|
||||
label: "Plex container timezone"
|
||||
group: "Plex Configuration"
|
||||
schema:
|
||||
type: string
|
||||
default: "Etc/UTC"
|
||||
$ref:
|
||||
- "definitions/timezone"
|
||||
|
||||
# Update strategy
|
||||
- variable: strategyType
|
||||
description: "Upgrade Policy"
|
||||
label: "Update Strategy"
|
||||
group: "Scaling/Upgrade Policy"
|
||||
schema:
|
||||
type: string
|
||||
default: "Recreate"
|
||||
enum:
|
||||
- value: "RollingUpdate"
|
||||
description: "Create new pods and then kill old ones"
|
||||
- value: "Recreate"
|
||||
description: "Kill existing pods before creating new ones"
|
||||
|
||||
# Port configuration
|
||||
- variable: plexServiceTCP
|
||||
label: "Configure Plex TCP Service"
|
||||
group: "Networking"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: port
|
||||
label: "Port to expose for Plex UI"
|
||||
schema:
|
||||
type: int
|
||||
min: 9000
|
||||
max: 65535
|
||||
default: 32400
|
||||
|
||||
- variable: transcodeHostPathEnabled
|
||||
label: "Configure Host Path for Transcode"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
show_subquestions_if: true
|
||||
subquestions:
|
||||
- variable: transcodeHostPath
|
||||
label: "Specify HostPath for Transcode"
|
||||
schema:
|
||||
type: hostpath
|
||||
required: true
|
||||
|
||||
- variable: transcodeVolume
|
||||
label: "Configure iXVolume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
show_if: [["transcodeHostPathEnabled", "=", false]]
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
description: "Path where the volume will be mounted inside the pod"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/transcode"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-plex_transcode"
|
||||
editable: false
|
||||
|
||||
- variable: dataHostPathEnabled
|
||||
label: "Configure Host Path for Data"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
show_subquestions_if: true
|
||||
subquestions:
|
||||
- variable: dataHostPath
|
||||
label: "Specify HostPath for Data"
|
||||
schema:
|
||||
type: hostpath
|
||||
required: true
|
||||
|
||||
- variable: dataVolume
|
||||
label: "Configure data iXVolume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
show_if: [["dataHostPathEnabled", "=", false]]
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
description: "Path where the volume will be mounted inside the pod"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/data"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-plex_data"
|
||||
editable: false
|
||||
|
||||
- variable: configHostPathEnabled
|
||||
label: "Configure Host Path for Config"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
show_subquestions_if: true
|
||||
subquestions:
|
||||
- variable: configHostPath
|
||||
label: "Specify HostPath for Config"
|
||||
schema:
|
||||
type: hostpath
|
||||
required: true
|
||||
|
||||
- variable: configVolume
|
||||
label: "Configure iXVolume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
show_if: [["configHostPathEnabled", "=", false]]
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
description: "Path where the volume will be mounted inside the pod"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/config"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-plex_config"
|
||||
editable: false
|
||||
|
||||
# Specify GPU configuration
|
||||
- variable: gpuConfiguration
|
||||
label: "GPU Configuration"
|
||||
group: "Resource Reservation"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "definitions/gpuConfiguration"
|
|
@ -1,3 +0,0 @@
|
|||
1. Get the application URL by running these commands:
|
||||
|
||||
http://$node_ip:{{ .Values.plexServiceTCP.port }}/
|
|
@ -1,81 +0,0 @@
|
|||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "plex.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "plex.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "plex.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "plex.labels" -}}
|
||||
helm.sh/chart: {{ include "plex.chart" . }}
|
||||
{{ include "plex.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "plex.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "plex.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "plex.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "plex.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
abstract: |
|
||||
Joins a list of values into a comma separated string
|
||||
values: |
|
||||
test:
|
||||
- foo
|
||||
- bar
|
||||
usage: |
|
||||
{{ include "joinListWithComma" .Values.test }}
|
||||
return: |
|
||||
foo,bar
|
||||
*/}}
|
||||
|
||||
{{- define "joinListWithComma" -}}
|
||||
{{- $local := dict "first" true -}}
|
||||
{{- range $k, $v := . -}}{{- if not $local.first -}},{{- end -}}{{- $v -}}{{- $_ := set $local "first" false -}}{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,50 +0,0 @@
|
|||
{{/*
|
||||
Retrieve host path from ix volumes based on dataset name
|
||||
*/}}
|
||||
{{- define "retrieveHostPathFromiXVolume" -}}
|
||||
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
|
||||
{{- $dsName := base $hostPathConfiguration.hostPath -}}
|
||||
{{- if eq $.datasetName $dsName -}}
|
||||
{{- $hostPathConfiguration.hostPath -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve host path for transcode
|
||||
Let's please remove the redundancy
|
||||
*/}}
|
||||
{{- define "configuredHostPathTranscode" -}}
|
||||
{{- if .Values.transcodeHostPathEnabled -}}
|
||||
{{- .Values.transcodeHostPath -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.transcodeVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve host path for data
|
||||
Let's please remove the redundancy
|
||||
*/}}
|
||||
{{- define "configuredHostPathData" -}}
|
||||
{{- if .Values.dataHostPathEnabled -}}
|
||||
{{- .Values.dataHostPath -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.dataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve host path for transcode
|
||||
Let's please remove the redundancy
|
||||
*/}}
|
||||
{{- define "configuredHostPathConfig" -}}
|
||||
{{- if .Values.configHostPathEnabled -}}
|
||||
{{- .Values.configHostPath -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.configVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,153 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "plex.fullname" . }}
|
||||
labels:
|
||||
{{- include "plex.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 3
|
||||
strategy:
|
||||
type: {{ .Values.strategyType }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "plex.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "plex.selectorLabels" . | nindent 8 }}
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
{{- if .Values.hostNetwork }}
|
||||
hostNetwork: {{ .Values.hostNetwork }}
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: pms
|
||||
protocol: TCP
|
||||
containerPort: 32400
|
||||
{{- if .Values.hostNetwork }}
|
||||
hostPort: {{ .Values.plexServiceTCP.port }}
|
||||
{{- end }}
|
||||
- name: plex-dlna
|
||||
protocol: TCP
|
||||
containerPort: 32469
|
||||
- name: plex-dlna-udp
|
||||
protocol: UDP
|
||||
containerPort: 1900
|
||||
- name: plex-gdm1
|
||||
protocol: UDP
|
||||
containerPort: 32410
|
||||
- name: plex-gdm2
|
||||
protocol: UDP
|
||||
containerPort: 32412
|
||||
- name: plex-gdm3
|
||||
protocol: UDP
|
||||
containerPort: 32413
|
||||
- name: plex-gdm4
|
||||
protocol: UDP
|
||||
containerPort: 32414
|
||||
env:
|
||||
- name: TZ
|
||||
value: "{{ .Values.timezone }}"
|
||||
# TODO: move this to a secret?
|
||||
- name: PLEX_CLAIM
|
||||
value: "{{ .Values.claimToken }}"
|
||||
# plex env vars
|
||||
- name: PMS_INTERNAL_ADDRESS
|
||||
value: http://{{ template "plex.fullname" . }}:32400
|
||||
- name: PMS_IMAGE
|
||||
value: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
- name: KUBE_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- if .Values.proxy.enabled }}
|
||||
{{- if .Values.proxy.http }}
|
||||
- name: "HTTP_PROXY"
|
||||
value: "{{.Values.proxy.http}}"
|
||||
{{- end }}
|
||||
{{- if .Values.proxy.https }}
|
||||
- name: "HTTPS_PROXY"
|
||||
value: "{{.Values.proxy.https}}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.advertiseIp }}
|
||||
- name: "ADVERTISE_IP"
|
||||
value: "{{.Values.advertiseIp}}"
|
||||
{{- end }}
|
||||
{{- if .Values.allowedNetworks }}
|
||||
- name: "ALLOWED_NETWORKS"
|
||||
value: "{{include "joinListWithComma" .Values.allowedNetworks}}"
|
||||
{{- end }}
|
||||
# Extra ENV Values supplied by user
|
||||
{{- range $key, $value := .Values.extraEnv }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $value }}
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /identity
|
||||
port: 32400
|
||||
failureThreshold: 5
|
||||
periodSeconds: 15
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /identity
|
||||
port: 32400
|
||||
failureThreshold: 5
|
||||
periodSeconds: 15
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /identity
|
||||
port: 32400
|
||||
initialDelaySeconds: 5
|
||||
failureThreshold: 40
|
||||
periodSeconds: 15
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: config
|
||||
mountPath: /config
|
||||
- name: transcode
|
||||
mountPath: /transcode
|
||||
- name: shared
|
||||
mountPath: /shared
|
||||
- name: shared-logs
|
||||
mountPath: "/config/Library/Application Support/Plex Media Server/Logs"
|
||||
{{- if .Values.gpuConfiguration }}
|
||||
resources:
|
||||
limits:
|
||||
{{- toYaml .Values.gpuConfiguration | nindent 14 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: data
|
||||
{{- if .Values.emptyDirVolumes }}
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
hostPath:
|
||||
path: {{ template "configuredHostPathData" . }}
|
||||
{{- end }}
|
||||
- name: config
|
||||
{{- if .Values.emptyDirVolumes }}
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
hostPath:
|
||||
path: {{ template "configuredHostPathConfig" . }}
|
||||
{{- end }}
|
||||
- name: transcode
|
||||
{{- if .Values.emptyDirVolumes }}
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
hostPath:
|
||||
path: {{ template "configuredHostPathTranscode" . }}
|
||||
{{- end }}
|
||||
- name: shared
|
||||
emptyDir: {}
|
||||
- name: shared-logs
|
||||
emptyDir: {}
|
|
@ -1,35 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .Values.hostNetwork }}
|
||||
name: {{ include "plex.fullname" . }}-tcp-cluster-ip
|
||||
{{- else }}
|
||||
name: {{ include "plex.fullname" . }}-tcp
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "plex.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Values.hostNetwork }}
|
||||
type: ClusterIP
|
||||
{{- else }}
|
||||
type: NodePort
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: pms
|
||||
port: {{ .Values.plexServiceTCP.port }}
|
||||
protocol: TCP
|
||||
targetPort: pms
|
||||
{{- if eq .Values.hostNetwork false }}
|
||||
nodePort: {{.Values.plexServiceTCP.port}}
|
||||
{{- end }}
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: pms
|
||||
- name: https
|
||||
port: 443
|
||||
targetPort: pms
|
||||
- name: plex-dlna
|
||||
port: 1900
|
||||
targetPort: plex-dlna
|
||||
selector:
|
||||
{{- include "plex.selectorLabels" . | nindent 4 }}
|
|
@ -1,31 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "plex.fullname" . }}-udp
|
||||
labels:
|
||||
{{- include "plex.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: plex-dlna-udp
|
||||
port: 1900
|
||||
protocol: UDP
|
||||
targetPort: plex-dlna-udp
|
||||
- name: plex-gdm1
|
||||
port: 32410
|
||||
protocol: UDP
|
||||
targetPort: plex-gdm1
|
||||
- name: plex-gdm2
|
||||
port: 32412
|
||||
protocol: UDP
|
||||
targetPort: plex-gdm2
|
||||
- name: plex-gdm3
|
||||
port: 32413
|
||||
protocol: UDP
|
||||
targetPort: plex-gdm3
|
||||
- name: plex-gdm4
|
||||
port: 32414
|
||||
protocol: UDP
|
||||
targetPort: plex-gdm4
|
||||
selector:
|
||||
{{- include "plex.selectorLabels" . | nindent 4 }}
|
|
@ -1,72 +0,0 @@
|
|||
# Default values
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# The Image to use for PLEX
|
||||
|
||||
image:
|
||||
repository: plexinc/pms-docker
|
||||
tag: 1.20.2.3402-0fec14d92
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
##### START --> Official PLEX container environment variables
|
||||
# Override this with the plex claim token from plex.tv/claim
|
||||
claimToken: ""
|
||||
|
||||
# Set the timezone of the plex server
|
||||
timezone: "Etc/UTC"
|
||||
|
||||
# add your pod network subnet to the `List of IP addresses and networks that are allowed without auth`
|
||||
# This will override the manual settings, so only use this if you will not need to change it manually.
|
||||
# This list will be automatically converted to a command seperated string when passed to the container.
|
||||
# You would specify this when using helm CLI with --set allowedNetworks="{127.0.0.1,10.54.2.0/24}"
|
||||
# allowedNetworks:
|
||||
# - 127.0.0.1
|
||||
# - 10.54.2.0/24
|
||||
|
||||
# Instruct the Plex Media Server Container to Change the Configuration Directory Ownership
|
||||
# Default is true, you would only need to set this if you want to disable it.
|
||||
# changeConfigDirOwnership: true
|
||||
|
||||
# advertiseIp This variable defines the additional IPs on which the server may be be found.
|
||||
# For example: http://10.1.1.23:32400.
|
||||
# This adds to the list where the server advertises that it can be found.
|
||||
# See https://hub.docker.com/r/plexinc/pms-docker/ for details
|
||||
# advertiseIp: "http://10.1.1.23:32400"
|
||||
|
||||
# Set The user id of the plex user created inside the container.
|
||||
# See https://hub.docker.com/r/plexinc/pms-docker/ for details
|
||||
# plexUid: 1000
|
||||
|
||||
# Set The group id of the plex group created inside the container
|
||||
# See https://hub.docker.com/r/plexinc/pms-docker/ for details
|
||||
# plexGid: 1000
|
||||
|
||||
##### END --> Official PLEX container environment variables
|
||||
|
||||
# You can add as many Additional ENV variables here
|
||||
# The following is the same as --set extraEnv.TMPDIR="/transcode"
|
||||
# extraEnv:
|
||||
# TMPDIR: /transcode
|
||||
|
||||
# upgrade strategy type (e.g. Recreate or RollingUpdate)
|
||||
strategyType: Recreate
|
||||
|
||||
plexServiceTCP:
|
||||
port: 32400
|
||||
|
||||
hostNetwork: false
|
||||
|
||||
transcodeHostPathEnabled: false
|
||||
dataHostPathEnabled: false
|
||||
configHostPathEnabled: false
|
||||
|
||||
proxy:
|
||||
# This allows to set a proxy environment variable, which PMS uses to fetch the token and assets like movie cover
|
||||
enabled: false
|
||||
# http: "http://proxy:8080"
|
||||
# https: "https://proxy:8080"
|
||||
# noproxy: "localhost,127.0.0.1,10.96.0.0/12,10.244.0.0/12"
|
||||
|
||||
gpuConfiguration: {}
|
||||
emptyDirVolumes: true
|
|
@ -1,71 +0,0 @@
|
|||
# Default values
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# The Image to use for PLEX
|
||||
|
||||
image:
|
||||
repository: plexinc/pms-docker
|
||||
tag: 1.20.2.3402-0fec14d92
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
##### START --> Official PLEX container environment variables
|
||||
# Override this with the plex claim token from plex.tv/claim
|
||||
claimToken: ""
|
||||
|
||||
# Set the timezone of the plex server
|
||||
timezone: "Etc/UTC"
|
||||
|
||||
# add your pod network subnet to the `List of IP addresses and networks that are allowed without auth`
|
||||
# This will override the manual settings, so only use this if you will not need to change it manually.
|
||||
# This list will be automatically converted to a command seperated string when passed to the container.
|
||||
# You would specify this when using helm CLI with --set allowedNetworks="{127.0.0.1,10.54.2.0/24}"
|
||||
# allowedNetworks:
|
||||
# - 127.0.0.1
|
||||
# - 10.54.2.0/24
|
||||
|
||||
# Instruct the Plex Media Server Container to Change the Configuration Directory Ownership
|
||||
# Default is true, you would only need to set this if you want to disable it.
|
||||
# changeConfigDirOwnership: true
|
||||
|
||||
# advertiseIp This variable defines the additional IPs on which the server may be be found.
|
||||
# For example: http://10.1.1.23:32400.
|
||||
# This adds to the list where the server advertises that it can be found.
|
||||
# See https://hub.docker.com/r/plexinc/pms-docker/ for details
|
||||
# advertiseIp: "http://10.1.1.23:32400"
|
||||
|
||||
# Set The user id of the plex user created inside the container.
|
||||
# See https://hub.docker.com/r/plexinc/pms-docker/ for details
|
||||
# plexUid: 1000
|
||||
|
||||
# Set The group id of the plex group created inside the container
|
||||
# See https://hub.docker.com/r/plexinc/pms-docker/ for details
|
||||
# plexGid: 1000
|
||||
|
||||
##### END --> Official PLEX container environment variables
|
||||
|
||||
# You can add as many Additional ENV variables here
|
||||
# The following is the same as --set extraEnv.TMPDIR="/transcode"
|
||||
# extraEnv:
|
||||
# TMPDIR: /transcode
|
||||
|
||||
# upgrade strategy type (e.g. Recreate or RollingUpdate)
|
||||
strategyType: Recreate
|
||||
|
||||
plexServiceTCP:
|
||||
port: 32400
|
||||
|
||||
hostNetwork: false
|
||||
|
||||
transcodeHostPathEnabled: false
|
||||
dataHostPathEnabled: false
|
||||
configHostPathEnabled: false
|
||||
|
||||
proxy:
|
||||
# This allows to set a proxy environment variable, which PMS uses to fetch the token and assets like movie cover
|
||||
enabled: false
|
||||
# http: "http://proxy:8080"
|
||||
# https: "https://proxy:8080"
|
||||
# noproxy: "localhost,127.0.0.1,10.96.0.0/12,10.244.0.0/12"
|
||||
|
||||
gpuConfiguration: {}
|
|
@ -1,3 +0,0 @@
|
|||
categories:
|
||||
- entertainment
|
||||
icon_url: https://www.plex.tv/wp-content/uploads/2018/01/pmp-icon-1.png
|
|
@ -1,23 +0,0 @@
|
|||
# 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
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
|
@ -1,23 +0,0 @@
|
|||
apiVersion: v2
|
||||
name: ix-chart
|
||||
description: A Helm chart for deploying simple workloads Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 2012.0.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: v1
|
|
@ -1,118 +0,0 @@
|
|||
# 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.
|
||||
|
||||
This chart will deploy a docker image as a kubernetes workload allowing user to configure the workload deployment / management.
|
||||
|
||||
## Introduction
|
||||
|
||||
iX-chart is designed for simple single docker image deployments.
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the iX chart and
|
||||
their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|:-------------------------------|:----------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------|
|
||||
| `workloadType` | Specify type of workload to deploy | `Deployment` |
|
||||
| `cronSchedule` | Specify schedule for cronjob if `workloadType` is `CronJob`. | `{"minute": "5", "hour": "*", "dom": "*", "month": "*", "dow": "*"}` |
|
||||
| `image.repository` | The image repository to pull from | `debian` |
|
||||
| `image.tag` | The image tag to pull from | `latest` |
|
||||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `updateStrategy` | Upgrade Policy | `RollingUpdate` |
|
||||
| `restartPolicy` | Restart Policy for containers in workload | `Always` |
|
||||
| `jobRestartPolicy` | Restart Policy for job type workload ( only applicable if `workloadType` is `Job`/`CronJob` | `OnFailure` |
|
||||
| `containerCommand` | Commands to execute inside container overriding image CMD default | `null` |
|
||||
| `containerArgs` | Specify arguments for container command | `null` |
|
||||
| `containerEnvironmentVariables`| Container Environment Variables | `null` |
|
||||
| `externalInterfaces` | Add external interfaces in the pod | `null` |
|
||||
| `dnsPolicy` | Specify DNS Policy for pod | `Default` |
|
||||
| `dnsConfig` | Specify custom DNS configuration which will be applied to the pod | `{"nameservers": [], "searches": []}` |
|
||||
| `hostNetwork` | Use host network for workload ( similar to docker host networking ) | `false` |
|
||||
| `hostPortsList` | Specify ports of host and workload to forward traffic from host port to workload port. | `null` |
|
||||
| `portForwardingList` | Specify ports of node and workload to forward traffic from node port to workload port | `null` |
|
||||
| `hostPathVolumes` | Specify host paths to be used as hostpath volumes for the workload | `null` |
|
||||
| `volumes` | Specify `ix_volumes` | `null` |
|
||||
| `livenessProbe` | Configure Liveness Probe for workload | `null` |
|
||||
| `gpuConfiguration` | Allocate GPU to workload ( if available ) | `{}` |
|
||||
|
||||
|
||||
## Persistence
|
||||
|
||||
Chart release iX chart offers 2 ways to have persistent storage:
|
||||
|
||||
1) `hostPathVolumes`
|
||||
2) `volumes`
|
||||
|
||||
For (1), they are kubernetes host path volumes which the user can assign to the workload with RO/RW permissions.
|
||||
|
||||
(2) is a host path volume as well but it operates differently then (1) in terms of where it lives and how it's lifecycle is tied to the chart release.
|
||||
For (2), users specify where they would like persistent storage in the workload and a dataset name ( it should be unique per each chart release ), based on this input,
|
||||
system will create a dataset and then use it as a host path volume for the workload. During upgrades, snapshot will be taken for these volumes and on rollback users can subsequently
|
||||
restore the snapshots hence the data.
|
||||
When a chart release will be deleted, all (2) volumes data will be deleted unlike (1) ( until of course they are not in the chart release's dataset path ).
|
||||
|
||||
## Recommended Persistence Configuration Examples
|
||||
|
||||
The following is a recommended configuration example for creating ix volumes
|
||||
|
||||
```
|
||||
"volumes": [
|
||||
{
|
||||
"datasetName": "ix_volume1",
|
||||
"mountPath": "/mount_test1"
|
||||
},
|
||||
{
|
||||
"datasetName": "ix_volume2",
|
||||
"mountPath": "/mount_test2"
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
`mountPath` refers to the path inside the pod.
|
||||
|
||||
---
|
||||
|
||||
The following is a recommended configuration example for `hostPathVolumes`
|
||||
|
||||
```
|
||||
"hostPathVolumes": [
|
||||
{
|
||||
"hostPath": "/mnt/pool/test_dir",
|
||||
"mountPath": "/test_dir",
|
||||
"readOnly": true
|
||||
},
|
||||
{
|
||||
"hostPath": "/mnt/pool/test_file",
|
||||
"mountPath": "/test_file",
|
||||
"readOnly": true
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## External Interfaces Configuration Examples
|
||||
|
||||
```
|
||||
"externalInterfaces": [
|
||||
{
|
||||
"hostInterface": "ens3",
|
||||
"ipam": {"type": "dhcp"}
|
||||
},
|
||||
{
|
||||
"hostInterface": "br0",
|
||||
"ipam": {
|
||||
"type": "static",
|
||||
"staticIPConfigurations": ["192.168.0.120/24"],
|
||||
"staticRoutes": [
|
||||
{"destination": "0.0.0.0/0", "gateway": "192.168.0.1"}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
The first entry in the above configuration example will add an external interface in the pod using macvlan with `ipam` being set to `dhcp`.
|
||||
Second entry will add an external interface in the pod using `bridge` and using static IP configuration for the external interface.
|
|
@ -1,4 +0,0 @@
|
|||
# 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.
|
|
@ -1,463 +0,0 @@
|
|||
groups:
|
||||
- name: "Container Images"
|
||||
description: "Image to be used for container"
|
||||
- name: "Container Entrypoint"
|
||||
description: "Configuration of the executable that will be run when the container is started"
|
||||
- name: "Container Environment Variables"
|
||||
description: "Set the environment that will be visible to the container"
|
||||
- name: "Networking"
|
||||
description: "Configure networking for container"
|
||||
- name: "Storage"
|
||||
description: "Persist and share data that is separate from the lifecycle of the container"
|
||||
- name: "Health Check"
|
||||
description: "Define mechanism to periodically probe the container to ensure it's functioning as desired"
|
||||
- name: "Workload Details"
|
||||
description: "Configure how workload should be deployed"
|
||||
- name: "Scaling/Upgrade Policy"
|
||||
description: "Configure how pods are replaced when configuration is upgraded"
|
||||
- name: "Restart Policy"
|
||||
description: "Configure when pod should be restarted in case of failure"
|
||||
- name: "Resource Reservation"
|
||||
description: "Specify resources to be allocated to workload"
|
||||
|
||||
questions:
|
||||
# Workload type
|
||||
- variable: workloadType
|
||||
description: "Please specify type of workload to deploy"
|
||||
label: "Workload Type"
|
||||
group: "Workload Details"
|
||||
schema:
|
||||
type: string
|
||||
default: "Deployment"
|
||||
required: true
|
||||
enum:
|
||||
- value: "Deployment"
|
||||
description: "Deploy a Deployment workload"
|
||||
- value: "Job"
|
||||
description: "Deploy job workload"
|
||||
- value: "CronJob"
|
||||
description: "Deploy cronjob workload"
|
||||
|
||||
# Cronjob schedule
|
||||
- variable: cronSchedule
|
||||
label: "Cron Schedule"
|
||||
group: "Workload Details"
|
||||
schema:
|
||||
type: cron
|
||||
show_if: [["workloadType", "=", "CronJob"]]
|
||||
default:
|
||||
minute: "5"
|
||||
|
||||
# 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
|
||||
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"
|
||||
|
||||
# Update strategy
|
||||
- variable: updateStrategy
|
||||
description: "Upgrade Policy"
|
||||
label: "Update Strategy"
|
||||
group: "Scaling/Upgrade Policy"
|
||||
schema:
|
||||
type: string
|
||||
show_if: [["workloadType", "=", "Deployment"]]
|
||||
default: "RollingUpdate"
|
||||
enum:
|
||||
- value: "RollingUpdate"
|
||||
description: "Create new pods and then kill old ones"
|
||||
- value: "Recreate"
|
||||
description: "Kill existing pods before creating new ones"
|
||||
|
||||
# Restart Policy
|
||||
- variable: restartPolicy
|
||||
description: "Restart Policy for workload"
|
||||
label: "Restart Policy"
|
||||
group: "Restart Policy"
|
||||
schema:
|
||||
type: string
|
||||
show_if: [["workloadType", "=", "Deployment"]]
|
||||
default: "Always"
|
||||
enum:
|
||||
- value: "Always"
|
||||
description: "Always restart containers in a pod if they exit"
|
||||
- value: "OnFailure"
|
||||
description: "Only restart containers if they exit with a failure"
|
||||
- value: "Never"
|
||||
description: "Never restart containers if they exit"
|
||||
- variable: jobRestartPolicy
|
||||
description: "Restart Policy for workload"
|
||||
label: "Restart Policy"
|
||||
group: "Restart Policy"
|
||||
schema:
|
||||
type: string
|
||||
default: "OnFailure"
|
||||
show_if: [["workloadType", "!=", "Deployment"]]
|
||||
enum:
|
||||
- value: "OnFailure"
|
||||
description: "Only restart job if it fails"
|
||||
- value: "Never"
|
||||
description: "Never restart job even if it fails"
|
||||
|
||||
# Configurable CMD / Entrypoint / Environment Variables
|
||||
- variable: containerCommand
|
||||
description: "Commands to execute inside container overriding image CMD default"
|
||||
label: "Container CMD"
|
||||
group: "Container Entrypoint"
|
||||
schema:
|
||||
type: list
|
||||
items:
|
||||
- variable: command
|
||||
description: "Container Command"
|
||||
label: "Command"
|
||||
schema:
|
||||
type: string
|
||||
- variable: containerArgs
|
||||
description: "Specify arguments for container command"
|
||||
label: "Container Args"
|
||||
group: "Container Entrypoint"
|
||||
schema:
|
||||
type: list
|
||||
items:
|
||||
- variable: arg
|
||||
description: "Container Arg"
|
||||
label: "Arg"
|
||||
schema:
|
||||
type: string
|
||||
- variable: containerEnvironmentVariables
|
||||
description: "Container Environment Variables"
|
||||
label: "Container Environment Variables"
|
||||
group: "Container Environment Variables"
|
||||
schema:
|
||||
type: list
|
||||
items:
|
||||
- variable: environmentVariable
|
||||
description: "Container Environment Variable"
|
||||
label: "Container Environment Variable"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
description: "Environment Variable Name"
|
||||
label: "Environment Variable Name"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: value
|
||||
description: "Environment Variable Value"
|
||||
label: "Environment Variable Value"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
# Networking options
|
||||
- variable: externalInterfaces
|
||||
description: "Add External Interfaces"
|
||||
label: "Add external Interfaces"
|
||||
group: "Networking"
|
||||
schema:
|
||||
type: list
|
||||
items:
|
||||
- variable: interfaceConfiguration
|
||||
description: "Interface Configuration"
|
||||
label: "Interface Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "normalize/interfaceConfiguration"
|
||||
attrs:
|
||||
- variable: hostInterface
|
||||
description: "Please specify host interface"
|
||||
label: "Host Interface"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
$ref:
|
||||
- "definitions/interface"
|
||||
- variable: ipam
|
||||
description: "Define how IP Address will be managed"
|
||||
label: "IP Address Management"
|
||||
schema:
|
||||
type: dict
|
||||
required: true
|
||||
attrs:
|
||||
- variable: type
|
||||
description: "Specify type for IPAM"
|
||||
label: "IPAM Type"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
enum:
|
||||
- value: "dhcp"
|
||||
description: "Use DHCP"
|
||||
- value: "static"
|
||||
description: "Use static IP"
|
||||
show_subquestions_if: "static"
|
||||
subquestions:
|
||||
- variable: staticIPConfigurations
|
||||
label: "Static IP Addresses"
|
||||
schema:
|
||||
type: list
|
||||
items:
|
||||
- variable: staticIP
|
||||
label: "Static IP"
|
||||
schema:
|
||||
type: ipaddr
|
||||
cidr: true
|
||||
- variable: staticRoutes
|
||||
label: "Static Routes"
|
||||
schema:
|
||||
type: list
|
||||
items:
|
||||
- variable: staticRouteConfiguration
|
||||
label: "Static Route Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: destination
|
||||
label: "Destination"
|
||||
schema:
|
||||
type: ipaddr
|
||||
cidr: true
|
||||
required: true
|
||||
- variable: gateway
|
||||
label: "Gateway"
|
||||
schema:
|
||||
type: ipaddr
|
||||
cidr: false
|
||||
required: true
|
||||
|
||||
- variable: dnsPolicy
|
||||
label: "DNS Policy"
|
||||
description: "Default behaviour is where Pod inherits the name resolution configuration from the node that the pods run on, if None is specified, It allows a Pod to ignore DNS settings from the Kubernetes environment."
|
||||
group: "Networking"
|
||||
schema:
|
||||
type: string
|
||||
default: "Default"
|
||||
enum:
|
||||
- value: "Default"
|
||||
description: "Use Default DNS Policy"
|
||||
- value: "None"
|
||||
description: "Ignore DNS settings from the Kuberentes cluster"
|
||||
- variable: dnsConfig
|
||||
label: "DNS Configuration"
|
||||
group: "Networking"
|
||||
description: "Specify custom DNS configuration which will be applied to the pod"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: nameservers
|
||||
label: "Nameservers"
|
||||
schema:
|
||||
default: []
|
||||
type: list
|
||||
items:
|
||||
- variable: nameserver
|
||||
label: "Nameserver"
|
||||
schema:
|
||||
type: string
|
||||
- variable: searches
|
||||
label: "Searches"
|
||||
schema:
|
||||
default: []
|
||||
type: list
|
||||
items:
|
||||
- variable: search
|
||||
label: "Search Entry"
|
||||
schema:
|
||||
type: string
|
||||
|
||||
- variable: hostNetwork
|
||||
label: "Provide access to node network namespace for the workload"
|
||||
group: "Networking"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
- variable: hostPortsList
|
||||
label: "Specify host ports for the workload"
|
||||
description: "Only use host ports if scaling of a workload is not required"
|
||||
group: "Networking"
|
||||
schema:
|
||||
show_if: [["updateStrategy", "=", "Recreate"]]
|
||||
type: list
|
||||
items:
|
||||
- variable: hostPortConfiguration
|
||||
label: "Host Port Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: containerPort
|
||||
label: "Container Port"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: hostPort
|
||||
label: "Host Port"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
- variable: portForwardingList
|
||||
label: "Specify Node ports to forward to workload"
|
||||
group: "Networking"
|
||||
description: "Specify ports of node and workload to forward traffic from node port to workload port"
|
||||
schema:
|
||||
type: list
|
||||
items:
|
||||
- variable: portForwarding
|
||||
label: "Port Forwarding Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: containerPort
|
||||
label: "Container Port"
|
||||
schema:
|
||||
type: int
|
||||
required: true
|
||||
- variable: nodePort
|
||||
label: "Node Port"
|
||||
schema:
|
||||
type: int
|
||||
required: true
|
||||
min: 9000
|
||||
max: 65535
|
||||
- variable: protocol
|
||||
label: "Protocol"
|
||||
schema:
|
||||
type: string
|
||||
default: "TCP"
|
||||
enum:
|
||||
- value: "TCP"
|
||||
description: "TCP Protocol"
|
||||
- value: "UDP"
|
||||
description: "UDP Protocol"
|
||||
|
||||
# Storage Options
|
||||
# Host path based volumes
|
||||
- variable: hostPathVolumes
|
||||
label: "Host Path Volumes"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: list
|
||||
items:
|
||||
- variable: hostPathConfiguration
|
||||
label: "Host Path Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: hostPath
|
||||
label: "Host Path"
|
||||
schema:
|
||||
type: hostpath
|
||||
required: true
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
description: "Path where host path will be mounted inside the pod"
|
||||
schema:
|
||||
type: path
|
||||
required: true
|
||||
- variable: readOnly
|
||||
label: "Read Only"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
# Volumes
|
||||
- variable: volumes
|
||||
label: "Volumes"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: list
|
||||
items:
|
||||
- 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
|
||||
|
||||
# Pod Probes
|
||||
# Liveness Probe
|
||||
- variable: livenessProbe
|
||||
label: "Liveness Probe"
|
||||
description: "Configure Liveness Probe"
|
||||
group: "Health Check"
|
||||
schema:
|
||||
type: dict
|
||||
default: null
|
||||
"null": true
|
||||
attrs:
|
||||
- variable: command
|
||||
label: "Liveness command"
|
||||
description: "Specify a command to determine liveness of pod"
|
||||
schema:
|
||||
type: list
|
||||
required: true
|
||||
items:
|
||||
- variable: commandArg
|
||||
label: "Command Arg"
|
||||
schema:
|
||||
type: string
|
||||
- variable: initialDelaySeconds
|
||||
label: "Seconds Delay"
|
||||
description: "Seconds to delay the first liveness probe"
|
||||
schema:
|
||||
type: int
|
||||
default: 5
|
||||
- variable: periodSeconds
|
||||
label: "Period Seconds"
|
||||
description: "Specify number of seconds to run liveness probe"
|
||||
schema:
|
||||
type: int
|
||||
default: 10
|
||||
|
||||
# Specify GPU configuration
|
||||
- variable: gpuConfiguration
|
||||
label: "GPU Configuration"
|
||||
group: "Resource Reservation"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "definitions/gpuConfiguration"
|
|
@ -1,2 +0,0 @@
|
|||
1. Get the application URL by running these commands:
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
{{/*
|
||||
Container Command
|
||||
*/}}
|
||||
{{- define "containerCommand" }}
|
||||
{{- if .Values.containerCommand }}
|
||||
command:
|
||||
{{- range .Values.containerCommand }}
|
||||
- {{ . | quote}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Container Args
|
||||
*/}}
|
||||
{{- define "containerArgs" }}
|
||||
{{- if .Values.containerArgs }}
|
||||
args:
|
||||
{{- range .Values.containerArgs }}
|
||||
- {{ . | quote}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Container Environment Variables
|
||||
*/}}
|
||||
{{- define "containerEnvVariables" }}
|
||||
{{- if .Values.containerEnvironmentVariables }}
|
||||
env:
|
||||
{{- range .Values.containerEnvironmentVariables }}
|
||||
- name: {{ .name | quote }}
|
||||
value: {{ .value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Container Liveness Probe
|
||||
*/}}
|
||||
{{- define "containerLivenssProbe" }}
|
||||
{{- if .Values.livenessProbe }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
{{ toYaml .Values.livenessProbe.command | indent 16 }}
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Container Ports
|
||||
*/}}
|
||||
{{- define "containerPorts" }}
|
||||
{{- if or .Values.portForwardingList .Values.hostPortsList }}
|
||||
ports:
|
||||
{{- range $index, $config := .Values.portForwardingList }}
|
||||
- containerPort: {{ $config.containerPort }}
|
||||
{{- end }}
|
||||
{{- range $index, $config := .Values.hostPortsList }}
|
||||
- containerPort: {{ $config.containerPort }}
|
||||
hostPort: {{ $config.hostPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Container Resource Configuration
|
||||
*/}}
|
||||
{{- define "containerResourceConfiguration" }}
|
||||
{{- if .Values.gpuConfiguration }}
|
||||
resources:
|
||||
limits:
|
||||
{{- toYaml .Values.gpuConfiguration | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -1,71 +0,0 @@
|
|||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "ix-chart.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "ix-chart.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "ix-chart.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "ix-chart.labels" -}}
|
||||
helm.sh/chart: {{ include "ix-chart.chart" . }}
|
||||
{{ include "ix-chart.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "ix-chart.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "ix-chart.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "ix-chart.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "ix-chart.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/*
|
||||
Convert cron schema object to cron format
|
||||
*/}}
|
||||
{{- define "cronExpression" }}
|
||||
{{- printf "%s %s %s %s %s " .minute .hour .dom .month .dow }}
|
||||
{{- end }}
|
|
@ -1,10 +0,0 @@
|
|||
{{/*
|
||||
DNS Configuration
|
||||
*/}}
|
||||
{{- define "dnsConfiguration" }}
|
||||
dnsPolicy: {{ .Values.dnsPolicy }}
|
||||
{{- if .Values.dnsConfig }}
|
||||
dnsConfig:
|
||||
{{- toYaml .Values.dnsConfig | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -1,36 +0,0 @@
|
|||
{{/*
|
||||
Volumes Configuration
|
||||
*/}}
|
||||
{{- define "volumeConfiguration" }}
|
||||
{{- if or .Values.ixVolumes .Values.hostPathVolumes }}
|
||||
volumes:
|
||||
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
|
||||
- name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
|
||||
hostPath:
|
||||
path: {{ $hostPathConfiguration.hostPath }}
|
||||
{{- end }}
|
||||
{{- range $index, $hostPathConfiguration := .Values.ixVolumes }}
|
||||
- name: ix-host-volume-{{ $.Release.Name }}-{{ $index }}
|
||||
hostPath:
|
||||
path: {{ $hostPathConfiguration.hostPath }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Volume Mounts Configuration
|
||||
*/}}
|
||||
{{- define "volumeMountsConfiguration" }}
|
||||
{{- if or .Values.hostPathVolumes .Values.ixVolumes }}
|
||||
volumeMounts:
|
||||
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
|
||||
- mountPath: {{ $hostPathConfiguration.mountPath }}
|
||||
name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
|
||||
readOnly: {{ $hostPathConfiguration.readOnly }}
|
||||
{{- end }}
|
||||
{{- range $index, $hostPathConfiguration := .Values.ixVolumes }}
|
||||
- mountPath: {{ $hostPathConfiguration.mountPath }}
|
||||
name: ix-host-volume-{{ $.Release.Name }}-{{ $index }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -1,141 +0,0 @@
|
|||
{{/*
|
||||
Check if workload type is a deployment
|
||||
*/}}
|
||||
{{- define "workloadIsDeployment" }}
|
||||
{{- if eq .Values.workloadType "Deployment" }}
|
||||
{{- true -}}
|
||||
{{- else }}
|
||||
{{- false -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Check if workload type is a cronjob
|
||||
*/}}
|
||||
{{- define "workloadIsCronJob" }}
|
||||
{{- if eq .Values.workloadType "CronJob" }}
|
||||
{{- true -}}
|
||||
{{- else }}
|
||||
{{- false -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Get API Version based on workload type
|
||||
*/}}
|
||||
{{- define "apiVersion" -}}
|
||||
{{- if eq (include "workloadIsDeployment" .) "true" }}
|
||||
{{- printf "apps/v1" }}
|
||||
{{- else if eq (include "workloadIsCronJob" .) "true" }}
|
||||
{{- printf "batch/v1beta1" }}
|
||||
{{- else }}
|
||||
{{- printf "batch/v1" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/*
|
||||
Get Restart policy based on workload type
|
||||
*/}}
|
||||
{{- define "restartPolicy" -}}
|
||||
{{- if eq (include "workloadIsDeployment" .) "true" }}
|
||||
{{- printf "%s" .Values.restartPolicy }}
|
||||
{{- else }}
|
||||
{{- printf "%s" .Values.jobRestartPolicy }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/*
|
||||
Pod specification
|
||||
*/}}
|
||||
{{- define "podSepc" }}
|
||||
restartPolicy: {{ template "restartPolicy" . }}
|
||||
hostNetwork: {{ .Values.hostNetwork }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
{{- include "volumeMountsConfiguration" . | indent 2}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- include "containerCommand" . | indent 2 }}
|
||||
{{- include "containerArgs" . | indent 2 }}
|
||||
{{- include "containerEnvVariables" . | indent 2 }}
|
||||
{{- include "containerLivenssProbe" . | indent 2 }}
|
||||
{{- include "containerPorts" . | indent 2 }}
|
||||
{{- include "containerResourceConfiguration" . | indent 2 }}
|
||||
{{- include "volumeConfiguration" . }}
|
||||
{{- include "dnsConfiguration" . }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/*
|
||||
Annotations for workload
|
||||
*/}}
|
||||
{{- define "workloadAnnotations" }}
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
{{- if .Values.ixExternalInterfacesConfigurationNames }}
|
||||
k8s.v1.cni.cncf.io/networks: {{ join ", " .Values.ixExternalInterfacesConfigurationNames }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/*
|
||||
Metadata for workload
|
||||
*/}}
|
||||
{{- define "commonMetadataWorkload" }}
|
||||
labels:
|
||||
{{- include "ix-chart.selectorLabels" . | nindent 2 }}
|
||||
annotations:
|
||||
{{- include "workloadAnnotations" . | nindent 2 }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Deployment Spec
|
||||
*/}}
|
||||
{{- define "deploymentSpec" }}
|
||||
strategy:
|
||||
{{- if and (eq .Values.updateStrategy "RollingUpdate") .Values.hostPortsList }}
|
||||
{{- fail "RollingUpdate is not allowed when host ports are specified" }}
|
||||
{{- end }}
|
||||
type: {{ .Values.updateStrategy }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ix-chart.selectorLabels" . | nindent 4 }}
|
||||
template:
|
||||
metadata:
|
||||
{{ include "commonMetadataWorkload" . | nindent 4 }}
|
||||
spec:
|
||||
{{- include "podSepc" . | indent 4 }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/*
|
||||
Job Spec Common
|
||||
*/}}
|
||||
{{- define "jobSpecCommon" }}
|
||||
metadata:
|
||||
{{ include "commonMetadataWorkload" . | nindent 4 }}
|
||||
spec:
|
||||
{{- include "podSepc" . | indent 2 }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/*
|
||||
Job Spec
|
||||
*/}}
|
||||
{{- define "jobSpec" }}
|
||||
template:
|
||||
{{ include "jobSpecCommon" . | nindent 2 }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
CronJob Spec
|
||||
*/}}
|
||||
{{- define "cronJobSpec" }}
|
||||
schedule: {{ include "cronExpression" .Values.cronSchedule | quote }}
|
||||
jobTemplate:
|
||||
spec:
|
||||
{{ include "jobSpec" . | nindent 4 }}
|
||||
{{- end }}
|
|
@ -1,9 +0,0 @@
|
|||
{{- range $index, $iface := .Values.ixExternalInterfacesConfiguration }}
|
||||
---
|
||||
apiVersion: "k8s.cni.cncf.io/v1"
|
||||
kind: NetworkAttachmentDefinition
|
||||
metadata:
|
||||
name: ix-{{ $.Release.Name }}-{{ $index }}
|
||||
spec:
|
||||
config: '{{ $iface }}'
|
||||
{{- end }}
|
|
@ -1,20 +0,0 @@
|
|||
{{- if .Values.portForwardingList }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ix-chart.fullname" . }}
|
||||
labels:
|
||||
{{- include "ix-chart.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
{{- range $index, $config := .Values.portForwardingList }}
|
||||
- port: {{ $config.containerPort }}
|
||||
targetPort: {{ $config.containerPort }}
|
||||
protocol: {{ $config.protocol }}
|
||||
nodePort: {{ $config.nodePort }}
|
||||
name: ix-{{ $.Release.Name }}-{{ $config.nodePort }}-{{ $index }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "ix-chart.selectorLabels" . | nindent 4 }}
|
||||
{{- end }}
|
|
@ -1,17 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-deployment-test"
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Release.Name }}-deployment-test
|
||||
image: "busybox"
|
||||
command:
|
||||
- nc
|
||||
args:
|
||||
- "-vz"
|
||||
- "{{ include "ix-chart.fullname" . }}"
|
||||
- "80"
|
||||
restartPolicy: Never
|
|
@ -1,14 +0,0 @@
|
|||
apiVersion: {{ template "apiVersion" . }}
|
||||
kind: {{ .Values.workloadType }}
|
||||
metadata:
|
||||
name: {{ include "ix-chart.fullname" . }}
|
||||
labels:
|
||||
{{- include "ix-chart.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if eq (include "workloadIsDeployment" .) "true" }}
|
||||
{{ include "deploymentSpec" . | nindent 2 }}
|
||||
{{- else if eq (include "workloadIsCronJob" .) "true" }}
|
||||
{{ include "cronJobSpec" . | nindent 2 }}
|
||||
{{- else }}
|
||||
{{ include "jobSpec" . | nindent 2 }}
|
||||
{{- end }}
|
|
@ -1,39 +0,0 @@
|
|||
# Default values for ix-chart.
|
||||
|
||||
image:
|
||||
repository: nginx
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: latest
|
||||
|
||||
# Restart / Update policy
|
||||
restartPolicy: Always
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
# Container CMD / entrypoint
|
||||
containerCommand: []
|
||||
containerArgs: []
|
||||
containerEnvironmentVariables: []
|
||||
|
||||
# Network related configuration
|
||||
externalInterfaces: []
|
||||
portForwardingList: [{"containerPort": 80, "nodePort": 32000}]
|
||||
hostPortsList: []
|
||||
hostNetwork: false
|
||||
dnsPolicy: Default
|
||||
dnsConfig:
|
||||
nameservers: []
|
||||
searches: []
|
||||
|
||||
# Storage related configuration
|
||||
hostPathVolumes: []
|
||||
volumes: []
|
||||
|
||||
# Probes
|
||||
# Liveness Probe
|
||||
livenessProbe: null
|
||||
|
||||
# Workload type
|
||||
workloadType: "Deployment"
|
||||
|
||||
gpuConfiguration: {}
|
|
@ -1,38 +0,0 @@
|
|||
# Default values for ix-chart.
|
||||
|
||||
image:
|
||||
repository: debian
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: "latest"
|
||||
|
||||
# Restart / Update policy
|
||||
restartPolicy: Always
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
# Container CMD / entrypoint
|
||||
containerCommand: []
|
||||
containerArgs: []
|
||||
containerEnvironmentVariables: []
|
||||
|
||||
# Network related configuration
|
||||
externalInterfaces: []
|
||||
portForwardingList: []
|
||||
hostNetwork: false
|
||||
dnsPolicy: Default
|
||||
dnsConfig:
|
||||
nameservers: []
|
||||
searches: []
|
||||
|
||||
# Storage related configuration
|
||||
hostPathVolumes: []
|
||||
volumes: []
|
||||
|
||||
# Probes
|
||||
# Liveness Probe
|
||||
livenessProbe: null
|
||||
|
||||
# Workload type
|
||||
workloadType: "Deployment"
|
||||
|
||||
gpuConfiguration: {}
|
|
@ -1,2 +0,0 @@
|
|||
categories:
|
||||
- generic
|
|
@ -1,23 +0,0 @@
|
|||
# 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
|
|
@ -1,15 +0,0 @@
|
|||
apiVersion: v1
|
||||
description: High Performance, Kubernetes Native Object Storage
|
||||
name: minio
|
||||
version: 1.0.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
|
|
@ -1,48 +0,0 @@
|
|||
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.
|
|
@ -1 +0,0 @@
|
|||
[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.
|
|
@ -1,160 +0,0 @@
|
|||
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"
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
required: true
|
||||
min_length: 5
|
||||
max_length: 20
|
||||
|
||||
- variable: secretKey
|
||||
label: "Secret Key"
|
||||
group: "Minio Configuration"
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
required: true
|
||||
min_length: 8
|
||||
max_length: 40
|
||||
|
||||
- variable: environment
|
||||
label: "Minio image environment"
|
||||
group: "Minio Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
additional_attrs: true
|
||||
attrs: []
|
||||
|
||||
- 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: minioHostPathEnabled
|
||||
label: "Configure Host Path for Minio data"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
show_subquestions_if: true
|
||||
subquestions:
|
||||
- variable: minioHostPath
|
||||
label: "Specify HostPath for Minio data"
|
||||
schema:
|
||||
type: hostpath
|
||||
|
||||
- variable: minioDataVolume
|
||||
label: "Configure iXVolume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
show_if: [["minioHostPathEnabled", "=", false]]
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
description: "Path where the volume will be mounted inside the pod"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/export"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-minio"
|
||||
editable: false
|
|
@ -1,2 +0,0 @@
|
|||
Minio can be accessed from the following URL:
|
||||
http://$node_ip:{{ .Values.service.nodePort }}/
|
|
@ -1,84 +0,0 @@
|
|||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "minio.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "minio.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "minio.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for deployment.
|
||||
*/}}
|
||||
{{- define "minio.deployment.apiVersion" -}}
|
||||
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.Version -}}
|
||||
{{- print "apps/v1beta2" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for statefulset.
|
||||
*/}}
|
||||
{{- define "minio.statefulset.apiVersion" -}}
|
||||
{{- if semverCompare "<1.17-0" .Capabilities.KubeVersion.Version -}}
|
||||
{{- print "apps/v1beta2" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Determine secret name.
|
||||
*/}}
|
||||
{{- define "minio.secretName" -}}
|
||||
{{- include "minio.fullname" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Determine service account name for deployment or statefulset.
|
||||
*/}}
|
||||
{{- define "minio.serviceAccountName" -}}
|
||||
{{- (include "minio.fullname" .) | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Determine name for scc role and rolebinding
|
||||
*/}}
|
||||
{{- define "minio.sccRoleName" -}}
|
||||
{{- printf "%s-%s" "scc" (include "minio.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Properly format optional additional arguments to Minio binary
|
||||
*/}}
|
||||
{{- define "minio.extraArgs" -}}
|
||||
{{- range .Values.extraArgs -}}
|
||||
{{ " " }}{{ . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,23 +0,0 @@
|
|||
{{/*
|
||||
Retrieve host path from ix volumes based on dataset name
|
||||
*/}}
|
||||
{{- define "retrieveHostPathFromiXVolume" -}}
|
||||
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
|
||||
{{- $dsName := base $hostPathConfiguration.hostPath -}}
|
||||
{{- if eq $.datasetName $dsName -}}
|
||||
{{- $hostPathConfiguration.hostPath -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve host path for minio
|
||||
*/}}
|
||||
{{- define "configuredMinioHostPath" -}}
|
||||
{{- if .Values.minioHostPathEnabled -}}
|
||||
{{- .Values.minioHostPath -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.minioDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,67 +0,0 @@
|
|||
{{ $scheme := "http" }}
|
||||
apiVersion: {{ template "minio.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "minio.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
chart: {{ template "minio.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
strategy:
|
||||
type: {{ .Values.updateStrategy }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "minio.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "minio.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
annotations:
|
||||
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||
spec:
|
||||
serviceAccountName: {{ include "minio.serviceAccountName" . | quote }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- "-ce"
|
||||
- "/usr/bin/docker-entrypoint.sh minio server /export {{- template "minio.extraArgs" . }}"
|
||||
volumeMounts:
|
||||
- name: export
|
||||
mountPath: /export
|
||||
ports:
|
||||
- name: {{ $scheme }}
|
||||
containerPort: 9000
|
||||
env:
|
||||
- name: MINIO_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "minio.secretName" . }}
|
||||
key: accesskey
|
||||
- name: MINIO_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "minio.secretName" . }}
|
||||
key: secretkey
|
||||
{{- range $key, $val := .Values.environment }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
{{- end}}
|
||||
volumes:
|
||||
- name: export
|
||||
{{- if .Values.emptyDirVolumes }}
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
hostPath:
|
||||
path: {{ template "configuredMinioHostPath" . }}
|
||||
{{- end }}
|
||||
- name: minio-user
|
||||
secret:
|
||||
secretName: {{ template "minio.secretName" . }}
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "minio.secretName" . }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
chart: {{ template "minio.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
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 }}
|
|
@ -1,21 +0,0 @@
|
|||
{{ $scheme := "http" }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "minio.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
chart: {{ template "minio.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
type: "NodePort"
|
||||
ports:
|
||||
- name: {{ $scheme }}
|
||||
port: {{ .Values.service.nodePort }}
|
||||
protocol: TCP
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
targetPort: 9000
|
||||
selector:
|
||||
app: {{ template "minio.name" . }}
|
||||
release: {{ .Release.Name }}
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "minio.serviceAccountName" . | quote }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}
|
||||
chart: {{ template "minio.chart" . }}
|
||||
release: "{{ .Release.Name }}"
|
|
@ -1,19 +0,0 @@
|
|||
## 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: 32000
|
||||
|
||||
environment:
|
||||
## Please refer for comprehensive list https://docs.minio.io/docs/minio-server-configuration-guide.html
|
||||
|
||||
emptyDirVolumes: true
|
|
@ -1,17 +0,0 @@
|
|||
## 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
|
|
@ -1,4 +0,0 @@
|
|||
categories:
|
||||
- storage
|
||||
- S3
|
||||
icon_url: https://min.io/resources/img/logo/MINIO_wordmark.png
|
|
@ -1,21 +0,0 @@
|
|||
# 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
|
|
@ -1,17 +0,0 @@
|
|||
apiVersion: v2
|
||||
name: nextcloud
|
||||
version: 1.1.0
|
||||
appVersion: 19.0.3
|
||||
description: A file sharing server that puts the control and security of your own data back into your hands.
|
||||
keywords:
|
||||
- nextcloud
|
||||
- storage
|
||||
- http
|
||||
- web
|
||||
- php
|
||||
home: https://nextcloud.com/
|
||||
icon: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg
|
||||
sources:
|
||||
- https://github.com/nextcloud/docker
|
||||
- https://github.com/nextcloud/helm
|
||||
upstream_version: 2.3.2
|
|
@ -1,11 +0,0 @@
|
|||
# nextcloud
|
||||
|
||||
[nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands.
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps an [nextcloud](https://hub.docker.com/_/nextcloud/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
## Configuration
|
||||
|
||||
Please refer to questions.yaml for a detailed overview on supported configurable values.
|
|
@ -1,3 +0,0 @@
|
|||
# nextcloud
|
||||
|
||||
[nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands.
|
|
@ -1,198 +0,0 @@
|
|||
groups:
|
||||
- name: "Container Images"
|
||||
description: "Image to be used for container"
|
||||
- name: "Nextcloud Configuration"
|
||||
description: "Configuration details for Nextcloud workload"
|
||||
- name: "Storage"
|
||||
description: "Configure Storage for Nextcloud"
|
||||
- name: "Container Configuration"
|
||||
description: "Configure nextcloud container parameters"
|
||||
- name: "Postgresql Configuration"
|
||||
description: "Configure Postgresql for nextcloud"
|
||||
|
||||
portals:
|
||||
web_portal:
|
||||
protocols:
|
||||
- "http"
|
||||
host:
|
||||
- "$variable-nextcloud.host"
|
||||
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: "nextcloud"
|
||||
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"
|
||||
|
||||
- variable: nextcloud
|
||||
description: "Nextcloud configuration details"
|
||||
label: "Nextcloud Configuration"
|
||||
group: "Nextcloud Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
required: true
|
||||
additional_attrs: true
|
||||
attrs:
|
||||
- variable: host
|
||||
description: "Nextcloud host to create application URLs"
|
||||
label: "Nextcloud host"
|
||||
schema:
|
||||
type: string
|
||||
$ref:
|
||||
- "definitions/nodeIP"
|
||||
- variable: username
|
||||
label: "Username"
|
||||
schema:
|
||||
type: string
|
||||
default: "admin"
|
||||
required: true
|
||||
- variable: password
|
||||
label: "Password"
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
default: "changeme"
|
||||
required: true
|
||||
- variable: datadir
|
||||
label: "Nextcloud data directory"
|
||||
schema:
|
||||
type: path
|
||||
default: "/var/www/html/data"
|
||||
required: true
|
||||
- variable: strategy
|
||||
label: "Nextcloud update strategy"
|
||||
schema:
|
||||
type: string
|
||||
default: "Recreate"
|
||||
enum:
|
||||
- value: "RollingUpdate"
|
||||
description: "Create new pods and then kill old ones"
|
||||
- value: "Recreate"
|
||||
description: "Kill existing pods before creating new ones"
|
||||
|
||||
- variable: service
|
||||
description: "Nextcloud Service Configuration"
|
||||
label: "Nextcloud Service Configuration"
|
||||
group: "Nextcloud Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
required: true
|
||||
attrs:
|
||||
- variable: nodePort
|
||||
label: "Node Port to use for Nextcloud"
|
||||
schema:
|
||||
type: int
|
||||
min: 9000
|
||||
max: 65535
|
||||
default: 9001
|
||||
required: true
|
||||
|
||||
- variable: nextcloudDataHostPathEnabled
|
||||
label: "Configure Host Path for Nextcloud data"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
show_subquestions_if: true
|
||||
subquestions:
|
||||
- variable: nextcloudHostPath
|
||||
label: "Specify HostPath for Nextcloud data"
|
||||
schema:
|
||||
type: hostpath
|
||||
|
||||
- variable: nextcloudDataVolume
|
||||
label: "Configure iXVolume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
show_if: [["nextcloudDataHostPathEnabled", "=", false]]
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
description: "Path where the volume will be mounted inside the pod"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/var/www"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-nextcloud_data"
|
||||
editable: false
|
||||
|
||||
- variable: postgresBackupVolume
|
||||
label: "Postgres Backup Volume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/postgres_backups"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-postgres_backups"
|
||||
editable: false
|
||||
|
||||
- variable: postgresDataVolume
|
||||
label: "Postgresql Data Volume"
|
||||
group: "Storage"
|
||||
schema:
|
||||
type: dict
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
attrs:
|
||||
- variable: mountPath
|
||||
label: "Mount Path"
|
||||
schema:
|
||||
type: path
|
||||
editable: false
|
||||
default: "/var/lib/postgresql/data"
|
||||
- variable: datasetName
|
||||
label: "Dataset Name"
|
||||
schema:
|
||||
type: string
|
||||
default: "ix-postgres_data"
|
||||
editable: false
|
|
@ -1,3 +0,0 @@
|
|||
1. Get the nextcloud URL by running:
|
||||
|
||||
echo http://{{ .Values.nextcloud.host }}:{{ .Values.service.nodePort }}/
|
|
@ -1,114 +0,0 @@
|
|||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "nextcloud.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "nextcloud.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "nextcloud.mariadb.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified redis app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "nextcloud.redis.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "nextcloud.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve host path from ix volumes based on dataset name
|
||||
*/}}
|
||||
{{- define "retrieveHostPathFromiXVolume" -}}
|
||||
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
|
||||
{{- $dsName := base $hostPathConfiguration.hostPath -}}
|
||||
{{- if eq $.datasetName $dsName -}}
|
||||
{{- $hostPathConfiguration.hostPath -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve host path defined in volume
|
||||
*/}}
|
||||
{{- define "configuredHostPath" -}}
|
||||
{{- if .Values.emptyDirVolumes -}}
|
||||
{{- printf "" -}}
|
||||
{{- else if .Values.nextcloudDataHostPathEnabled -}}
|
||||
{{- required "Please specify a host path for nextcloud" .Values.nextcloudHostPath -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.nextcloudDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve backup postgresql host path defined in volume
|
||||
*/}}
|
||||
{{- define "configuredBackupPostgresHostPath" -}}
|
||||
{{- if .Values.emptyDirVolumes -}}
|
||||
{{- printf "" -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.postgresBackupVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve postgresql data host path defined in volume
|
||||
*/}}
|
||||
{{- define "configuredPostgresHostPath" -}}
|
||||
{{- if .Values.emptyDirVolumes -}}
|
||||
{{- printf "" -}}
|
||||
{{- else -}}
|
||||
{{- $volDict := dict "datasetName" $.Values.postgresDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "nextcloud.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Nextcloud service account
|
||||
*/}}
|
||||
{{- define "nextcloud.serviceAccountName" -}}
|
||||
{{- printf "%s-service-account" .Release.Name -}}
|
||||
{{- end -}}
|
|
@ -1,28 +0,0 @@
|
|||
{{/*
|
||||
Get Nextloud Postgres Database Name
|
||||
*/}}
|
||||
{{- define "postgres.DatabaseName" -}}
|
||||
{{- print "nextcloud" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Postgres Selector labels
|
||||
*/}}
|
||||
{{- define "nextcloud.postgres.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}-postgres
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}-postgres
|
||||
{{- end }}
|
||||
|
||||
{{- define "postgres.imageName" -}}
|
||||
{{- print "postgres:13.1" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve postgres backup name
|
||||
This will return a unique name based on revision and chart numbers specified.
|
||||
*/}}
|
||||
{{- define "postgres.backupName" -}}
|
||||
{{- $upgradeDict := .Values.ixChartContext.upgradeMetadata -}}
|
||||
{{- printf "postgres-backup-from-%s-to-%s-revision-%d" $upgradeDict.oldChartVersion $upgradeDict.newChartVersion (int64 $upgradeDict.preUpgradeRevision) -}}
|
||||
{{- end }}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{{/*
|
||||
Retrieve previous chart version from which we are upgrading to a newer chart version
|
||||
*/}}
|
||||
{{- define "tn.chart.old_version" -}}
|
||||
{{- if .Values.ixChartContext.is_upgrade -}}
|
||||
{{- .Values.ixChartContext.upgradeMetadata.oldChartVersion -}}
|
||||
{{- else -}}
|
||||
{{- fail "A chart upgrade is not taking place" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve new chart version to which we are upgrading from an old chart version
|
||||
*/}}
|
||||
{{- define "tn.chart.new_version" -}}
|
||||
{{- if .Values.ixChartContext.is_upgrade -}}
|
||||
{{- .Values.ixChartContext.upgradeMetadata.newChartVersion -}}
|
||||
{{- else -}}
|
||||
{{- fail "A chart upgrade is not taking place" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,15 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "postgres-backup-hook-config-map"
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
data:
|
||||
entrypoint.sh: |-
|
||||
#!/bin/sh
|
||||
cmd="/docker-entrypoint.sh postgres"
|
||||
eval "${cmd}" & disown;
|
||||
until pg_isready; do
|
||||
sleep 5;
|
||||
done;
|
||||
pg_dump -U $POSTGRES_USER -d {{ template "postgres.DatabaseName" . }} > /postgres_backups/$BACKUP_NAME;
|
|
@ -1,57 +0,0 @@
|
|||
{{- if .Values.ixChartContext.isUpgrade -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: "pre-upgrade-hook2"
|
||||
annotations:
|
||||
"helm.sh/hook": pre-upgrade
|
||||
"helm.sh/hook-weight": "1"
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: "pre-upgrade-hook2"
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
serviceAccountName: "{{ template "nextcloud.serviceAccountName" . }}"
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-postgres-backup
|
||||
image: {{ template "postgres.imageName" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-user
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-password
|
||||
- name: BACKUP_NAME
|
||||
value: {{ template "postgres.backupName" . }}
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
- name: postgres-backup
|
||||
mountPath: /postgres_backups
|
||||
- name: backup-script-configmap
|
||||
mountPath: /bin/backup_entrypoint.sh
|
||||
readOnly: true
|
||||
subPath: entrypoint.sh
|
||||
command:
|
||||
- "/bin/backup_entrypoint.sh"
|
||||
volumes:
|
||||
- name: postgres-data
|
||||
hostPath:
|
||||
path: {{ template "configuredPostgresHostPath" . }}
|
||||
- name: postgres-backup
|
||||
hostPath:
|
||||
path: {{ template "configuredBackupPostgresHostPath" . }}
|
||||
- name: backup-script-configmap
|
||||
configMap:
|
||||
defaultMode: 0700
|
||||
name: "postgres-backup-hook-config-map"
|
||||
{{- end -}}
|
|
@ -1,113 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "nextcloud.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
helm.sh/chart: {{ include "nextcloud.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: app
|
||||
{{- if .Values.deploymentAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.deploymentAnnotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: {{ .Values.nextcloud.strategy }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: app
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
{{- if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: init-postgresdb
|
||||
image: {{ template "postgres.imageName" . }}
|
||||
command: ['sh', '-c', "until pg_isready -h {{ template "nextcloud.fullname" . }}-postgres; do echo waiting for postgres; sleep 2; done"]
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: POSTGRES_HOST
|
||||
value: {{ template "nextcloud.fullname" . }}-postgres:5432
|
||||
- name: POSTGRES_DB
|
||||
value: {{ template "postgres.DatabaseName" . }}
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-user
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-password
|
||||
- name: NEXTCLOUD_ADMIN_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "nextcloud.fullname" . }}
|
||||
key: nextcloud-username
|
||||
- name: NEXTCLOUD_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "nextcloud.fullname" . }}
|
||||
key: nextcloud-password
|
||||
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
||||
value: {{ .Values.nextcloud.host }}
|
||||
- name: NEXTCLOUD_DATA_DIR
|
||||
value: {{ .Values.nextcloud.datadir | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/
|
||||
subPath: "root"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/html
|
||||
subPath: "html"
|
||||
- name: nextcloud-data
|
||||
mountPath: {{ .Values.nextcloud.datadir }}
|
||||
subPath: "data"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/html/config
|
||||
subPath: "config"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/html/custom_apps
|
||||
subPath: "custom_apps"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/tmp
|
||||
subPath: "tmp"
|
||||
- name: nextcloud-data
|
||||
mountPath: /var/www/html/themes
|
||||
subPath: "themes"
|
||||
volumes:
|
||||
- name: nextcloud-data
|
||||
{{- if ne (include "configuredHostPath" .) "" }}
|
||||
hostPath:
|
||||
path: {{ template "configuredHostPath" . }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
# Will mount configuration files as www-data (id: 33) for nextcloud
|
||||
securityContext:
|
||||
fsGroup: 33
|
|
@ -1,22 +0,0 @@
|
|||
{{- if .Values.ixChartContext.isUpgrade -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: "pre-upgrade-hook1"
|
||||
annotations:
|
||||
"helm.sh/hook": pre-upgrade
|
||||
"helm.sh/hook-weight": "-1"
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: "pre-upgrade-hook1"
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
serviceAccountName: "{{ template "nextcloud.serviceAccountName" . }}"
|
||||
containers:
|
||||
- name: kubectl
|
||||
image: "bitnami/kubectl:1.19"
|
||||
command: ["kubectl", "delete" , "deployment", "{{ template "nextcloud.fullname" . }}", "{{ template "nextcloud.fullname" . }}-postgres"]
|
||||
{{- end -}}
|
|
@ -1,64 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "nextcloud.fullname" . }}-postgres
|
||||
labels:
|
||||
helm.sh/chart: {{ include "nextcloud.chart" . }}
|
||||
{{- include "nextcloud.postgres.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: database
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: {{ .Values.nextcloud.strategy }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "nextcloud.postgres.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: database
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "nextcloud.postgres.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: database
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-postgres
|
||||
image: {{ template "postgres.imageName" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-user
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-details
|
||||
key: db-password
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
- name: postgres-backup
|
||||
mountPath: /postgres_backups
|
||||
ports:
|
||||
- name: postgres-tcp
|
||||
containerPort: 5432
|
||||
protocol: TCP
|
||||
volumes:
|
||||
- name: postgres-data
|
||||
{{- if ne (include "configuredPostgresHostPath" .) "" }}
|
||||
hostPath:
|
||||
path: {{ template "configuredPostgresHostPath" . }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: postgres-backup
|
||||
{{- if ne (include "configuredBackupPostgresHostPath" .) "" }}
|
||||
hostPath:
|
||||
path: {{ template "configuredBackupPostgresHostPath" . }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue