bitnami/solr (#4951)

* added solr

* added solr helm chart

* Update bitnami/solr/Chart.yaml

Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com>

* Update bitnami/solr/templates/_helpers.tpl

Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com>

* Update bitnami/solr/values.yaml

Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com>

* Update bitnami/solr/templates/statefulset.yaml

Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com>

* Update bitnami/solr/templates/statefulset.yaml

Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com>

* Update bitnami/solr/templates/svc.yaml

Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com>

* Update bitnami/solr/templates/svc-headless.yaml

Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com>

* updated review comments in NOTES, service-account, values

* removed solr toggle

* updated svc as per template, added validation

* removed trailing spaces

* updated service type to ClusterIP

* added metrics exporters and Probes

* Update bitnami/solr/templates/statefulset.yaml

Co-authored-by: Miguel Ángel Cabrera Miñagorri <devgorri@gmail.com>

* Update bitnami/solr/templates/statefulset.yaml

Co-authored-by: Miguel Ángel Cabrera Miñagorri <devgorri@gmail.com>

* removing values-production.yaml

* updated as per latest review comments

* removed trailing spaces

* Standardise exporter deployment

* Standardise exporter service

* Standardise Solr statefulset

* Fix templating issues

* Add README.md

* Format README.md and add 4wlcommands for Zookeeper

* Fix connectivity issues

* Fix Solr exporter

* Improve NOTES.txt

* Add authentication parameters

* Fix typo in NOTES.txt

* Add improvements and user Zookeeper service

* Change template by include and remove spaces

* Add requested changes

* Delete externalTrafficPolicy

* Add posibility to templatize externalZookeeper

* Disable exporter by default since it does not support auth

* Move ZK_HOSTS to the correct place

* Fix bug with upgrade

* Address suggestions

* Fix username type in NOTES.txt

* Add missing values to README

* Add TLS secrets file

* Add nodePorts to services

* Add missing values and Ingress tls

* Fix typo

* [bitnami/solr] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/solr] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com>
Co-authored-by: Miguel Ángel Cabrera Miñagorri <devgorri@gmail.com>
Co-authored-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>
Co-authored-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
gkulkarni32
2021-02-11 14:37:08 +05:30
committed by GitHub
parent 0c0d96b741
commit d99d9be29a
16 changed files with 1943 additions and 0 deletions

9
bitnami/solr/Chart.lock Normal file
View File

@@ -0,0 +1,9 @@
dependencies:
- name: zookeeper
repository: https://charts.bitnami.com/bitnami
version: 6.4.0
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.3.9
digest: sha256:a4370cfe768d09e60f4a422a3eb9e47b9760a0c96a007b0f97227129eade4e64
generated: "2021-02-10T16:44:31.164549104Z"

30
bitnami/solr/Chart.yaml Normal file
View File

@@ -0,0 +1,30 @@
annotations:
category: Infrastructure
apiVersion: v2
appVersion: 8.8.0
dependencies:
- condition: zookeeper.enabled
name: zookeeper
repository: https://charts.bitnami.com/bitnami
version: 6.x.x
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
description: Apache Solr is an open source enterprise search platform
engine: gotpl
home: https://github.com/bitnami/charts/tree/master/bitnami/solr
icon: https://bitnami.com/assets/stacks/solr/img/solr-stack-110x117.png
keywords:
- solr
- zookeeper
- apache
maintainers:
- email: containers@bitnami.com
name: Bitnami
name: solr
sources:
- https://github.com/bitnami/bitnami-docker-solr
- https://lucene.apache.org/solr/
version: 0.1.0

367
bitnami/solr/README.md Normal file
View File

@@ -0,0 +1,367 @@
# Solr
[Solr](https://lucene.apache.org/solr/) is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more..
## TL;DR
```console
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/solr --set elasticsearch.hosts[0]=<Hostname of your ES instance> --set elasticsearch.port=<port of your ES instance>
```
## Introduction
This chart bootstraps a [Solr](https://github.com/bitnami/bitnami-docker-solr) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters.
## Prerequisites
- Kubernetes 1.12+
- Helm 3.1.0
- PV provisioner support in the underlying infrastructure
- ReadWriteMany volumes for deployment scaling
## Installing the Chart
This chart requires a Elasticsearch instance to work. You can use an already existing Elasticsearch instance.
To install the chart with the release name `my-release`:
```console
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release \
--set elasticsearch.hosts[0]=<Hostname of your ES instance> \
--set elasticsearch.port=<port of your ES instance> \
bitnami/solr
```
These commands deploy Solr on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) 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` statefulset:
```console
$ helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release. Use the option `--purge` to delete all history too.
## Parameters
The following tables lists the configurable parameters of the solr chart and their default values.
### Global parameters
| Parameter | Description | Default |
|:----------------------------|:--------------------------------------------------|:----------------------------------------------------------|
| :-------------------------- | :------------------------------------------------ | :-------------------------------------------------------- |
| `global.imageRegistry` | Global Docker image registry | `nil` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
### Common parameters
| Parameter | Description | Default |
|:----------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------|
| :-------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------- |
| `nameOverride` | String to partially override solr.fullname template with a string | `nil` |
| `fullnameOverride` | String to fully override solr.fullname template with a string | `nil` |
| `clusterDomain` | Kubernetes cluster domain | `cluster.local` |
| `commonLabels` | Common lables to add to the Kuberentes objects | `{}` |
| `commonAnnotations` | Common annotations to add to the Kubernetes objects | |
| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template). | `nil` |
| `replicaCount` | Number of solr replicas | `{}` |
| `image.registry` | Solr Image registry | `docker.io` |
| `image.repository` | Solr Image name | `bitnami/solr` |
| `image.tag` | Solr Image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `nil` |
| `podLabels` | Additional labels for pods pod | `{}` |
| `podAnnotations` | Additional annotations for pods | {} |
| `podSecurityContext.fsGroup` | Group ID for the pods. | `1001` |
| `containerSecurityContext.runAsUser` | User ID for the containers. | `1001` |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` |
| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the `common.names.fullname` template |
| `persistence.enabled` | Use a PVC to persist data. | `true` |
| `persistence.annotations` | Persistence Annotations for Solr | `{}` |
| `persistence.mountPath` | Persistence mount path for Solr | `{}` |
| `persistence.storageClass` | Storage class of backing PVC | `generic` |
| `persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` |
| `persistence.size` | Size of data volume | `8Gi` |
| `updateStrategy` | Update strategy for StatefulSet | onDelete |
| `rollingUpdate` | Rolling Update configuration | `nil` |
| `volumePermissions.enabled` | Enable init container that changes volume permissions in the registry (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` |
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` |
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` |
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` |
| `volumePermissions.resources` | Init container volume-permissions CPU/Memory resource requests/limits | {} |
| `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `volumePermissions.containerSecurityContext.enabled` | Container security context for volume permissions | `true` |
| `volumePermissions.containerSecurityContext.runAsUser` | Container security context fsGroup for volume permissions | `1001` |
| `volumePermissions.containerSecurityContext.runAsNonRoot` | Container security context runAsNonRoot for volume permissions | `true` |
| `lifecycleHooks` | Lifecycle hook to automate configuration before or after start | `{}` |
### Solr statefulset parameters
| Parameter | Description | Default |
|:---------------------------------------|:-------------------------------------------------------------------------------------------------|:-----------------------------------|
| :------------------------------------- | :----------------------------------------------------------------------------------------------- | :--------------------------------- |
| `coreName` | Name of the default core to be created | `my-core` |
| `cloudEnabled` | Enable Solr cloud mode | `true` |
| `cloudBootstrap` | Bootstrap the Solr cloud cluster on the install | `true` |
| `collection` | Name of the collection to be created | `my-collection` |
| `collectionShards` | Number of collection shards | `1` |
| `collectionReplicas` | Number of collection replicas | `2` |
| `containerPort` | Port number where Solr is running inside the container | `8983` |
| `serverDirectory` | Name of the created directory for the server | `server` |
| `javaMem` | Java memory options to pass to the Solr container | `nil` |
| `heap` | Java Heap options to pass to the solr container | `nil` |
| `authentication.enabled` | Enable Solr authentication | `true` |
| `authentication.adminUsername` | Solr admin username | `admin` |
| `authentication.adminPassword` | Solr admin password. Autogenerated if not provided. | `mil` |
| `existingSecret` | Existing secret with Solr password | `nil` |
| `command` | Override Solr entrypoint string. | `nil` |
| `args` | Arguments for the provided command if needed | `nil` |
| `podAffinityPreset` | Solr pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `podAntiAffinityPreset` | Solr pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `nodeAffinityPreset.type` | Solr node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `nodeAffinityPreset.key` | Solr node label key to match Ignored if `affinity` is set. | `""` |
| `nodeAffinityPreset.values` | Solr node label values to match. Ignored if `affinity` is set. | `[]` |
| `affinity` | Affinity for Solr pods assignment | `{}` (evaluated as a template) |
| `nodeSelector` | Node labels for Solr pods assignment | `{}` (evaluated as a template) |
| `tolerations` | Tolerations for Solr pods assignment | `[]` (evaluated as a template) |
| `livenessProbe.enabled` | Turn on and off liveness probe. | `true` |
| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated. | `30` |
| `livenessProbe.periodSeconds` | How often to perform the probe. | `30` |
| `livenessProbe.timeoutSeconds` | When the probe times out. | `5` |
| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` |
| `readinessProbe.enabled` | Turn on and off readiness probe. | `true` |
| `readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated. | `5` |
| `readinessProbe.periodSeconds` | How often to perform the probe. | `10` |
| `readinessProbe.timeoutSeconds` | When the probe times out. | `1` |
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` |
| `customLivenessProbe` | Override default liveness probe | `nil` |
| `customReadinessProbe` | Override default readiness probe | `nil` |
| `extraVolumes` | Array of extra volumes to be added to all pods (evaluated as a template) | `[]` |
| `extraVolumeMounts` | Array of extra volume mounts to be added to all pods (evaluated as a template) | `[]` |
| `hostAliases` | Add deployment host aliases | `[]` |
| `affinity` | Affinity settings for Solr pod assignment | `{}` |
| `extraEnvVars` | Array containing extra env vars to be added to all pods (evaluated as a template) | `[]` |
| `extraEnvVarsCM` | ConfigMap containing extra env vars to be added to all pods (evaluated as a template) | `nil` |
| `extraEnvVarsSecret` | Secret containing extra env vars to be added to all pods (evaluated as a template) | `nil` |
| `initContainers` | Init containers to add to the cronjob container | `{}` |
| `sidecars` | Attach additional containers to the pod (evaluated as a template) | `nil` |
| `resources` | Solr CPU/Memory resource requests/limits | `{Memory: "256Mi", CPU: "100m"}` |
### Solr Traffic Exposure Parameters
| Parameter | Description | Default |
|:---------------------------------|:---------------------------------------------------------|:-------------------------------|
| `service.port` | Kubernetes Service port. | `6379` |
| `service.annotations` | annotations for solr service | {} |
| `service.labels` | Additional labels for solr service | {} |
| `service.type` | Service type for default solr service | `ClusterIP` |
| `service.nodePorts.http` | Node ports for the http service | `""` |
| `service.nodePorts.https` | Node ports for the https service | `""` |
| `service.loadBalancerIP` | loadBalancerIP if service.type is `LoadBalancer` | `nil` |
| `ingress.enabled` | Enable ingress controller resource | `false` |
| `ingress.apiVersion` | Override default Ingress Api version | `nil` |
| `ingress.certManager` | Add annotations for cert-manager | `false` |
| `ingress.hostname` | Default host for the ingress resource | `solr.local` |
| `ingress.pathType` | Path type for the ingress resource | `ImplementationSpecific` |
| `ingress.path` | Default path for the ingress resource | `/` |
| `ingress.tls` | Create TLS Secret | `false` |
| `ingress.annotations` | Ingress annotations | `[]` (evaluated as a template) |
| `ingress.extraHosts[0].name` | Additional hostnames to be covered | `nil` |
| `ingress.extraHosts[0].path` | Additional hostnames to be covered | `nil` |
| `ingress.extraPaths` | Additional arbitrary path/backend objects | `nil` |
| `ingress.extraTls[0].hosts[0]` | TLS configuration for additional hostnames to be covered | `nil` |
| `ingress.extraTls[0].secretName` | TLS configuration for additional hostnames to be covered | `nil` |
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
### Zookeeper parameters
| Parameter | Description | Default |
|:------------------------------------------------|:------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|
| :---------------------------------------------- | :---------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ |
| `zookeeper.enabled` | Enable Zookeeper deployment. Needed for Solr cloud. | `true` |
| `zookeeper.persistence.enabled` | Enabled persistence for Zookeeper | `true` |
| `zookeeper.port` | Zookeeper port service port | `2181` |
| `zookeeper.replicaCount` | Number of Zookeeper cluster replicas | `3` |
| `zookeeper.fourlwCommandsWhitelist` | Zookeeper four letters commands to enable | `srvr,mntr,conf,ruok` |
| `externalZookeeper.servers` | Servers for an already existing Zookeeper. | `[]` |
| `zookeeper.service.publishNotReadyAddresses` | Publish not Ready ips for zookeeper | `true` |
### Exporter deployment parameters
| Parameter | Description | Default |
|:------------------------------------------------|:------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|
| :---------------------------------------------- | :---------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ |
| `exporter.enabled` | Start a side-car prometheus exporter | `false` |
| `exporter.image.registry` | Solr exporter image registry | `docker.io` |
| `exporter.image.repository` | Solr exporter image name | `bitnami/solr-exporter` |
| `exporter.image.tag` | Solr exporter image tag | `{TAG_NAME}` |
| `exporter.image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `exporter.image.pullSecrets` | Specify docker-registry secret names as an array | `nil` |
| `exporter.updateStrategy` | Specify exporter deployment update strategy | `RollingUpdate` |
| `exporter.configFile` | Config file for the Solr prometheus exporter | `/opt/bitnami/solr/contrib/prometheus-exporter/conf/solr-exporter-config.xml` |
| `exporter.port` | Solr exporter port | `9983` |
| `exporter.threads` | Number of Solr exporter Threads | `7` |
| `exporter.podLabels` | Additional labels for Metrics exporter pod | {} |
| `exporter.podAnnotations` | Additional annotations for Metrics exporter pod | {} |
| `exporter.resources` | Exporter resource requests/limit | Memory: `256Mi`, CPU: `100m` |
| `exporter.service.type` | Kubernetes Service type (solr metrics) | `ClusterIP` |
| `exporter.service.annotations` | Annotations for the services to monitor. | {} |
| `exporter.service.labels` | Additional labels for the metrics service | {} |
| `exporter.service.loadBalancerIP` | loadBalancerIP if solr metrics service type is `LoadBalancer` | `nil` |
| `exporter.service.nodePorts.http` | Node ports for the http exporter service | `""` |
| `exporter.service.nodePorts.https` | Node ports for the https exporter service | `""` |
| `exporter.service.loadBalancerSourceRanges` | Exporter Load Balancer Source ranges | `nil` |
| `exporter.command` | Override Solr entrypoint string. | `nil` |
| `exporter.args` | Arguments for the provided command if needed | `nil` |
| `exporter.podAffinityPreset` | Solr pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `exporter.podAntiAffinityPreset` | Solr pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `exporter.nodeAffinityPreset.type` | Solr node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `exporter.nodeAffinityPreset.key` | Solr node label key to match Ignored if `affinity` is set. | `""` |
| `exporter.nodeAffinityPreset.values` | Solr node label values to match. Ignored if `affinity` is set. | `[]` |
| `exporter.hostAliases` | Add deployment host aliases | `[]` |
| `exporter.affinity` | Affinity for Solr pods assignment | `{}` (evaluated as a template) |
| `exporter.nodeSelector` | Node labels for Solr pods assignment | `{}` (evaluated as a template) |
| `exporter.tolerations` | Tolerations for Solr pods assignment | `[]` (evaluated as a template) |
| `exporter.livenessProbe.enabled` | Turn on and off liveness probe. | `true` |
| `exporter.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated. | `10` |
| `exporter.livenessProbe.periodSeconds` | How often to perform the probe. | `5` |
| `exporter.livenessProbe.timeoutSeconds` | When the probe times out. | `15` |
| `exporter.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `15` |
| `exporter.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `15` |
| `exporter.readinessProbe.enabled` | Turn on and off readiness probe. | `true` |
| `exporter.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated. | `10` |
| `exporter.readinessProbe.periodSeconds` | How often to perform the probe. | `5` |
| `exporter.readinessProbe.timeoutSeconds` | When the probe times out. | `15` |
| `exporter.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `15` |
| `exporter.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `15` |
| `exporter.customLivenessProbe` | Override default liveness probe | `nil` |
| `exporter.customReadinessProbe` | Override default readiness probe | `nil` |
| `exporter.extraVolumes` | Array of extra volumes to be added to all pods (evaluated as a template) | `[]` |
| `exporter.extraVolumeMounts` | Array of extra volume mounts to be added to all pods (evaluated as a template) | `[]` |
| `exporter.affinity` | Affinity settings for Solr pod assignment | `{}` |
| `exporter.extraEnvVars` | Array containing extra env vars to be added to all pods (evaluated as a template) | `[]` |
| `exporter.extraEnvVarsCM` | ConfigMap containing extra env vars to be added to all pods (evaluated as a template) | `nil` |
| `exporter.extraEnvVarsSecret` | Secret containing extra env vars to be added to all pods (evaluated as a template) | `nil` |
| `exporter.initContainers` | Init containers to add to the cronjob container | `{}` |
| `exporter.sidecars` | Attach additional containers to the pod (evaluated as a template) | `nil` |
| `exporter.podSecurityContext.fsGroup` | Group ID for the pods. | `1001` |
| `exporter.containerSecurityContext.runAsUser` | User ID for the containers. | `1001` |
| `exporter.service.port` | Kubernetes Service port. | `6379` |
| `exporter.service.annotations` | annotations for solr exporter service | {} |
| `exporter.service.labels` | Additional labels for solr exporter service | {} |
| `exporter.service.type` | Service type for default solr exporter service | `ClusterIP` |
| `exporter.service.nodePorts` | Node ports for the service | `{}` |
| `exporter.service.loadBalancerIP` | loadBalancerIP if service.type is `LoadBalancer` | `nil` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
$ helm install my-release \
--set solrCloud.enabled=true bitnami/solr
```
The above command enabled the Solr Cloud mode.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
```console
$ helm install my-release -f values.yaml bitnami/solr
```
> **Tip**: You can use the default [values.yaml](values.yaml)
>
> NOTE: The Solr exporter is not supported when deploying Solr with authentication enabled.
## Configuration and installation details
### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
### Change Solr version
To modify the Solr version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/solr/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters.
### Adding extra environment variables
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property.
```yaml
extraEnvVars:
- name: ZOOKEEPER_VERSION
value: 6
```
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values.
### Sidecars and Init Containers
If you have a need for additional containers to run within the same pod as Solr (e.g. an additional metrics or logging exporter), you can do so via the `sidecars` config parameter. Simply define your container according to the Kubernetes container spec.
```yaml
sidecars:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
```
Similarly, you can add extra init containers using the `initContainers` parameter.
```yaml
initContainers:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
```
### Setting Pod's affinity
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod's affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/master/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
## Persistence
The [Bitnami Solr](https://github.com/bitnami/bitnami-docker-solr) image can persist data. If enabled, the persisted path is `/bitnami/solr` by default.
The chart mounts a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) at this location. The volume is created using dynamic volume provisioning.
### Adding extra volumes
The Bitnami Solr chart supports mounting extra volumes (either PVCs, secrets or configmaps) by using the `extraVolumes` and `extraVolumeMounts` property. This can be combined with advanced operations like adding extra init containers and sidecars.
### Adjust permissions of persistent volume mountpoint
As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it.
By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions.
As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination.
You can enable this initContainer by setting `volumePermissions.enabled` to `true`.
## Troubleshooting
Find more information about how to deal with common errors related to Bitnamis Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).

View File

@@ -0,0 +1,79 @@
{{- if (eq .Values.service.type "LoadBalancer") }}
---------------------------------------------------------------------------------------------
WARNING
By specifying "serviceType=LoadBalancer" and not configuring the authentication
you have most likely exposed the solr externally without any
authentication mechanism.
For security reasons, we strongly suggest that you switch to "ClusterIP" or
"NodePort". As alternative, you can also configure the Solr authentication.
---------------------------------------------------------------------------------------------
{{- end }}
** Please be patient while the chart is being deployed **
Solr can be accessed via port {{ .Values.service.port }} on the following DNS name from within your cluster:
{{ include "solr.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.service.port }}
{{- if .Values.authentication.enabled }}
To get the Solr credentials execute the following commands:
echo Username: {{ .Values.authentication.adminUsername }}
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "solr.secretName" . }} -o jsonpath="{.data.solr-password}" | base64 --decode)
{{- end }}
To connect to your Solr from outside the cluster execute the following commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.names.fullname" . }})
echo "Go to ${NODE_IP}:${NODE_PORT}"
{{- else if contains "LoadBalancer" .Values.service.type }}
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 {{ include "common.names.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo "Go to ${SERVICE_IP}:{{ .Values.service.port }}"
{{- else if contains "ClusterIP" .Values.service.type }}
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "common.names.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }} &
Go to localhost:{{ .Values.service.port }}
{{- end }}
{{- if .Values.exporter.enabled }}
** Solr Prometheus metrics are exported to the following endpoints: **
* Internally, within the kubernetes cluster on:
{{ include "solr.exporter-name" . }}.{{ .Release.Name }}.svc.{{ .Values.clusterDomain }}:{{ .Values.exporter.port }}/solr
{{- end }}
{{- include "common.warnings.rollingTag" .Values.image }}
{{- include "common.warnings.rollingTag" .Values.exporter.image }}
{{- if .Values.authentication.enabled -}}
{{- $requiredPasswords := list -}}
{{- $secretNameSolr := include "solr.secretName" . -}}
{{- if not .Values.existingSecret -}}
{{- $requiredSolrPassword := dict "valueKey" "solrPassword" "secret" $secretNameSolr "field" "solr-password" -}}
{{- $requiredPasswords = append $requiredPasswords $requiredSolrPassword -}}
{{- end -}}
{{- $requiredSolrPasswordErrors := include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" $) -}}
{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" (list $requiredSolrPasswordErrors) "context" $) -}}
{{- end -}}

View File

@@ -0,0 +1,85 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "solr.name" -}}
{{- include "common.names.name" . -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "solr.fullname" -}}
{{- include "common.names.fullname" . -}}
{{- end -}}
{{/*
Define the name of the solr exporter
*/}}
{{- define "solr.exporter-name" -}}
{{- printf "%s-%s" (include "solr.fullname" .) "exporter" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "solr.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image ) "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Apache Solr image name
*/}}
{{- define "solr.image" -}}
{{- include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Solr Exporter image name
*/}}
{{- define "exporter.image" -}}
{{- include "common.images.image" (dict "imageRoot" .Values.exporter.image "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper image name (for the init container volume-permissions image)
*/}}
{{- define "volumePermissions.image" -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.volumePermissions.image "global" .Values.global ) -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "solr.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{- default (include "solr.fullname" .) .Values.serviceAccount.name -}}
{{- else -}}
{{- default "default" .Values.serviceAccount.name -}}
{{- end -}}
{{- end -}}
{{/*
Return the proper Storage Class
*/}}
{{- define "solr.storageClass" -}}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
{{- end -}}
{{/* Solr credential secret name */}}
{{- define "solr.secretName" -}}
{{- coalesce .Values.existingSecret (include "common.names.fullname" .) -}}
{{- end -}}
{{/* Return the proper Zookeeper host */}}
{{- define "solr.zookeeper.host" -}}
{{- if .Values.externalZookeeper.servers -}}
{{- include "common.tplvalues.render" (dict "value" (join "," .Values.externalZookeeper.servers) "context" $) -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name "zookeeper" -}}:{{- .Values.zookeeper.port -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,147 @@
{{- if and .Values.exporter.enabled (not .Values.authentication.enabled) }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: solr-exporter
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ include "solr.exporter-name" . }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
spec:
replicas: 1
{{- if .Values.exporter.updateStrategy }}
strategy: {{- include "common.tplvalues.render" (dict "value" .Values.exporter.updateStrategy "context" $) | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: solr-exporter
template:
metadata:
annotations:
{{- if .Values.exporter.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.exporter.podAnnotations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: solr-exporter
{{- if .Values.exporter.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.exporter.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "solr.serviceAccountName" . }}
{{- include "solr.imagePullSecrets" . | nindent 6 }}
{{- if .Values.exporter.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.exporter.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.exporter.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.exporter.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.exporter.podAffinityPreset "component" "solr" "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.exporter.podAntiAffinityPreset "component" "solr" "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.exporter.nodeAffinityPreset.type "key" .Values.exporter.nodeAffinityPreset.key "values" .Values.exporter.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.exporter.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.exporter.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.exporter.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.exporter.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.exporter.priorityClassName }}
priorityClassName: {{ .Values.exporter.priorityClassName | quote }}
{{- end }}
{{- if .Values.exporter.podSecurityContext.enabled }}
securityContext: {{- omit .Values.exporter.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
initContainers:
{{- if .Values.exporter.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.exporter.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: solr-exporter
image: {{ include "exporter.image" . }}
imagePullPolicy: {{ .Values.exporter.image.pullPolicy }}
{{- if .Values.exporter.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.exporter.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.exporter.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.exporter.command "context" $) | nindent 12 }}
{{- else }}
command:
- "/opt/bitnami/solr/contrib/prometheus-exporter/bin/solr-exporter"
- "-p"
- {{ .Values.exporter.port | quote }}
- "-z"
- "{{ include "solr.zookeeper.host" . }}:{{ .Values.zookeeper.port }}/solr"
- "-n"
- {{ .Values.exporter.threads | quote }}
- "-f"
- {{ .Values.exporter.configFile | quote }}
{{- end }}
{{- if .Values.exporter.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.exporter.args "context" $) | nindent 12 }}
{{- end }}
env:
{{- if .Values.exporter.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.exporter.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.exporter.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.exporter.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.exporter.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.exporter.extraEnvVarsSecret "context" $) }}
{{- end }}
ports:
- name: exporter-port
containerPort: {{ .Values.exporter.port }}
{{- if .Values.exporter.resources }}
resources: {{- toYaml .Values.exporter.resources | nindent 12 }}
{{- end }}
{{- if .Values.exporter.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.exporter.livenessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: "/metrics"
port: {{ .Values.exporter.port }}
initialDelaySeconds: {{ .Values.exporter.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.exporter.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.exporter.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.exporter.livenessProbe.failureThreshold }}
successThreshold: {{ .Values.exporter.livenessProbe.successThreshold }}
{{- else if .Values.exporter.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.exporter.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.exporter.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.exporter.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: "/metrics"
port: {{ .Values.exporter.port }}
initialDelaySeconds: {{ .Values.exporter.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.exporter.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.exporter.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.exporter.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.exporter.readinessProbe.successThreshold }}
{{- else if .Values.exporter.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.exporter.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.exporter.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.exporter.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.exporter.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.exporter.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.exporter.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.exporter.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{ end }}

View File

@@ -0,0 +1,44 @@
{{- if .Values.exporter.enabled }}
apiVersion: v1
kind: Service
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: solr-exporter
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.exporter.service.Labels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.exporter.service.labels "context" $ ) | nindent 4 }}
{{- end }}
name: "{{ include "solr.exporter-name" . }}"
{{- if or .Values.exporter.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.exporter.service.annotations }}
{{ include "common.tplvalues.render" ( dict "value" .Values.exporter.service.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
spec:
type: {{ .Values.exporter.service.type }}
{{ if eq .Values.exporter.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.exporter.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.exporter.service.type "LoadBalancer") (not (empty .Values.exporter.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.exporter.service.loadBalancerIP }}
{{- end }}
ports:
- name: tcp-client
port: {{ .Values.exporter.service.port }}
protocol: TCP
targetPort: exporter-port
{{- if and (or (eq .Values.exporter.service.type "NodePort") (eq .Values.exporter.service.type "LoadBalancer")) (not (empty .Values.exporter.service.nodePorts.http)) }}
nodePort: {{ .Values.exporter.service.nodePorts.http }}
{{- else if eq .Values.exporter.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: solr-exporter
{{ end }}

View File

@@ -0,0 +1,4 @@
{{- range .Values.extraDeploy }}
---
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
{{- end }}

View File

@@ -0,0 +1,57 @@
{{- if .Values.ingress.enabled }}
apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ template "common.names.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.ingress.certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- if .Values.ingress.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
spec:
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname | quote }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
{{- end }}
- path: {{ .Values.ingress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" "tcp-client" "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.ingress.extraHosts }}
- host: {{ .name | quote }}
http:
paths:
- path: {{ default "/" .path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "tcp-client" "context" $) | nindent 14 }}
{{- end }}
{{- if or .Values.ingress.tls .Values.ingress.extraTls }}
tls:
{{- if .Values.ingress.tls }}
- hosts:
- {{ .Values.ingress.hostname }}
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.extraTls "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,21 @@
{{- if and (not .Values.existingSecret) .Values.authentication.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.names.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
type: Opaque
data:
{{ if .Values.authentication.adminPassword }}
solr-password: {{ .Values.authentication.adminPassword | b64enc | quote }}
{{ else }}
solr-password: {{ randAlphaNum 10 | b64enc | quote }}
{{ end }}
{{- end }}

View File

@@ -0,0 +1,15 @@
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: solr
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ include "solr.serviceAccountName" . }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}

View File

@@ -0,0 +1,248 @@
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
name: {{ include "solr.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: solr
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
spec:
podManagementPolicy: Parallel
replicas: {{ .Values.replicaCount }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: solr
serviceName: {{ include "solr.fullname" . }}-headless
updateStrategy: {{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" $) | nindent 4 }}
template:
metadata:
annotations:
{{- if .Values.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: solr
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "solr.serviceAccountName" . }}
{{- include "solr.imagePullSecrets" . | nindent 6 }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- if .Values.podSecurityContext.enabled }}
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
initContainers:
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
- name: volume-permissions
image: {{ include "volumePermissions.image" . }}
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
command:
- sh
- c
- chown -R "{{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }}" "/bitnami/solr"
{{- if .Values.volumePermissions.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.volumePermissions.resources }}
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
{{- end }}
volumeMounts:
- name: data
mountPath: /bitnami/solr
{{- end }}
{{- if .Values.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.initContainers }}
{{- include "common.tplvalues.render" ( dict "value" .Values.initContainers "context" $ ) | nindent 8 }}
{{- end }}
containers:
- name: solr
image: {{ include "solr.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
{{- else }}
command:
- bash
- -ec
- |
{{- if .Values.cloudBootstrap }}
NODE_ID="${MY_POD_NAME#"{{ include "solr.fullname" . }}-"}"
if [[ "$NODE_ID" -eq "0" ]]; then
export SOLR_CLOUD_BOOTSTRAP=yes
fi
{{- end }}
# Use hostname instead of IP to register in Zookeeper
export SOLR_HOST="${MY_POD_NAME}.{{ include "solr.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}"
/opt/bitnami/scripts/solr/entrypoint.sh /opt/bitnami/scripts/solr/run.sh
{{- end }}
{{- if .Values.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
{{- end }}
env:
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: SOLR_ENABLE_CLOUD_MODE
value: {{ ternary "yes" "no" .Values.cloudEnabled | quote }}
- name: SOLR_NUMBER_OF_NODES
value: {{ .Values.replicaCount | quote }}
- name: SOLR_PORT_NUMBER
value: {{ .Values.containerPort | quote }}
- name: SOLR_SERVER_DIRECTORY
value: {{ .Values.serverDirectory | quote }}
{{- if .Values.cloudEnabled }}
- name: SOLR_COLLECTION
value: {{ .Values.collection | quote }}
{{- else }}
- name: SOLR_CORE
value: {{ .Values.coreName | quote }}
{{- end }}
- name: SOLR_COLLECTION_SHARDS
value: {{ .Values.collectionShards | quote }}
- name: SOLR_COLLECTION_REPLICAS
value: {{ .Values.collectionReplicas | quote }}
{{- if .Values.heap }}
- name: SOLR_HEAP
value: {{ .Values.heap | quote }}
{{- end }}
{{- if .Values.javaMem }}
- name: SOLR_JAVA_MEM
value: {{ .Values.javaMem | quote }}
{{- end }}
{{- if .Values.authentication.enabled }}
- name: SOLR_ENABLE_AUTHENTICATION
value: "yes"
- name: SOLR_ADMIN_USERNAME
value: {{ .Values.authentication.adminUsername | quote }}
- name: SOLR_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "solr.secretName" . }}
key: solr-password
{{- end }}
- name: SOLR_ZK_HOSTS
value: {{ include "solr.zookeeper.host" . | quote }}
{{- if .Values.extraEnvVars }}
{{ include "common.tplvalues.render" ( dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
{{- end }}
ports:
- name: solr-client
containerPort: {{ .Values.containerPort }}
{{- if .Values.resources }}
resources: {{- include "common.tplvalues.render" (dict "value" .Values.resources "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
httpGet:
scheme: "HTTP"
path: "/solr"
port: {{ .Values.service.port }}
{{- else if .Values.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
httpGet:
scheme: "HTTP"
path: "/solr"
port: {{ .Values.service.port }}
{{- else if .Values.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.mountPath }}
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
- name: data
persistentVolumeClaim:
claimName: {{ printf "%s" (tpl .Values.persistence.existingClaim .) }}
{{- else }}
- name: data
emptyDir: {}
{{- end }}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
volumeClaimTemplates:
- metadata:
name: data
{{- if .Values.persistence.annotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }}
{{- end }}
spec:
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{ include "solr.storageClass" . | nindent 8 }}
{{- end }}

View File

@@ -0,0 +1,24 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "solr.fullname" . }}-headless
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: solr
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
spec:
type: ClusterIP
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: tcp-client
port: {{ .Values.service.port }}
protocol: TCP
targetPort: solr-client
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: solr

View File

@@ -0,0 +1,39 @@
apiVersion: v1
kind: Service
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: solr
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ include "solr.fullname" . }}
{{- if or .Values.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.service.annotations }}
{{ include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
spec:
type: {{ .Values.service.type }}
{{ if eq .Values.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- name: tcp-client
port: {{ .Values.service.port }}
protocol: TCP
targetPort: solr-client
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }}
nodePort: {{ .Values.service.nodePorts.http }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: solr

View File

@@ -0,0 +1,44 @@
{{- if .Values.ingress.enabled }}
{{- if .Values.ingress.secrets }}
{{- range .Values.ingress.secrets }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
namespace: {{ $.Release.Namespace | quote }}
labels: {{- include "common.labels.standard" $ | nindent 4 }}
{{- if $.Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- else if and .Values.ingress.tls (not .Values.ingress.certManager) }}
{{- $ca := genCA "solr-ca" 365 }}
{{- $cert := genSignedCert .Values.ingress.hostname nil (list .Values.ingress.hostname) 365 $ca }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-tls" .Values.ingress.hostname }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ $cert.Cert | b64enc | quote }}
tls.key: {{ $cert.Key | b64enc | quote }}
ca.crt: {{ $ca.Cert | b64enc | quote }}
{{- end }}
{{- end }}

730
bitnami/solr/values.yaml Normal file
View File

@@ -0,0 +1,730 @@
## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
##
# global:
# imageRegistry: myRegistryName
# imagePullSecrets:
# - myRegistryKeySecretName
# storageClass: myStorageClass
## String to partially override kafka.fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override solr.fullname template
##
# fullnameOverride:
## Kubernetes Cluster Domain
##
clusterDomain: cluster.local
## Deployment pod host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
hostAliases: []
## Add labels to all the deployed resources
##
commonLabels: {}
## Add annotations to all the deployed resources
##
commonAnnotations: {}
## Extra objects to deploy (value evaluated as a template)
##
extraDeploy: []
## Number of solr instances to run
##
replicaCount: 3
service:
type: ClusterIP
port: 8983
annotations: {}
labels: {}
## loadBalancerIP for the SuiteCRM Service (optional, cloud specific)
## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
##
## loadBalancerIP:
##
## nodePorts:
## http: <to set explicitly, choose port between 30000-32767>
## https: <to set explicitly, choose port between 30000-32767>
nodePorts:
http: ""
https: ""
## Bitnami Solr image version
## ref: https://hub.docker.com/r/bitnami/solr/tags
##
image:
registry: docker.io
repository: bitnami/solr
tag: 8.8.0-debian-10-r10
## 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:
# - myRegistryKeySecretName
## Configure extra options for liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
##
livenessProbe:
enabled: true
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
## Solr core name to be created
##
coreName: my-core
## Enable Solr cloud
##
cloudEnabled: true
## Enable cloud bootstrap. It will be performed from the node 0.
##
cloudBootstrap: true
## Solr collection name
##
collection: my-collection
## Solr number fo collection shards
##
collectionShards: 1
## Solr number of collection replicas
##
collectionReplicas: 2
## Port number for the Solr container
##
containerPort: 8983
## Solr server directory
##
serverDirectory: "server"
## Java memmory options
##
javaMem:
## Java Heap options
##
heap:
authentication:
## Enabled Solr authentication
##
enabled: true
## Solr admin username
##
adminUsername: admin
## Solr admin password
##
adminPassword:
## Secret with Solr password
##
# existingSecret:
## Container Command (set to default if not set).
##
command: []
## Container args (set to default if not set).
##
args: []
## Solr resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
## We usually recommend not to specify default resources and to leave this as a conscious
## choice for the user. This also increases chances charts run on environments with little
## resources, such as Minikube. If you do want to specify resources, uncomment the following
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
limits: {}
# cpu: 200m
# memory: 256Mi
requests: {}
# cpu: 200m
# memory: 10Mi
## Solr containers' Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
##
containerSecurityContext:
enabled: true
runAsUser: 1001
runAsNonRoot: true
## Solr pods' Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
##
podSecurityContext:
enabled: true
fsGroup: 1001
## Pod affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAffinityPreset: ""
## Pod anti-affinity preset
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAntiAffinityPreset: soft
## Node affinity preset
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
## Allowed values: soft, hard
##
nodeAffinityPreset:
## Node affinity type
## Allowed values: soft, hard
type: ""
## Node label key to match
## E.g.
## key: "kubernetes.io/e2e-az-name"
##
key: ""
## Node label values to match
## E.g.
## values:
## - e2e-az1
## - e2e-az2
##
values: []
## Affinity for pod assignment. Evaluated as a template.
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}
## Node labels for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
## Tolerations for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []
## Pod extra labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
##
podLabels: {}
## Annotations for server pods.
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}
## Solr pods' priority.
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
##
# priorityClassName: ""
## lifecycleHooks for the Solr container to automate configuration before or after startup.
##
lifecycleHooks: {}
## Custom Liveness probes for Solr
##
customLivenessProbe: {}
## Custom Rediness probes Solr
##
customReadinessProbe: {}
## Update strategy - only really applicable for deployments with RWO PVs attached
## If replicas = 1, an update can get "stuck", as the previous pod remains attached to the
## PV, and the "incoming" pod can never start. Changing the strategy to "Recreate" will
## terminate the single previous pod, so that the new, incoming pod can attach to the PV
##
updateStrategy:
type: RollingUpdate
rollingUpdate: {}
## Additional environment variables to set
## Example:
## extraEnvVars:
## - name: FOO
## value: "bar"
##
extraEnvVars: []
## ConfigMap with extra environment variables
##
extraEnvVarsCM:
## Secret with extra environment variables
##
extraEnvVarsSecret:
## Extra volumes to add to the deployment
##
extraVolumes: []
## Extra volume mounts to add to the container
##
extraVolumeMounts: []
## Add init containers to the Solr pods.
## Example:
## initContainers:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
initContainers: []
## Add sidecars to the Solr pods.
## Example:
## sidecars:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
sidecars: {}
## Init containers parameters:
## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
##
volumePermissions:
enabled: false
image:
registry: docker.io
repository: bitnami/minideb
tag: buster
pullPolicy: Always
## 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: []
## - myRegistryKeySecretName
## Init containers' resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
## We usually recommend not to specify default resources and to leave this as a conscious
## choice for the user. This also increases chances charts run on environments with little
## resources, such as Minikube. If you do want to specify resources, uncomment the following
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
##
limits: {}
## cpu: 100m
## memory: 128Mi
##
requests: {}
## cpu: 100m
## memory: 128Mi
##
## Container security context
##
containerSecurityContext:
enabled: true
runAsUser: 1001
runAsNonRoot: true
## Persistence parameters
##
persistence:
enabled: true
## A manually managed Persistent Volume and Claim
## If defined, PVC must be created manually before volume will be bound
## The value is evaluated as a template
##
# existingClaim:
## PV 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.
##
# storageClass: "-"
## PV Access Mode
##
accessModes:
- ReadWriteOnce
## PVC size
##
size: 8Gi
## PVC annotations
##
annotations: {}
## Mount point for persistence
##
mountPath: /bitnami/solr
## Specifies whether a ServiceAccount should be created
##
serviceAccount:
create: false
## The name of the ServiceAccount to use.
## If not set and create is true, a name is generated using the fullname template
##
name:
##
## Zookeeper chart configuration
##
## https://github.com/bitnami/charts/blob/master/bitnami/zookeeper/values.yaml
##
zookeeper:
enabled: true
persistence:
enabled: true
port: 2181
replicaCount: 3
fourlwCommandsWhitelist: srvr,mntr,conf,ruok
service:
publishNotReadyAddresses: true
## This value is only used when zookeeper.enabled is set to false
##
externalZookeeper:
## Server or list of external zookeeper servers to use.
##
servers: []
## Configuration for the solr prometheus exporter
##
exporter:
enabled: false
image:
registry: docker.io
repository: bitnami/solr
tag: latest
## 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:
# - myRegistryKeySecretName
## Configure extra options for liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
livenessProbe:
enabled: true
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 15
failureThreshold: 15
successThreshold: 15
readinessProbe:
enabled: true
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 15
failureThreshold: 15
successThreshold: 15
## Path to the Solr exporter config file defining metrics to export. To change it mount a different file using extraConfigMaps
##
configFile: "/opt/bitnami/solr/contrib/prometheus-exporter/conf/solr-exporter-config.xml"
## Solr exporter port
##
port: 9983
## Number of Solr exporter threads
##
threads: 7
## Command and args for running the container (set to default if not set). Use array form
##
command: []
args: []
## Solr resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
limits: {}
# cpu: 200m
# memory: 256Mi
requests: {}
# cpu: 200m
# memory: 10Mi
## Solr exporter containers' Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
##
containerSecurityContext:
enabled: true
runAsUser: 1001
runAsNonRoot: true
## Solr exporter pods' Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
##
podSecurityContext:
enabled: true
fsGroup: 1001
## Pod affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAffinityPreset: ""
## Pod anti-affinity preset
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAntiAffinityPreset: soft
## Node affinity preset
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
## Allowed values: soft, hard
##
nodeAffinityPreset:
## Node affinity type
## Allowed values: soft, hard
type: ""
## Node label key to match
## E.g.
## key: "kubernetes.io/e2e-az-name"
##
key: ""
## Node label values to match
## E.g.
## values:
## - e2e-az1
## - e2e-az2
##
values: []
## Affinity for pod assignment. Evaluated as a template.
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}
## Node labels for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
## Tolerations for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []
## Pod extra labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
##
podLabels: {}
## Annotations for server pods.
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}
## Custom Liveness probes for %%MAIN_CONTAINER_NAME%%
##
customLivenessProbe: {}
## Custom Rediness probes %%MAIN_CONTAINER_NAME%%
##
customReadinessProbe: {}
## Update strategy - only really applicable for deployments with RWO PVs attached
## If replicas = 1, an update can get "stuck", as the previous pod remains attached to the
## PV, and the "incoming" pod can never start. Changing the strategy to "Recreate" will
## terminate the single previous pod, so that the new, incoming pod can attach to the PV
##
updateStrategy:
type: RollingUpdate
rollingUpdate: {}
## Additional environment variables to set
## Example:
## extraEnvVars:
## - name: FOO
## value: "bar"
##
extraEnvVars: []
## ConfigMap with extra environment variables
##
extraEnvVarsCM:
## Secret with extra environment variables
##
extraEnvVarsSecret:
## Extra volumes to add to the deployment
##
extraVolumes: []
## Extra volume mounts to add to the container
##
extraVolumeMounts: []
## Add init containers to the %%MAIN_CONTAINER_NAME%% pods.
## Example:
## initContainers:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
initContainers: {}
## Add sidecars to the %%MAIN_CONTAINER_NAME%% pods.
## Example:
## sidecars:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
sidecars: {}
## Service for the Solr exporter deployment
##
service:
type: ClusterIP
annotations: {}
labels: {}
# HTTP Port
port: 9983
## loadBalancerIP for the SuiteCRM Service (optional, cloud specific)
## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
##
## loadBalancerIP:
##
## nodePorts:
## http: <to set explicitly, choose port between 30000-32767>
## https: <to set explicitly, choose port between 30000-32767>
nodePorts:
http: ""
https: ""
## LoadBalancer source ranges
##
loadBalancerSourceRanges:
## Deployment pod host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
hostAliases: []
## Configure the ingress resource that allows you to access the
## Solr installation. Set up the URL
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
## Set to true to enable ingress record generation
##
enabled: false
## Set this to true in order to add the corresponding annotations for cert-manager
##
certManager: false
## Ingress Path type
##
pathType: ImplementationSpecific
## Override API Version (automatically detected if not set)
##
apiVersion:
## When the ingress is enabled, a host pointing to this will be created
##
hostname: solr.local
## The Path to Solr. You may need to set this to '/*' in order to use this
## with ALB ingress controllers.
##
path: /
## Ingress annotations done as key:value pairs
## For a full list of possible ingress annotations, please see
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
##
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
##
annotations: {}
## Enable TLS configuration for the hostname defined at ingress.hostname parameter
## TLS certificates will be retrieved from a TLS secret with name: {{- printf "%s-tls" .Values.ingress.hostname }}
## You can use the ingress.secrets parameter to create this TLS secret or relay on cert-manager to create it
##
tls: false
## The list of additional hostnames to be covered with this ingress record.
## Most likely the hostname above will be enough, but in the event more hosts are needed, this is an array
## extraHosts:
## - name: solr.local
## path: /
##
## Any additional arbitrary paths that may need to be added to the ingress under the main host.
## For example: The ALB ingress controller requires a special rule for handling SSL redirection.
## extraPaths:
## - path: /*
## backend:
## serviceName: ssl-redirect
## servicePort: use-annotation
##
## The tls configuration for additional hostnames to be covered with this ingress record.
## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
## extraTls:
## - hosts:
## - solr.local
## secretName: solr.local-tls
##
## 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 cert-manager, 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
##
secrets: []
## - name: solr.local-tls
## key:
## certificate:
##