mirror of https://github.com/helm/helm
fix: fixed bug in Dependency.List() (#7852)
* fix: fixed bug in Dependency.List() A bug in Dependency.List() caused all compressed charts to flag their dependencies as "missing". Closes #4431 Signed-off-by: Matt Butcher <matt.butcher@microsoft.com> * removed some files from test fixtures Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>pull/7898/head
parent
7ab76a2b9c
commit
bd13b80b12
@ -1,5 +1,5 @@
|
|||||||
NAME VERSION REPOSITORY STATUS
|
NAME VERSION REPOSITORY STATUS
|
||||||
reqsubchart 0.1.0 https://example.com/charts missing
|
reqsubchart 0.1.0 https://example.com/charts unpacked
|
||||||
reqsubchart2 0.2.0 https://example.com/charts missing
|
reqsubchart2 0.2.0 https://example.com/charts unpacked
|
||||||
reqsubchart3 >=0.1.0 https://example.com/charts missing
|
reqsubchart3 >=0.1.0 https://example.com/charts unpacked
|
||||||
|
|
||||||
|
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package action
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"helm.sh/helm/v3/internal/test"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestList(t *testing.T) {
|
||||||
|
for _, tcase := range []struct {
|
||||||
|
chart string
|
||||||
|
golden string
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
chart: "testdata/charts/chart-with-compressed-dependencies",
|
||||||
|
golden: "output/compressed-deps.txt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
chart: "testdata/charts/chart-with-compressed-dependencies-2.1.8.tgz",
|
||||||
|
golden: "output/compressed-deps-tgz.txt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
chart: "testdata/charts/chart-with-uncompressed-dependencies",
|
||||||
|
golden: "output/uncompressed-deps.txt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
chart: "testdata/charts/chart-with-uncompressed-dependencies-2.1.8.tgz",
|
||||||
|
golden: "output/uncompressed-deps-tgz.txt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
chart: "testdata/charts/chart-missing-deps",
|
||||||
|
golden: "output/missing-deps.txt",
|
||||||
|
},
|
||||||
|
} {
|
||||||
|
buf := bytes.Buffer{}
|
||||||
|
if err := NewDependency().List(tcase.chart, &buf); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
test.AssertGoldenBytes(t, buf.Bytes(), tcase.golden)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
.git
|
||||||
|
# OWNERS file for Kubernetes
|
||||||
|
OWNERS
|
||||||
|
# example production yaml
|
||||||
|
values-production.yaml
|
@ -0,0 +1,20 @@
|
|||||||
|
appVersion: 4.9.8
|
||||||
|
description: Web publishing platform for building blogs and websites.
|
||||||
|
engine: gotpl
|
||||||
|
home: http://www.wordpress.com/
|
||||||
|
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
|
||||||
|
keywords:
|
||||||
|
- wordpress
|
||||||
|
- cms
|
||||||
|
- blog
|
||||||
|
- http
|
||||||
|
- web
|
||||||
|
- application
|
||||||
|
- php
|
||||||
|
maintainers:
|
||||||
|
- email: containers@bitnami.com
|
||||||
|
name: bitnami-bot
|
||||||
|
name: chart-with-missing-deps
|
||||||
|
sources:
|
||||||
|
- https://github.com/bitnami/bitnami-docker-wordpress
|
||||||
|
version: 2.1.8
|
@ -0,0 +1,232 @@
|
|||||||
|
# WordPress
|
||||||
|
|
||||||
|
[WordPress](https://wordpress.org/) is one of the most versatile open source content management systems on the market. A publishing platform for building blogs and websites.
|
||||||
|
|
||||||
|
## TL;DR;
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm install stable/wordpress
|
||||||
|
```
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
This chart bootstraps a [WordPress](https://github.com/bitnami/bitnami-docker-wordpress) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||||
|
|
||||||
|
It also packages the [Bitnami MariaDB chart](https://github.com/kubernetes/charts/tree/master/stable/mariadb) which is required for bootstrapping a MariaDB deployment for the database requirements of the WordPress application.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Kubernetes 1.4+ with Beta APIs enabled
|
||||||
|
- PV provisioner support in the underlying infrastructure
|
||||||
|
|
||||||
|
## Installing the Chart
|
||||||
|
|
||||||
|
To install the chart with the release name `my-release`:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm install --name my-release stable/wordpress
|
||||||
|
```
|
||||||
|
|
||||||
|
The command deploys WordPress on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
|
||||||
|
|
||||||
|
> **Tip**: List all releases using `helm list`
|
||||||
|
|
||||||
|
## Uninstalling the Chart
|
||||||
|
|
||||||
|
To uninstall/delete the `my-release` deployment:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm delete my-release
|
||||||
|
```
|
||||||
|
|
||||||
|
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The following table lists the configurable parameters of the WordPress chart and their default values.
|
||||||
|
|
||||||
|
| Parameter | Description | Default |
|
||||||
|
|----------------------------------|--------------------------------------------|---------------------------------------------------------|
|
||||||
|
| `image.registry` | WordPress image registry | `docker.io` |
|
||||||
|
| `image.repository` | WordPress image name | `bitnami/wordpress` |
|
||||||
|
| `image.tag` | WordPress image tag | `{VERSION}` |
|
||||||
|
| `image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
|
||||||
|
| `image.pullSecrets` | Specify image pull secrets | `nil` |
|
||||||
|
| `wordpressUsername` | User of the application | `user` |
|
||||||
|
| `wordpressPassword` | Application password | _random 10 character long alphanumeric string_ |
|
||||||
|
| `wordpressEmail` | Admin email | `user@example.com` |
|
||||||
|
| `wordpressFirstName` | First name | `FirstName` |
|
||||||
|
| `wordpressLastName` | Last name | `LastName` |
|
||||||
|
| `wordpressBlogName` | Blog name | `User's Blog!` |
|
||||||
|
| `wordpressTablePrefix` | Table prefix | `wp_` |
|
||||||
|
| `allowEmptyPassword` | Allow DB blank passwords | `yes` |
|
||||||
|
| `smtpHost` | SMTP host | `nil` |
|
||||||
|
| `smtpPort` | SMTP port | `nil` |
|
||||||
|
| `smtpUser` | SMTP user | `nil` |
|
||||||
|
| `smtpPassword` | SMTP password | `nil` |
|
||||||
|
| `smtpUsername` | User name for SMTP emails | `nil` |
|
||||||
|
| `smtpProtocol` | SMTP protocol [`tls`, `ssl`] | `nil` |
|
||||||
|
| `replicaCount` | Number of WordPress Pods to run | `1` |
|
||||||
|
| `mariadb.enabled` | Deploy MariaDB container(s) | `true` |
|
||||||
|
| `mariadb.rootUser.password` | MariaDB admin password | `nil` |
|
||||||
|
| `mariadb.db.name` | Database name to create | `bitnami_wordpress` |
|
||||||
|
| `mariadb.db.user` | Database user to create | `bn_wordpress` |
|
||||||
|
| `mariadb.db.password` | Password for the database | _random 10 character long alphanumeric string_ |
|
||||||
|
| `externalDatabase.host` | Host of the external database | `localhost` |
|
||||||
|
| `externalDatabase.user` | Existing username in the external db | `bn_wordpress` |
|
||||||
|
| `externalDatabase.password` | Password for the above username | `nil` |
|
||||||
|
| `externalDatabase.database` | Name of the existing database | `bitnami_wordpress` |
|
||||||
|
| `externalDatabase.port` | Database port number | `3306` |
|
||||||
|
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
|
||||||
|
| `serviceExternalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
|
||||||
|
| `nodePorts.http` | Kubernetes http node port | `""` |
|
||||||
|
| `nodePorts.https` | Kubernetes https node port | `""` |
|
||||||
|
| `healthcheckHttps` | Use https for liveliness and readiness | `false` |
|
||||||
|
| `ingress.enabled` | Enable ingress controller resource | `false` |
|
||||||
|
| `ingress.hosts[0].name` | Hostname to your WordPress installation | `wordpress.local` |
|
||||||
|
| `ingress.hosts[0].path` | Path within the url structure | `/` |
|
||||||
|
| `ingress.hosts[0].tls` | Utilize TLS backend in ingress | `false` |
|
||||||
|
| `ingress.hosts[0].tlsSecret` | TLS Secret (certificates) | `wordpress.local-tls-secret` |
|
||||||
|
| `ingress.hosts[0].annotations` | Annotations for this host's ingress record | `[]` |
|
||||||
|
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
|
||||||
|
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
|
||||||
|
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
|
||||||
|
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||||
|
| `persistence.existingClaim` | Enable persistence using an existing PVC | `nil` |
|
||||||
|
| `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) |
|
||||||
|
| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` |
|
||||||
|
| `persistence.size` | PVC Storage Request | `10Gi` |
|
||||||
|
| `nodeSelector` | Node labels for pod assignment | `{}` |
|
||||||
|
| `tolerations` | List of node taints to tolerate | `[]` |
|
||||||
|
| `affinity` | Map of node/pod affinities | `{}` |
|
||||||
|
|
||||||
|
The above parameters map to the env variables defined in [bitnami/wordpress](http://github.com/bitnami/bitnami-docker-wordpress). For more information please refer to the [bitnami/wordpress](http://github.com/bitnami/bitnami-docker-wordpress) image documentation.
|
||||||
|
|
||||||
|
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm install --name my-release \
|
||||||
|
--set wordpressUsername=admin,wordpressPassword=password,mariadb.mariadbRootPassword=secretpassword \
|
||||||
|
stable/wordpress
|
||||||
|
```
|
||||||
|
|
||||||
|
The above command sets the WordPress administrator account username and password to `admin` and `password` respectively. Additionally, it sets the MariaDB `root` user password to `secretpassword`.
|
||||||
|
|
||||||
|
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm install --name my-release -f values.yaml stable/wordpress
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||||
|
|
||||||
|
## Production and horizontal scaling
|
||||||
|
|
||||||
|
The following repo contains the recommended production settings for wordpress capture in an alternative [values file](values-production.yaml). Please read carefully the comments in the values-production.yaml file to set up your environment appropriately.
|
||||||
|
|
||||||
|
To horizontally scale this chart, first download the [values-production.yaml](values-production.yaml) file to your local folder, then:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm install --name my-release -f ./values-production.yaml stable/wordpress
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that [values-production.yaml](values-production.yaml) includes a replicaCount of 3, so there will be 3 WordPress pods. As a result, to use the /admin portal and to ensure you can scale wordpress you need to provide a ReadWriteMany PVC, if you don't have a provisioner for this type of storage, we recommend that you install the nfs provisioner and map it to a RWO volume.
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm install stable/nfs-server-provisioner --set persistence.enabled=true,persistence.size=10Gi
|
||||||
|
$ helm install --name my-release -f values-production.yaml --set persistence.storageClass=nfs stable/wordpress
|
||||||
|
```
|
||||||
|
|
||||||
|
## Persistence
|
||||||
|
|
||||||
|
The [Bitnami WordPress](https://github.com/bitnami/bitnami-docker-wordpress) image stores the WordPress data and configurations at the `/bitnami` path of the container.
|
||||||
|
|
||||||
|
Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
|
||||||
|
See the [Configuration](#configuration) section to configure the PVC or to disable persistence.
|
||||||
|
|
||||||
|
## Using an external database
|
||||||
|
|
||||||
|
Sometimes you may want to have Wordpress connect to an external database rather than installing one inside your cluster, e.g. to use a managed database service, or use run a single database server for all your applications. To do this, the chart allows you to specify credentials for an external database under the [`externalDatabase` parameter](#configuration). You should also disable the MariaDB installation with the `mariadb.enabled` option. For example:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ helm install stable/wordpress \
|
||||||
|
--set mariadb.enabled=false,externalDatabase.host=myexternalhost,externalDatabase.user=myuser,externalDatabase.password=mypassword,externalDatabase.database=mydatabase,externalDatabase.port=3306
|
||||||
|
```
|
||||||
|
|
||||||
|
Note also if you disable MariaDB per above you MUST supply values for the `externalDatabase` connection.
|
||||||
|
|
||||||
|
## Ingress
|
||||||
|
|
||||||
|
This chart provides support for ingress resources. If you have an
|
||||||
|
ingress controller installed on your cluster, such as [nginx-ingress](https://kubeapps.com/charts/stable/nginx-ingress)
|
||||||
|
or [traefik](https://kubeapps.com/charts/stable/traefik) you can utilize
|
||||||
|
the ingress controller to serve your WordPress application.
|
||||||
|
|
||||||
|
To enable ingress integration, please set `ingress.enabled` to `true`
|
||||||
|
|
||||||
|
### Hosts
|
||||||
|
|
||||||
|
Most likely you will only want to have one hostname that maps to this
|
||||||
|
WordPress installation, however, it is possible to have more than one
|
||||||
|
host. To facilitate this, the `ingress.hosts` object is an array.
|
||||||
|
|
||||||
|
For each item, please indicate a `name`, `tls`, `tlsSecret`, and any
|
||||||
|
`annotations` that you may want the ingress controller to know about.
|
||||||
|
|
||||||
|
Indicating TLS will cause WordPress to generate HTTPS URLs, and
|
||||||
|
WordPress will be connected to at port 443. The actual secret that
|
||||||
|
`tlsSecret` references do not have to be generated by this chart.
|
||||||
|
However, please note that if TLS is enabled, the ingress record will not
|
||||||
|
work until this secret exists.
|
||||||
|
|
||||||
|
For annotations, please see [this document](https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md).
|
||||||
|
Not all annotations are supported by all ingress controllers, but this
|
||||||
|
document does a good job of indicating which annotation is supported by
|
||||||
|
many popular ingress controllers.
|
||||||
|
|
||||||
|
### TLS Secrets
|
||||||
|
|
||||||
|
This chart will facilitate the creation of TLS secrets for use with the
|
||||||
|
ingress controller, however, this is not required. There are three
|
||||||
|
common use cases:
|
||||||
|
|
||||||
|
* helm generates/manages certificate secrets
|
||||||
|
* user generates/manages certificates separately
|
||||||
|
* an additional tool (like [kube-lego](https://kubeapps.com/charts/stable/kube-lego))
|
||||||
|
manages the secrets for the application
|
||||||
|
|
||||||
|
In the first two cases, one will need a certificate and a key. We would
|
||||||
|
expect them to look like this:
|
||||||
|
|
||||||
|
* certificate files should look like (and there can be more than one
|
||||||
|
certificate if there is a certificate chain)
|
||||||
|
|
||||||
|
```
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIID6TCCAtGgAwIBAgIJAIaCwivkeB5EMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV
|
||||||
|
...
|
||||||
|
jScrvkiBO65F46KioCL9h5tDvomdU1aqpI/CBzhvZn1c0ZTf87tGQR8NK7v7
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
```
|
||||||
|
* keys should look like:
|
||||||
|
```
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEogIBAAKCAQEAvLYcyu8f3skuRyUgeeNpeDvYBCDcgq+LsWap6zbX5f8oLqp4
|
||||||
|
...
|
||||||
|
wrj2wDbCDCFmfqnSJ+dKI3vFLlEz44sAV8jX/kd4Y6ZTQhlLbYc=
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
|
````
|
||||||
|
|
||||||
|
If you are going to use Helm to manage the certificates, please copy
|
||||||
|
these values into the `certificate` and `key` values for a given
|
||||||
|
`ingress.secrets` entry.
|
||||||
|
|
||||||
|
If you are going are going to manage TLS secrets outside of Helm, please
|
||||||
|
know that you can create a TLS secret by doing the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl create secret tls wordpress.local-tls --key /path/to/key.key --cert /path/to/cert.crt
|
||||||
|
```
|
||||||
|
|
||||||
|
Please see [this example](https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tls)
|
||||||
|
for more information.
|
@ -0,0 +1,6 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: mariadb
|
||||||
|
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||||
|
version: 4.3.1
|
||||||
|
digest: sha256:82a0e5374376169d2ecf7d452c18a2ed93507f5d17c3393a1457f9ffad7e9b26
|
||||||
|
generated: 2018-08-02T22:07:51.905271776Z
|
@ -0,0 +1,7 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: mariadb
|
||||||
|
version: 4.x.x
|
||||||
|
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||||
|
condition: mariadb.enabled
|
||||||
|
tags:
|
||||||
|
- wordpress-database
|
@ -0,0 +1,38 @@
|
|||||||
|
1. Get the WordPress URL:
|
||||||
|
|
||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
|
|
||||||
|
You should be able to access your new WordPress installation through
|
||||||
|
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
{{ if .tls }}https{{ else }}http{{ end }}://{{ .name }}/admin
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- else if contains "LoadBalancer" .Values.serviceType }}
|
||||||
|
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }}'
|
||||||
|
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||||
|
echo "WordPress URL: http://$SERVICE_IP/"
|
||||||
|
echo "WordPress Admin URL: http://$SERVICE_IP/admin"
|
||||||
|
|
||||||
|
{{- else if contains "ClusterIP" .Values.serviceType }}
|
||||||
|
|
||||||
|
echo "WordPress URL: http://127.0.0.1:8080/"
|
||||||
|
echo "WordPress Admin URL: http://127.0.0.1:8080/admin"
|
||||||
|
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "fullname" . }} 8080:80
|
||||||
|
|
||||||
|
{{- else if contains "NodePort" .Values.serviceType }}
|
||||||
|
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo "WordPress URL: http://$NODE_IP:$NODE_PORT/"
|
||||||
|
echo "WordPress Admin URL: http://$NODE_IP:$NODE_PORT/admin"
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
2. Login with the following credentials to see your blog
|
||||||
|
|
||||||
|
echo Username: {{ .Values.wordpressUsername }}
|
||||||
|
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.wordpress-password}" | base64 --decode)
|
@ -0,0 +1,24 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "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).
|
||||||
|
*/}}
|
||||||
|
{{- define "fullname" -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | 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).
|
||||||
|
*/}}
|
||||||
|
{{- define "mariadb.fullname" -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
@ -0,0 +1,254 @@
|
|||||||
|
## Bitnami WordPress image version
|
||||||
|
## ref: https://hub.docker.com/r/bitnami/wordpress/tags/
|
||||||
|
##
|
||||||
|
image:
|
||||||
|
registry: docker.io
|
||||||
|
repository: bitnami/wordpress
|
||||||
|
tag: 4.9.8-debian-9
|
||||||
|
## Specify a imagePullPolicy
|
||||||
|
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||||
|
##
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
## Optionally specify an array of imagePullSecrets.
|
||||||
|
## Secrets must be manually created in the namespace.
|
||||||
|
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||||
|
##
|
||||||
|
# pullSecrets:
|
||||||
|
# - myRegistrKeySecretName
|
||||||
|
|
||||||
|
## User of the application
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressUsername: user
|
||||||
|
|
||||||
|
## Application password
|
||||||
|
## Defaults to a random 10-character alphanumeric string if not set
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
# wordpressPassword:
|
||||||
|
|
||||||
|
## Admin email
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressEmail: user@example.com
|
||||||
|
|
||||||
|
## First name
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressFirstName: FirstName
|
||||||
|
|
||||||
|
## Last name
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressLastName: LastName
|
||||||
|
|
||||||
|
## Blog name
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressBlogName: User's Blog!
|
||||||
|
|
||||||
|
## Table prefix
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressTablePrefix: wp_
|
||||||
|
|
||||||
|
## Set to `yes` to allow the container to be started with blank passwords
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
allowEmptyPassword: yes
|
||||||
|
|
||||||
|
## SMTP mail delivery configuration
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress/#smtp-configuration
|
||||||
|
##
|
||||||
|
# smtpHost:
|
||||||
|
# smtpPort:
|
||||||
|
# smtpUser:
|
||||||
|
# smtpPassword:
|
||||||
|
# smtpUsername:
|
||||||
|
# smtpProtocol:
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
externalDatabase:
|
||||||
|
## All of these values are only used when mariadb.enabled is set to false
|
||||||
|
## Database host
|
||||||
|
host: localhost
|
||||||
|
|
||||||
|
## non-root Username for Wordpress Database
|
||||||
|
user: bn_wordpress
|
||||||
|
|
||||||
|
## Database password
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
## Database name
|
||||||
|
database: bitnami_wordpress
|
||||||
|
|
||||||
|
## Database port number
|
||||||
|
port: 3306
|
||||||
|
|
||||||
|
##
|
||||||
|
## MariaDB chart configuration
|
||||||
|
##
|
||||||
|
mariadb:
|
||||||
|
## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters
|
||||||
|
enabled: true
|
||||||
|
## Disable MariaDB replication
|
||||||
|
replication:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
## Create a database and a database user
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
|
||||||
|
##
|
||||||
|
db:
|
||||||
|
name: bitnami_wordpress
|
||||||
|
user: bn_wordpress
|
||||||
|
## If the password is not specified, mariadb will generates a random password
|
||||||
|
##
|
||||||
|
# password:
|
||||||
|
|
||||||
|
## MariaDB admin password
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
|
||||||
|
##
|
||||||
|
# rootUser:
|
||||||
|
# password:
|
||||||
|
|
||||||
|
## Enable persistence using Persistent Volume Claims
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||||
|
##
|
||||||
|
master:
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
## mariadb data Persistent Volume Storage Class
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 8Gi
|
||||||
|
|
||||||
|
## Kubernetes configuration
|
||||||
|
## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP
|
||||||
|
##
|
||||||
|
serviceType: LoadBalancer
|
||||||
|
##
|
||||||
|
## serviceType: NodePort
|
||||||
|
## nodePorts:
|
||||||
|
## http: <to set explicitly, choose port between 30000-32767>
|
||||||
|
## https: <to set explicitly, choose port between 30000-32767>
|
||||||
|
nodePorts:
|
||||||
|
http: ""
|
||||||
|
https: ""
|
||||||
|
## Enable client source IP preservation
|
||||||
|
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
|
||||||
|
##
|
||||||
|
serviceExternalTrafficPolicy: Cluster
|
||||||
|
|
||||||
|
## Allow health checks to be pointed at the https port
|
||||||
|
healthcheckHttps: false
|
||||||
|
|
||||||
|
## Configure extra options for liveness and readiness probes
|
||||||
|
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 6
|
||||||
|
successThreshold: 1
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 6
|
||||||
|
successThreshold: 1
|
||||||
|
|
||||||
|
## Configure the ingress resource that allows you to access the
|
||||||
|
## Wordpress installation. Set up the URL
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||||
|
##
|
||||||
|
ingress:
|
||||||
|
## Set to true to enable ingress record generation
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
## The list of hostnames to be covered with this ingress record.
|
||||||
|
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||||
|
hosts:
|
||||||
|
- name: wordpress.local
|
||||||
|
|
||||||
|
## Set this to true in order to enable TLS on the ingress record
|
||||||
|
## A side effect of this will be that the backend wordpress service will be connected at port 443
|
||||||
|
tls: false
|
||||||
|
|
||||||
|
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||||
|
tlsSecret: wordpress.local-tls
|
||||||
|
|
||||||
|
## Ingress annotations done as key:value pairs
|
||||||
|
## If you're using kube-lego, you will want to add:
|
||||||
|
## kubernetes.io/tls-acme: true
|
||||||
|
##
|
||||||
|
## For a full list of possible ingress annotations, please see
|
||||||
|
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md
|
||||||
|
##
|
||||||
|
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||||
|
annotations:
|
||||||
|
# kubernetes.io/ingress.class: nginx
|
||||||
|
# kubernetes.io/tls-acme: true
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||||
|
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||||
|
## -----BEGIN RSA PRIVATE KEY-----
|
||||||
|
##
|
||||||
|
## name should line up with a tlsSecret set further up
|
||||||
|
## If you're using kube-lego, this is unneeded, as it will create the secret for you if it is not set
|
||||||
|
##
|
||||||
|
## It is also possible to create and manage the certificates outside of this helm chart
|
||||||
|
## Please see README.md for more information
|
||||||
|
# - name: wordpress.local-tls
|
||||||
|
# key:
|
||||||
|
# certificate:
|
||||||
|
|
||||||
|
## Enable persistence using Persistent Volume Claims
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||||
|
##
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
## wordpress data Persistent Volume Storage Class
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
##
|
||||||
|
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||||
|
## the existingClaim variable
|
||||||
|
# existingClaim: your-claim
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
|
||||||
|
## Configure resource requests and limits
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
|
##
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
|
cpu: 300m
|
||||||
|
|
||||||
|
## Node labels for pod assignment
|
||||||
|
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||||
|
##
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
## Tolerations for pod assignment
|
||||||
|
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||||
|
##
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
## Affinity for pod assignment
|
||||||
|
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||||
|
##
|
||||||
|
affinity: {}
|
Binary file not shown.
@ -0,0 +1,5 @@
|
|||||||
|
.git
|
||||||
|
# OWNERS file for Kubernetes
|
||||||
|
OWNERS
|
||||||
|
# example production yaml
|
||||||
|
values-production.yaml
|
@ -0,0 +1,20 @@
|
|||||||
|
appVersion: 4.9.8
|
||||||
|
description: Web publishing platform for building blogs and websites.
|
||||||
|
engine: gotpl
|
||||||
|
home: http://www.wordpress.com/
|
||||||
|
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
|
||||||
|
keywords:
|
||||||
|
- wordpress
|
||||||
|
- cms
|
||||||
|
- blog
|
||||||
|
- http
|
||||||
|
- web
|
||||||
|
- application
|
||||||
|
- php
|
||||||
|
maintainers:
|
||||||
|
- email: containers@bitnami.com
|
||||||
|
name: bitnami-bot
|
||||||
|
name: chart-with-compressed-dependencies
|
||||||
|
sources:
|
||||||
|
- https://github.com/bitnami/bitnami-docker-wordpress
|
||||||
|
version: 2.1.8
|
@ -0,0 +1,3 @@
|
|||||||
|
# WordPress
|
||||||
|
|
||||||
|
This is a testing fork of the Wordpress chart. It is not operational.
|
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: mariadb
|
||||||
|
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||||
|
version: 4.3.1
|
||||||
|
digest: sha256:82a0e5374376169d2ecf7d452c18a2ed93507f5d17c3393a1457f9ffad7e9b26
|
||||||
|
generated: 2018-08-02T22:07:51.905271776Z
|
@ -0,0 +1,7 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: mariadb
|
||||||
|
version: 4.x.x
|
||||||
|
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||||
|
condition: mariadb.enabled
|
||||||
|
tags:
|
||||||
|
- wordpress-database
|
@ -0,0 +1 @@
|
|||||||
|
Placeholder
|
@ -0,0 +1,254 @@
|
|||||||
|
## Bitnami WordPress image version
|
||||||
|
## ref: https://hub.docker.com/r/bitnami/wordpress/tags/
|
||||||
|
##
|
||||||
|
image:
|
||||||
|
registry: docker.io
|
||||||
|
repository: bitnami/wordpress
|
||||||
|
tag: 4.9.8-debian-9
|
||||||
|
## Specify a imagePullPolicy
|
||||||
|
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||||
|
##
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
## Optionally specify an array of imagePullSecrets.
|
||||||
|
## Secrets must be manually created in the namespace.
|
||||||
|
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||||
|
##
|
||||||
|
# pullSecrets:
|
||||||
|
# - myRegistrKeySecretName
|
||||||
|
|
||||||
|
## User of the application
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressUsername: user
|
||||||
|
|
||||||
|
## Application password
|
||||||
|
## Defaults to a random 10-character alphanumeric string if not set
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
# wordpressPassword:
|
||||||
|
|
||||||
|
## Admin email
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressEmail: user@example.com
|
||||||
|
|
||||||
|
## First name
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressFirstName: FirstName
|
||||||
|
|
||||||
|
## Last name
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressLastName: LastName
|
||||||
|
|
||||||
|
## Blog name
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressBlogName: User's Blog!
|
||||||
|
|
||||||
|
## Table prefix
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressTablePrefix: wp_
|
||||||
|
|
||||||
|
## Set to `yes` to allow the container to be started with blank passwords
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
allowEmptyPassword: yes
|
||||||
|
|
||||||
|
## SMTP mail delivery configuration
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress/#smtp-configuration
|
||||||
|
##
|
||||||
|
# smtpHost:
|
||||||
|
# smtpPort:
|
||||||
|
# smtpUser:
|
||||||
|
# smtpPassword:
|
||||||
|
# smtpUsername:
|
||||||
|
# smtpProtocol:
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
externalDatabase:
|
||||||
|
## All of these values are only used when mariadb.enabled is set to false
|
||||||
|
## Database host
|
||||||
|
host: localhost
|
||||||
|
|
||||||
|
## non-root Username for Wordpress Database
|
||||||
|
user: bn_wordpress
|
||||||
|
|
||||||
|
## Database password
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
## Database name
|
||||||
|
database: bitnami_wordpress
|
||||||
|
|
||||||
|
## Database port number
|
||||||
|
port: 3306
|
||||||
|
|
||||||
|
##
|
||||||
|
## MariaDB chart configuration
|
||||||
|
##
|
||||||
|
mariadb:
|
||||||
|
## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters
|
||||||
|
enabled: true
|
||||||
|
## Disable MariaDB replication
|
||||||
|
replication:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
## Create a database and a database user
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
|
||||||
|
##
|
||||||
|
db:
|
||||||
|
name: bitnami_wordpress
|
||||||
|
user: bn_wordpress
|
||||||
|
## If the password is not specified, mariadb will generates a random password
|
||||||
|
##
|
||||||
|
# password:
|
||||||
|
|
||||||
|
## MariaDB admin password
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
|
||||||
|
##
|
||||||
|
# rootUser:
|
||||||
|
# password:
|
||||||
|
|
||||||
|
## Enable persistence using Persistent Volume Claims
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||||
|
##
|
||||||
|
master:
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
## mariadb data Persistent Volume Storage Class
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 8Gi
|
||||||
|
|
||||||
|
## Kubernetes configuration
|
||||||
|
## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP
|
||||||
|
##
|
||||||
|
serviceType: LoadBalancer
|
||||||
|
##
|
||||||
|
## serviceType: NodePort
|
||||||
|
## nodePorts:
|
||||||
|
## http: <to set explicitly, choose port between 30000-32767>
|
||||||
|
## https: <to set explicitly, choose port between 30000-32767>
|
||||||
|
nodePorts:
|
||||||
|
http: ""
|
||||||
|
https: ""
|
||||||
|
## Enable client source IP preservation
|
||||||
|
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
|
||||||
|
##
|
||||||
|
serviceExternalTrafficPolicy: Cluster
|
||||||
|
|
||||||
|
## Allow health checks to be pointed at the https port
|
||||||
|
healthcheckHttps: false
|
||||||
|
|
||||||
|
## Configure extra options for liveness and readiness probes
|
||||||
|
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 6
|
||||||
|
successThreshold: 1
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 6
|
||||||
|
successThreshold: 1
|
||||||
|
|
||||||
|
## Configure the ingress resource that allows you to access the
|
||||||
|
## Wordpress installation. Set up the URL
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||||
|
##
|
||||||
|
ingress:
|
||||||
|
## Set to true to enable ingress record generation
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
## The list of hostnames to be covered with this ingress record.
|
||||||
|
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||||
|
hosts:
|
||||||
|
- name: wordpress.local
|
||||||
|
|
||||||
|
## Set this to true in order to enable TLS on the ingress record
|
||||||
|
## A side effect of this will be that the backend wordpress service will be connected at port 443
|
||||||
|
tls: false
|
||||||
|
|
||||||
|
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||||
|
tlsSecret: wordpress.local-tls
|
||||||
|
|
||||||
|
## Ingress annotations done as key:value pairs
|
||||||
|
## If you're using kube-lego, you will want to add:
|
||||||
|
## kubernetes.io/tls-acme: true
|
||||||
|
##
|
||||||
|
## For a full list of possible ingress annotations, please see
|
||||||
|
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md
|
||||||
|
##
|
||||||
|
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||||
|
annotations:
|
||||||
|
# kubernetes.io/ingress.class: nginx
|
||||||
|
# kubernetes.io/tls-acme: true
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||||
|
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||||
|
## -----BEGIN RSA PRIVATE KEY-----
|
||||||
|
##
|
||||||
|
## name should line up with a tlsSecret set further up
|
||||||
|
## If you're using kube-lego, this is unneeded, as it will create the secret for you if it is not set
|
||||||
|
##
|
||||||
|
## It is also possible to create and manage the certificates outside of this helm chart
|
||||||
|
## Please see README.md for more information
|
||||||
|
# - name: wordpress.local-tls
|
||||||
|
# key:
|
||||||
|
# certificate:
|
||||||
|
|
||||||
|
## Enable persistence using Persistent Volume Claims
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||||
|
##
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
## wordpress data Persistent Volume Storage Class
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
##
|
||||||
|
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||||
|
## the existingClaim variable
|
||||||
|
# existingClaim: your-claim
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
|
||||||
|
## Configure resource requests and limits
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
|
##
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
|
cpu: 300m
|
||||||
|
|
||||||
|
## Node labels for pod assignment
|
||||||
|
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||||
|
##
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
## Tolerations for pod assignment
|
||||||
|
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||||
|
##
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
## Affinity for pod assignment
|
||||||
|
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||||
|
##
|
||||||
|
affinity: {}
|
Binary file not shown.
@ -0,0 +1,5 @@
|
|||||||
|
.git
|
||||||
|
# OWNERS file for Kubernetes
|
||||||
|
OWNERS
|
||||||
|
# example production yaml
|
||||||
|
values-production.yaml
|
@ -0,0 +1,20 @@
|
|||||||
|
appVersion: 4.9.8
|
||||||
|
description: Web publishing platform for building blogs and websites.
|
||||||
|
engine: gotpl
|
||||||
|
home: http://www.wordpress.com/
|
||||||
|
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
|
||||||
|
keywords:
|
||||||
|
- wordpress
|
||||||
|
- cms
|
||||||
|
- blog
|
||||||
|
- http
|
||||||
|
- web
|
||||||
|
- application
|
||||||
|
- php
|
||||||
|
maintainers:
|
||||||
|
- email: containers@bitnami.com
|
||||||
|
name: bitnami-bot
|
||||||
|
name: chart-with-uncompressed-dependencies
|
||||||
|
sources:
|
||||||
|
- https://github.com/bitnami/bitnami-docker-wordpress
|
||||||
|
version: 2.1.8
|
@ -0,0 +1,3 @@
|
|||||||
|
# WordPress
|
||||||
|
|
||||||
|
This is a testing mock, and is not operational.
|
@ -0,0 +1 @@
|
|||||||
|
.git
|
@ -0,0 +1,21 @@
|
|||||||
|
appVersion: 10.1.34
|
||||||
|
description: Fast, reliable, scalable, and easy to use open-source relational database
|
||||||
|
system. MariaDB Server is intended for mission-critical, heavy-load production systems
|
||||||
|
as well as for embedding into mass-deployed software. Highly available MariaDB cluster.
|
||||||
|
engine: gotpl
|
||||||
|
home: https://mariadb.org
|
||||||
|
icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png
|
||||||
|
keywords:
|
||||||
|
- mariadb
|
||||||
|
- mysql
|
||||||
|
- database
|
||||||
|
- sql
|
||||||
|
- prometheus
|
||||||
|
maintainers:
|
||||||
|
- email: containers@bitnami.com
|
||||||
|
name: bitnami-bot
|
||||||
|
name: mariadb
|
||||||
|
sources:
|
||||||
|
- https://github.com/bitnami/bitnami-docker-mariadb
|
||||||
|
- https://github.com/prometheus/mysqld_exporter
|
||||||
|
version: 4.3.1
|
@ -0,0 +1,3 @@
|
|||||||
|
You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image.
|
||||||
|
|
||||||
|
More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository.
|
@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
Please be patient while the chart is being deployed
|
||||||
|
|
||||||
|
Tip:
|
||||||
|
|
||||||
|
Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }}
|
||||||
|
|
||||||
|
Services:
|
||||||
|
|
||||||
|
echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}
|
||||||
|
{{- if .Values.replication.enabled }}
|
||||||
|
echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
Administrator credentials:
|
||||||
|
|
||||||
|
Username: root
|
||||||
|
Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.fullname" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode)
|
||||||
|
|
||||||
|
To connect to your database
|
||||||
|
|
||||||
|
1. Run a pod that you can use as a client:
|
||||||
|
|
||||||
|
kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash
|
||||||
|
|
||||||
|
2. To connect to master service (read/write):
|
||||||
|
|
||||||
|
mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }}
|
||||||
|
|
||||||
|
{{- if .Values.replication.enabled }}
|
||||||
|
|
||||||
|
3. To connect to slave service (read-only):
|
||||||
|
|
||||||
|
mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }}
|
||||||
|
{{- end }}
|
@ -0,0 +1,53 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "mariadb.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).
|
||||||
|
*/}}
|
||||||
|
{{- define "mariadb.fullname" -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "master.fullname" -}}
|
||||||
|
{{- if .Values.replication.enabled -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name "mariadb-master" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
{{- define "slave.fullname" -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name "mariadb-slave" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mariadb.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the proper image name
|
||||||
|
*/}}
|
||||||
|
{{- define "mariadb.image" -}}
|
||||||
|
{{- $registryName := .Values.image.registry -}}
|
||||||
|
{{- $repositoryName := .Values.image.repository -}}
|
||||||
|
{{- $tag := .Values.image.tag | toString -}}
|
||||||
|
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the proper image name
|
||||||
|
*/}}
|
||||||
|
{{- define "metrics.image" -}}
|
||||||
|
{{- $registryName := .Values.metrics.image.registry -}}
|
||||||
|
{{- $repositoryName := .Values.metrics.image.repository -}}
|
||||||
|
{{- $tag := .Values.metrics.image.tag | toString -}}
|
||||||
|
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||||
|
{{- end -}}
|
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "master.fullname" . }}-init-scripts
|
||||||
|
labels:
|
||||||
|
app: {{ template "mariadb.name" . }}
|
||||||
|
component: "master"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
data:
|
||||||
|
{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*").AsConfig | indent 2 }}
|
@ -0,0 +1,15 @@
|
|||||||
|
{{- if .Values.master.config }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "master.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "mariadb.name" . }}
|
||||||
|
component: "master"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
data:
|
||||||
|
my.cnf: |-
|
||||||
|
{{ .Values.master.config | indent 4 }}
|
||||||
|
{{- end -}}
|
@ -0,0 +1,187 @@
|
|||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ template "master.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
component: "master"
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
spec:
|
||||||
|
serviceName: "{{ template "master.fullname" . }}"
|
||||||
|
replicas: 1
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
component: "master"
|
||||||
|
release: "{{ .Release.Name }}"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
fsGroup: 1001
|
||||||
|
{{- if eq .Values.master.antiAffinity "hard" }}
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- topologyKey: "kubernetes.io/hostname"
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
release: "{{ .Release.Name }}"
|
||||||
|
{{- else if eq .Values.master.antiAffinity "soft" }}
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 1
|
||||||
|
podAffinityTerm:
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
release: "{{ .Release.Name }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.image.pullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- range .Values.image.pullSecrets }}
|
||||||
|
- name: {{ . }}
|
||||||
|
{{- end}}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: "mariadb"
|
||||||
|
image: {{ template "mariadb.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||||
|
env:
|
||||||
|
- name: MARIADB_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-root-password
|
||||||
|
{{- if .Values.db.user }}
|
||||||
|
- name: MARIADB_USER
|
||||||
|
value: "{{ .Values.db.user }}"
|
||||||
|
- name: MARIADB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-password
|
||||||
|
{{- end }}
|
||||||
|
- name: MARIADB_DATABASE
|
||||||
|
value: "{{ .Values.db.name }}"
|
||||||
|
{{- if .Values.replication.enabled }}
|
||||||
|
- name: MARIADB_REPLICATION_MODE
|
||||||
|
value: "master"
|
||||||
|
- name: MARIADB_REPLICATION_USER
|
||||||
|
value: "{{ .Values.replication.user }}"
|
||||||
|
- name: MARIADB_REPLICATION_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-replication-password
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
containerPort: 3306
|
||||||
|
{{- if .Values.master.livenessProbe.enabled }}
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["sh", "-c", "exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD"]
|
||||||
|
initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }}
|
||||||
|
successThreshold: {{ .Values.master.livenessProbe.successThreshold }}
|
||||||
|
failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.master.readinessProbe.enabled }}
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["sh", "-c", "exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD"]
|
||||||
|
initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }}
|
||||||
|
successThreshold: {{ .Values.master.readinessProbe.successThreshold }}
|
||||||
|
failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.master.resources | indent 10 }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/mariadb
|
||||||
|
- name: custom-init-scripts
|
||||||
|
mountPath: /docker-entrypoint-initdb.d
|
||||||
|
{{- if .Values.master.config }}
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/mariadb/conf/my.cnf
|
||||||
|
subPath: my.cnf
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.metrics.enabled }}
|
||||||
|
- name: metrics
|
||||||
|
image: {{ template "metrics.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||||
|
env:
|
||||||
|
- name: MARIADB_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-root-password
|
||||||
|
command: [ 'sh', '-c', 'DATA_SOURCE_NAME="root:$MARIADB_ROOT_PASSWORD@(localhost:3306)/" /bin/mysqld_exporter' ]
|
||||||
|
ports:
|
||||||
|
- name: metrics
|
||||||
|
containerPort: 9104
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /metrics
|
||||||
|
port: metrics
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /metrics
|
||||||
|
port: metrics
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 1
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.metrics.resources | indent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
{{- if .Values.master.config }}
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: {{ template "master.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
|
- name: custom-init-scripts
|
||||||
|
configMap:
|
||||||
|
name: {{ template "master.fullname" . }}-init-scripts
|
||||||
|
{{- if .Values.master.persistence.enabled }}
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: data
|
||||||
|
labels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
component: "master"
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
{{- range .Values.master.persistence.accessModes }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.master.persistence.size | quote }}
|
||||||
|
{{- if .Values.master.persistence.storageClass }}
|
||||||
|
{{- if (eq "-" .Values.master.persistence.storageClass) }}
|
||||||
|
storageClassName: ""
|
||||||
|
{{- else }}
|
||||||
|
storageClassName: {{ .Values.master.persistence.storageClass | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
- name: "data"
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
@ -0,0 +1,29 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
component: "master"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
{{- if .Values.metrics.enabled }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.metrics.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: mysql
|
||||||
|
{{- if .Values.metrics.enabled }}
|
||||||
|
- name: metrics
|
||||||
|
port: 9104
|
||||||
|
targetPort: metrics
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
component: "master"
|
||||||
|
release: "{{ .Release.Name }}"
|
@ -0,0 +1,38 @@
|
|||||||
|
{{- if (not .Values.rootUser.existingSecret) -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
{{- if .Values.rootUser.password }}
|
||||||
|
mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}"
|
||||||
|
{{- else if (not .Values.rootUser.forcePassword) }}
|
||||||
|
mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}"
|
||||||
|
{{ else }}
|
||||||
|
mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.db.user }}
|
||||||
|
{{- if .Values.db.password }}
|
||||||
|
mariadb-password: "{{ .Values.db.password | b64enc }}"
|
||||||
|
{{- else if (not .Values.db.forcePassword) }}
|
||||||
|
mariadb-password: "{{ randAlphaNum 10 | b64enc }}"
|
||||||
|
{{- else }}
|
||||||
|
mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.replication.enabled }}
|
||||||
|
{{- if .Values.replication.password }}
|
||||||
|
mariadb-replication-password: "{{ .Values.replication.password | b64enc }}"
|
||||||
|
{{- else if (not .Values.replication.forcePassword) }}
|
||||||
|
mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}"
|
||||||
|
{{- else }}
|
||||||
|
mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
@ -0,0 +1,15 @@
|
|||||||
|
{{- if and .Values.replication.enabled .Values.slave.config }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "slave.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "mariadb.name" . }}
|
||||||
|
component: "slave"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
data:
|
||||||
|
my.cnf: |-
|
||||||
|
{{ .Values.slave.config | indent 4 }}
|
||||||
|
{{- end }}
|
@ -0,0 +1,193 @@
|
|||||||
|
{{- if .Values.replication.enabled }}
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ template "slave.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
component: "slave"
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
spec:
|
||||||
|
serviceName: "{{ template "slave.fullname" . }}"
|
||||||
|
replicas: {{ .Values.slave.replicas }}
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
component: "slave"
|
||||||
|
release: "{{ .Release.Name }}"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
fsGroup: 1001
|
||||||
|
{{- if eq .Values.slave.antiAffinity "hard" }}
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- topologyKey: "kubernetes.io/hostname"
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
release: "{{ .Release.Name }}"
|
||||||
|
{{- else if eq .Values.slave.antiAffinity "soft" }}
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 1
|
||||||
|
podAffinityTerm:
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
release: "{{ .Release.Name }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.image.pullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- range .Values.image.pullSecrets }}
|
||||||
|
- name: {{ . }}
|
||||||
|
{{- end}}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: "mariadb"
|
||||||
|
image: {{ template "mariadb.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||||
|
env:
|
||||||
|
- name: MARIADB_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-root-password
|
||||||
|
{{- if .Values.db.user }}
|
||||||
|
- name: MARIADB_USER
|
||||||
|
value: "{{ .Values.db.user }}"
|
||||||
|
- name: MARIADB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-password
|
||||||
|
{{- end }}
|
||||||
|
- name: MARIADB_DATABASE
|
||||||
|
value: "{{ .Values.db.name }}"
|
||||||
|
- name: MARIADB_REPLICATION_MODE
|
||||||
|
value: "slave"
|
||||||
|
- name: MARIADB_MASTER_HOST
|
||||||
|
value: {{ template "mariadb.fullname" . }}
|
||||||
|
- name: MARIADB_MASTER_PORT
|
||||||
|
value: "3306"
|
||||||
|
- name: MARIADB_MASTER_USER
|
||||||
|
value: "root"
|
||||||
|
- name: MARIADB_MASTER_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-root-password
|
||||||
|
- name: MARIADB_REPLICATION_USER
|
||||||
|
value: "{{ .Values.replication.user }}"
|
||||||
|
- name: MARIADB_REPLICATION_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-replication-password
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
containerPort: 3306
|
||||||
|
{{- if .Values.slave.livenessProbe.enabled }}
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["sh", "-c", "exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD"]
|
||||||
|
initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }}
|
||||||
|
successThreshold: {{ .Values.slave.livenessProbe.successThreshold }}
|
||||||
|
failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.slave.readinessProbe.enabled }}
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["sh", "-c", "exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD"]
|
||||||
|
initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }}
|
||||||
|
successThreshold: {{ .Values.slave.readinessProbe.successThreshold }}
|
||||||
|
failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.slave.resources | indent 10 }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/mariadb
|
||||||
|
{{- if .Values.slave.config }}
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/mariadb/conf/my.cnf
|
||||||
|
subPath: my.cnf
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.metrics.enabled }}
|
||||||
|
- name: metrics
|
||||||
|
image: {{ template "metrics.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||||
|
env:
|
||||||
|
- name: MARIADB_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-root-password
|
||||||
|
command: [ 'sh', '-c', 'DATA_SOURCE_NAME="root:$MARIADB_ROOT_PASSWORD@(localhost:3306)/" /bin/mysqld_exporter' ]
|
||||||
|
ports:
|
||||||
|
- name: metrics
|
||||||
|
containerPort: 9104
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /metrics
|
||||||
|
port: metrics
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /metrics
|
||||||
|
port: metrics
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 1
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.metrics.resources | indent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
{{- if .Values.slave.config }}
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: {{ template "slave.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.slave.persistence.enabled }}
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: data
|
||||||
|
labels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
component: "slave"
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
{{- range .Values.slave.persistence.accessModes }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.slave.persistence.size | quote }}
|
||||||
|
{{- if .Values.slave.persistence.storageClass }}
|
||||||
|
{{- if (eq "-" .Values.slave.persistence.storageClass) }}
|
||||||
|
storageClassName: ""
|
||||||
|
{{- else }}
|
||||||
|
storageClassName: {{ .Values.slave.persistence.storageClass | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
- name: "data"
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
@ -0,0 +1,31 @@
|
|||||||
|
{{- if .Values.replication.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ template "slave.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
chart: {{ template "mariadb.chart" . }}
|
||||||
|
component: "slave"
|
||||||
|
release: {{ .Release.Name | quote }}
|
||||||
|
heritage: {{ .Release.Service | quote }}
|
||||||
|
{{- if .Values.metrics.enabled }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.metrics.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: mysql
|
||||||
|
{{- if .Values.metrics.enabled }}
|
||||||
|
- name: metrics
|
||||||
|
port: 9104
|
||||||
|
targetPort: metrics
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
app: "{{ template "mariadb.name" . }}"
|
||||||
|
component: "slave"
|
||||||
|
release: "{{ .Release.Name }}"
|
||||||
|
{{- end }}
|
@ -0,0 +1,44 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}"
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test-success
|
||||||
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: "test-framework"
|
||||||
|
image: "dduportal/bats:0.4.0"
|
||||||
|
command:
|
||||||
|
- "bash"
|
||||||
|
- "-c"
|
||||||
|
- |
|
||||||
|
set -ex
|
||||||
|
# copy bats to tools dir
|
||||||
|
cp -R /usr/local/libexec/ /tools/bats/
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /tools
|
||||||
|
name: tools
|
||||||
|
containers:
|
||||||
|
- name: mariadb-test
|
||||||
|
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||||
|
command: ["/tools/bats/bats", "-t", "/tests/run.sh"]
|
||||||
|
env:
|
||||||
|
- name: MARIADB_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ template "mariadb.fullname" . }}
|
||||||
|
key: mariadb-root-password
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /tests
|
||||||
|
name: tests
|
||||||
|
readOnly: true
|
||||||
|
- mountPath: /tools
|
||||||
|
name: tools
|
||||||
|
volumes:
|
||||||
|
- name: tests
|
||||||
|
configMap:
|
||||||
|
name: {{ template "mariadb.fullname" . }}-tests
|
||||||
|
- name: tools
|
||||||
|
emptyDir: {}
|
||||||
|
restartPolicy: Never
|
@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "mariadb.fullname" . }}-tests
|
||||||
|
data:
|
||||||
|
run.sh: |-
|
||||||
|
@test "Testing MariaDB is accessible" {
|
||||||
|
mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;'
|
||||||
|
}
|
@ -0,0 +1,233 @@
|
|||||||
|
## Bitnami MariaDB image
|
||||||
|
## ref: https://hub.docker.com/r/bitnami/mariadb/tags/
|
||||||
|
##
|
||||||
|
image:
|
||||||
|
registry: docker.io
|
||||||
|
repository: bitnami/mariadb
|
||||||
|
tag: 10.1.34-debian-9
|
||||||
|
## Specify a imagePullPolicy
|
||||||
|
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||||
|
##
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
## Optionally specify an array of imagePullSecrets.
|
||||||
|
## Secrets must be manually created in the namespace.
|
||||||
|
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||||
|
##
|
||||||
|
# pullSecrets:
|
||||||
|
# - myRegistrKeySecretName
|
||||||
|
|
||||||
|
service:
|
||||||
|
## Kubernetes service type
|
||||||
|
type: ClusterIP
|
||||||
|
port: 3306
|
||||||
|
|
||||||
|
rootUser:
|
||||||
|
## MariaDB admin password
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run
|
||||||
|
##
|
||||||
|
password:
|
||||||
|
## Use existing secret (ignores root, db and replication passwords)
|
||||||
|
# existingSecret:
|
||||||
|
##
|
||||||
|
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
|
||||||
|
## If it is not force, a random password will be generated.
|
||||||
|
forcePassword: false
|
||||||
|
|
||||||
|
db:
|
||||||
|
## MariaDB username and password
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run
|
||||||
|
##
|
||||||
|
user:
|
||||||
|
password:
|
||||||
|
## Password is ignored if existingSecret is specified.
|
||||||
|
## Database to create
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run
|
||||||
|
##
|
||||||
|
name: my_database
|
||||||
|
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
|
||||||
|
## If it is not force, a random password will be generated.
|
||||||
|
forcePassword: false
|
||||||
|
|
||||||
|
replication:
|
||||||
|
## Enable replication. This enables the creation of replicas of MariaDB. If false, only a
|
||||||
|
## master deployment would be created
|
||||||
|
enabled: true
|
||||||
|
##
|
||||||
|
## MariaDB replication user
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster
|
||||||
|
##
|
||||||
|
user: replicator
|
||||||
|
## MariaDB replication user password
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster
|
||||||
|
##
|
||||||
|
password:
|
||||||
|
## Password is ignored if existingSecret is specified.
|
||||||
|
##
|
||||||
|
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
|
||||||
|
## If it is not force, a random password will be generated.
|
||||||
|
forcePassword: false
|
||||||
|
|
||||||
|
master:
|
||||||
|
antiAffinity: soft
|
||||||
|
## Enable persistence using Persistent Volume Claims
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||||
|
##
|
||||||
|
persistence:
|
||||||
|
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||||
|
##
|
||||||
|
enabled: true
|
||||||
|
## Persistent Volume Storage Class
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
## Persistent Volume Claim annotations
|
||||||
|
##
|
||||||
|
annotations:
|
||||||
|
## Persistent Volume Access Mode
|
||||||
|
##
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
## Persistent Volume size
|
||||||
|
##
|
||||||
|
size: 8Gi
|
||||||
|
##
|
||||||
|
|
||||||
|
## Configure MySQL with a custom my.cnf file
|
||||||
|
## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
|
||||||
|
##
|
||||||
|
config: |-
|
||||||
|
[mysqld]
|
||||||
|
skip-name-resolve
|
||||||
|
explicit_defaults_for_timestamp
|
||||||
|
basedir=/opt/bitnami/mariadb
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mariadb/tmp/mysql.sock
|
||||||
|
tmpdir=/opt/bitnami/mariadb/tmp
|
||||||
|
max_allowed_packet=16M
|
||||||
|
bind-address=0.0.0.0
|
||||||
|
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
|
||||||
|
log-error=/opt/bitnami/mariadb/logs/mysqld.log
|
||||||
|
character-set-server=UTF8
|
||||||
|
collation-server=utf8_general_ci
|
||||||
|
|
||||||
|
[client]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mariadb/tmp/mysql.sock
|
||||||
|
default-character-set=UTF8
|
||||||
|
|
||||||
|
[manager]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mariadb/tmp/mysql.sock
|
||||||
|
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
|
||||||
|
|
||||||
|
## Configure master resource requests and limits
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
|
##
|
||||||
|
resources: {}
|
||||||
|
livenessProbe:
|
||||||
|
enabled: true
|
||||||
|
##
|
||||||
|
## Initializing the database could take some time
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
##
|
||||||
|
## Default Kubernetes values
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 1
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 3
|
||||||
|
readinessProbe:
|
||||||
|
enabled: true
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
##
|
||||||
|
## Default Kubernetes values
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 1
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 3
|
||||||
|
|
||||||
|
slave:
|
||||||
|
replicas: 1
|
||||||
|
antiAffinity: soft
|
||||||
|
persistence:
|
||||||
|
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||||
|
##
|
||||||
|
enabled: true
|
||||||
|
# storageClass: "-"
|
||||||
|
annotations:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
## Persistent Volume size
|
||||||
|
##
|
||||||
|
size: 8Gi
|
||||||
|
##
|
||||||
|
|
||||||
|
## Configure MySQL slave with a custom my.cnf file
|
||||||
|
## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
|
||||||
|
##
|
||||||
|
config: |-
|
||||||
|
[mysqld]
|
||||||
|
skip-name-resolve
|
||||||
|
explicit_defaults_for_timestamp
|
||||||
|
basedir=/opt/bitnami/mariadb
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mariadb/tmp/mysql.sock
|
||||||
|
tmpdir=/opt/bitnami/mariadb/tmp
|
||||||
|
max_allowed_packet=16M
|
||||||
|
bind-address=0.0.0.0
|
||||||
|
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
|
||||||
|
log-error=/opt/bitnami/mariadb/logs/mysqld.log
|
||||||
|
character-set-server=UTF8
|
||||||
|
collation-server=utf8_general_ci
|
||||||
|
|
||||||
|
[client]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mariadb/tmp/mysql.sock
|
||||||
|
default-character-set=UTF8
|
||||||
|
|
||||||
|
[manager]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mariadb/tmp/mysql.sock
|
||||||
|
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
|
||||||
|
|
||||||
|
##
|
||||||
|
## Configure slave resource requests and limits
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
|
##
|
||||||
|
resources: {}
|
||||||
|
livenessProbe:
|
||||||
|
enabled: true
|
||||||
|
##
|
||||||
|
## Initializing the database could take some time
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
##
|
||||||
|
## Default Kubernetes values
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 1
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 3
|
||||||
|
readinessProbe:
|
||||||
|
enabled: true
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
##
|
||||||
|
## Default Kubernetes values
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 1
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 3
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
registry: docker.io
|
||||||
|
repository: prom/mysqld-exporter
|
||||||
|
tag: v0.10.0
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
resources: {}
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "9104"
|
@ -0,0 +1,6 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: mariadb
|
||||||
|
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||||
|
version: 4.3.1
|
||||||
|
digest: sha256:82a0e5374376169d2ecf7d452c18a2ed93507f5d17c3393a1457f9ffad7e9b26
|
||||||
|
generated: 2018-08-02T22:07:51.905271776Z
|
@ -0,0 +1,7 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: mariadb
|
||||||
|
version: 4.x.x
|
||||||
|
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||||
|
condition: mariadb.enabled
|
||||||
|
tags:
|
||||||
|
- wordpress-database
|
@ -0,0 +1 @@
|
|||||||
|
Placeholder.
|
@ -0,0 +1,254 @@
|
|||||||
|
## Bitnami WordPress image version
|
||||||
|
## ref: https://hub.docker.com/r/bitnami/wordpress/tags/
|
||||||
|
##
|
||||||
|
image:
|
||||||
|
registry: docker.io
|
||||||
|
repository: bitnami/wordpress
|
||||||
|
tag: 4.9.8-debian-9
|
||||||
|
## Specify a imagePullPolicy
|
||||||
|
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||||
|
##
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
## Optionally specify an array of imagePullSecrets.
|
||||||
|
## Secrets must be manually created in the namespace.
|
||||||
|
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||||
|
##
|
||||||
|
# pullSecrets:
|
||||||
|
# - myRegistrKeySecretName
|
||||||
|
|
||||||
|
## User of the application
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressUsername: user
|
||||||
|
|
||||||
|
## Application password
|
||||||
|
## Defaults to a random 10-character alphanumeric string if not set
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
# wordpressPassword:
|
||||||
|
|
||||||
|
## Admin email
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressEmail: user@example.com
|
||||||
|
|
||||||
|
## First name
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressFirstName: FirstName
|
||||||
|
|
||||||
|
## Last name
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressLastName: LastName
|
||||||
|
|
||||||
|
## Blog name
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressBlogName: User's Blog!
|
||||||
|
|
||||||
|
## Table prefix
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
##
|
||||||
|
wordpressTablePrefix: wp_
|
||||||
|
|
||||||
|
## Set to `yes` to allow the container to be started with blank passwords
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||||
|
allowEmptyPassword: yes
|
||||||
|
|
||||||
|
## SMTP mail delivery configuration
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-wordpress/#smtp-configuration
|
||||||
|
##
|
||||||
|
# smtpHost:
|
||||||
|
# smtpPort:
|
||||||
|
# smtpUser:
|
||||||
|
# smtpPassword:
|
||||||
|
# smtpUsername:
|
||||||
|
# smtpProtocol:
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
externalDatabase:
|
||||||
|
## All of these values are only used when mariadb.enabled is set to false
|
||||||
|
## Database host
|
||||||
|
host: localhost
|
||||||
|
|
||||||
|
## non-root Username for Wordpress Database
|
||||||
|
user: bn_wordpress
|
||||||
|
|
||||||
|
## Database password
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
## Database name
|
||||||
|
database: bitnami_wordpress
|
||||||
|
|
||||||
|
## Database port number
|
||||||
|
port: 3306
|
||||||
|
|
||||||
|
##
|
||||||
|
## MariaDB chart configuration
|
||||||
|
##
|
||||||
|
mariadb:
|
||||||
|
## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters
|
||||||
|
enabled: true
|
||||||
|
## Disable MariaDB replication
|
||||||
|
replication:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
## Create a database and a database user
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
|
||||||
|
##
|
||||||
|
db:
|
||||||
|
name: bitnami_wordpress
|
||||||
|
user: bn_wordpress
|
||||||
|
## If the password is not specified, mariadb will generates a random password
|
||||||
|
##
|
||||||
|
# password:
|
||||||
|
|
||||||
|
## MariaDB admin password
|
||||||
|
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
|
||||||
|
##
|
||||||
|
# rootUser:
|
||||||
|
# password:
|
||||||
|
|
||||||
|
## Enable persistence using Persistent Volume Claims
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||||
|
##
|
||||||
|
master:
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
## mariadb data Persistent Volume Storage Class
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 8Gi
|
||||||
|
|
||||||
|
## Kubernetes configuration
|
||||||
|
## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP
|
||||||
|
##
|
||||||
|
serviceType: LoadBalancer
|
||||||
|
##
|
||||||
|
## serviceType: NodePort
|
||||||
|
## nodePorts:
|
||||||
|
## http: <to set explicitly, choose port between 30000-32767>
|
||||||
|
## https: <to set explicitly, choose port between 30000-32767>
|
||||||
|
nodePorts:
|
||||||
|
http: ""
|
||||||
|
https: ""
|
||||||
|
## Enable client source IP preservation
|
||||||
|
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
|
||||||
|
##
|
||||||
|
serviceExternalTrafficPolicy: Cluster
|
||||||
|
|
||||||
|
## Allow health checks to be pointed at the https port
|
||||||
|
healthcheckHttps: false
|
||||||
|
|
||||||
|
## Configure extra options for liveness and readiness probes
|
||||||
|
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 6
|
||||||
|
successThreshold: 1
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 6
|
||||||
|
successThreshold: 1
|
||||||
|
|
||||||
|
## Configure the ingress resource that allows you to access the
|
||||||
|
## Wordpress installation. Set up the URL
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||||
|
##
|
||||||
|
ingress:
|
||||||
|
## Set to true to enable ingress record generation
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
## The list of hostnames to be covered with this ingress record.
|
||||||
|
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||||
|
hosts:
|
||||||
|
- name: wordpress.local
|
||||||
|
|
||||||
|
## Set this to true in order to enable TLS on the ingress record
|
||||||
|
## A side effect of this will be that the backend wordpress service will be connected at port 443
|
||||||
|
tls: false
|
||||||
|
|
||||||
|
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||||
|
tlsSecret: wordpress.local-tls
|
||||||
|
|
||||||
|
## Ingress annotations done as key:value pairs
|
||||||
|
## If you're using kube-lego, you will want to add:
|
||||||
|
## kubernetes.io/tls-acme: true
|
||||||
|
##
|
||||||
|
## For a full list of possible ingress annotations, please see
|
||||||
|
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md
|
||||||
|
##
|
||||||
|
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||||
|
annotations:
|
||||||
|
# kubernetes.io/ingress.class: nginx
|
||||||
|
# kubernetes.io/tls-acme: true
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||||
|
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||||
|
## -----BEGIN RSA PRIVATE KEY-----
|
||||||
|
##
|
||||||
|
## name should line up with a tlsSecret set further up
|
||||||
|
## If you're using kube-lego, this is unneeded, as it will create the secret for you if it is not set
|
||||||
|
##
|
||||||
|
## It is also possible to create and manage the certificates outside of this helm chart
|
||||||
|
## Please see README.md for more information
|
||||||
|
# - name: wordpress.local-tls
|
||||||
|
# key:
|
||||||
|
# certificate:
|
||||||
|
|
||||||
|
## Enable persistence using Persistent Volume Claims
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||||
|
##
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
## wordpress data Persistent Volume Storage Class
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
##
|
||||||
|
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||||
|
## the existingClaim variable
|
||||||
|
# existingClaim: your-claim
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
|
||||||
|
## Configure resource requests and limits
|
||||||
|
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
|
##
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
|
cpu: 300m
|
||||||
|
|
||||||
|
## Node labels for pod assignment
|
||||||
|
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||||
|
##
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
## Tolerations for pod assignment
|
||||||
|
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||||
|
##
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
## Affinity for pod assignment
|
||||||
|
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||||
|
##
|
||||||
|
affinity: {}
|
@ -0,0 +1,3 @@
|
|||||||
|
NAME VERSION REPOSITORY STATUS
|
||||||
|
mariadb 4.x.x https://kubernetes-charts.storage.googleapis.com/ unpacked
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
NAME VERSION REPOSITORY STATUS
|
||||||
|
mariadb 4.x.x https://kubernetes-charts.storage.googleapis.com/ ok
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
NAME VERSION REPOSITORY STATUS
|
||||||
|
mariadb 4.x.x https://kubernetes-charts.storage.googleapis.com/ missing
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
NAME VERSION REPOSITORY STATUS
|
||||||
|
mariadb 4.x.x https://kubernetes-charts.storage.googleapis.com/ unpacked
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
NAME VERSION REPOSITORY STATUS
|
||||||
|
mariadb 4.x.x https://kubernetes-charts.storage.googleapis.com/ unpacked
|
||||||
|
|
Loading…
Reference in new issue