mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 11:06:56 -06:00
Removing files from base chart
This commit is contained in:
@@ -1,557 +1,5 @@
|
||||
# JFrog Artifactory-ha Chart Changelog
|
||||
# JFrog Openshift Artifactory-ha Chart Changelog
|
||||
All changes to this chart will be documented in this file.
|
||||
|
||||
## [1.3.7] - Jan 07, 2020
|
||||
* Add support for customizable `mountOptions` of NFS PVs
|
||||
|
||||
## [1.3.6] - Dec 30, 2019
|
||||
* Fix for nginx probes failing when launched with http disabled
|
||||
|
||||
## [1.3.5] - Dec 24, 2019
|
||||
* Better support for custom `artifactory.internalPort`
|
||||
|
||||
## [1.3.4] - Dec 23, 2019
|
||||
* Mark empty map values with `{}`
|
||||
|
||||
## [1.3.3] - Dec 16, 2019
|
||||
* Another fix for toggling nginx service ports
|
||||
|
||||
## [1.3.2] - Dec 12, 2019
|
||||
* Fix for toggling nginx service ports
|
||||
|
||||
## [1.3.1] - Dec 10, 2019
|
||||
* Add support for toggling nginx service ports
|
||||
|
||||
## [1.3.0] - Dec 1, 2019
|
||||
* Updated Artifactory version to 6.16.0
|
||||
|
||||
## [1.2.4] - Nov 28, 2019
|
||||
* Add support for using existing PriorityClass
|
||||
|
||||
## [1.2.3] - Nov 27, 2019
|
||||
* Add support for PriorityClass
|
||||
|
||||
## [1.2.2] - Nov 20, 2019
|
||||
* Update Artifactory logo
|
||||
|
||||
## [1.2.1] - Nov 18, 2019
|
||||
* Add the option to provide service account annotations (in order to support stuff like https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html)
|
||||
|
||||
## [1.2.0] - Nov 18, 2019
|
||||
* Updated Artifactory version to 6.15.0
|
||||
|
||||
## [1.1.12] - Nov 17, 2019
|
||||
* Fix `README.md` format (broken table)
|
||||
|
||||
## [1.1.11] - Nov 17, 2019
|
||||
* Update comment on Artifactory master key
|
||||
|
||||
## [1.1.10] - Nov 17, 2019
|
||||
* Fix creation of double slash in nginx artifactory configuration
|
||||
|
||||
## [1.1.9] - Nov 14, 2019
|
||||
* Set explicit `postgresql.postgresqlPassword=""` to avoid helm v3 error
|
||||
|
||||
## [1.1.8] - Nov 12, 2019
|
||||
* Updated Artifactory version to 6.14.1
|
||||
|
||||
## [1.1.7] - Nov 11, 2019
|
||||
* Additional documentation for masterKey
|
||||
|
||||
## [1.1.6] - Nov 10, 2019
|
||||
* Update PostgreSQL chart version to 7.0.1
|
||||
* Use formal PostgreSQL configuration format
|
||||
|
||||
## [1.1.5] - Nov 8, 2019
|
||||
* Add support `artifactory.service.loadBalancerSourceRanges` for whitelisting when setting `artifactory.service.type=LoadBalancer`
|
||||
|
||||
## [1.1.4] - Nov 6, 2019
|
||||
* Add support for any type of environment variable by using `extraEnvironmentVariables` as-is
|
||||
|
||||
## [1.1.3] - Nov 6, 2019
|
||||
* Add nodeselector support for Postgresql
|
||||
|
||||
## [1.1.2] - Nov 5, 2019
|
||||
* Add support for the aws-s3-v3 filestore, which adds support for pod IAM roles
|
||||
|
||||
## [1.1.1] - Nov 4, 2019
|
||||
* When using `copyOnEveryStartup`, make sure that the target base directories are created before copying the files
|
||||
|
||||
## [1.1.0] - Nov 3, 2019
|
||||
* Updated Artifactory version to 6.14.0
|
||||
|
||||
## [1.0.1] - Nov 3, 2019
|
||||
* Make sure the artifactory pod exits when one of the pre-start stages fail
|
||||
|
||||
## [1.0.0] - Oct 27, 2019
|
||||
**IMPORTANT - BREAKING CHANGES!**<br>
|
||||
**DOWNTIME MIGHT BE REQUIRED FOR AN UPGRADE!**
|
||||
* If this is a new deployment or you already use an external database (`postgresql.enabled=false`), these changes **do not affect you**!
|
||||
* If this is an upgrade and you are using the default PostgreSQL (`postgresql.enabled=true`), must use the upgrade instructions in [UPGRADE_NOTES.md](UPGRADE_NOTES.md)!
|
||||
* PostgreSQL sub chart was upgraded to version `6.5.x`. This version is **not backward compatible** with the old version (`0.9.5`)!
|
||||
* Note the following **PostgreSQL** Helm chart changes
|
||||
* The chart configuration has changed! See [values.yaml](values.yaml) for the new keys used
|
||||
* **PostgreSQL** is deployed as a StatefulSet
|
||||
* See [PostgreSQL helm chart](https://hub.helm.sh/charts/stable/postgresql) for all available configurations
|
||||
|
||||
## [0.17.3] - Oct 24, 2019
|
||||
* Change the preStartCommand to support templating
|
||||
|
||||
## [0.17.2] - Oct 21, 2019
|
||||
* Add support for setting `artifactory.primary.labels`
|
||||
* Add support for setting `artifactory.node.labels`
|
||||
* Add support for setting `nginx.labels`
|
||||
|
||||
## [0.17.1] - Oct 10, 2019
|
||||
* Updated Artifactory version to 6.13.1
|
||||
|
||||
## [0.17.0] - Oct 7, 2019
|
||||
* Updated Artifactory version to 6.13.0
|
||||
|
||||
## [0.16.7] - Sep 24, 2019
|
||||
* Option to skip wait-for-db init container with '--set waitForDatabase=false'
|
||||
|
||||
## [0.16.6] - Sep 24, 2019
|
||||
* Add support for setting `nginx.service.labels`
|
||||
|
||||
## [0.16.5] - Sep 23, 2019
|
||||
* Add support for setting `artifactory.customInitContainersBegin`
|
||||
|
||||
## [0.16.4] - Sep 20, 2019
|
||||
* Add support for setting `initContainers.resources`
|
||||
|
||||
## [0.16.3] - Sep 11, 2019
|
||||
* Updated Artifactory version to 6.12.2
|
||||
|
||||
## [0.16.2] - Sep 9, 2019
|
||||
* Updated Artifactory version to 6.12.1
|
||||
|
||||
## [0.16.1] - Aug 22, 2019
|
||||
* Fix the nginx server_name directive used with ingress.hosts
|
||||
|
||||
## [0.16.0] - Aug 21, 2019
|
||||
* Updated Artifactory version to 6.12.0
|
||||
|
||||
## [0.15.15] - Aug 18, 2019
|
||||
* Fix existingSharedClaim permissions issue and example
|
||||
|
||||
## [0.15.14] - Aug 14, 2019
|
||||
* Updated Artifactory version to 6.11.6
|
||||
|
||||
## [0.15.13] - Aug 11, 2019
|
||||
* Fix Ingress routing and add an example
|
||||
|
||||
## [0.15.12] - Aug 6, 2019
|
||||
* Do not mount `access/etc/bootstrap.creds` unless user specifies a custom password or secret (Access already generates a random password if not provided one)
|
||||
* If custom `bootstrap.creds` is provided (using keys or custom secret), prepare it with an init container so the temp file does not persist
|
||||
|
||||
## [0.15.11] - Aug 5, 2019
|
||||
* Improve binarystore config
|
||||
1. Convert to a secret
|
||||
2. Move config to values.yaml
|
||||
3. Support an external secret
|
||||
|
||||
## [0.15.10] - Aug 5, 2019
|
||||
* Don't create the nginx configmaps when nginx.enabled is false
|
||||
|
||||
## [0.15.9] - Aug 1, 2019
|
||||
* Fix masterkey/masterKeySecretName not specified warning render logic in NOTES.txt
|
||||
|
||||
## [0.15.8] - Jul 28, 2019
|
||||
* Simplify nginx setup and shorten initial wait for probes
|
||||
|
||||
## [0.15.7] - Jul 25, 2019
|
||||
* Updated README about how to apply Artifactory licenses
|
||||
|
||||
## [0.15.6] - Jul 22, 2019
|
||||
* Change Ingress API to be compatible with recent kubernetes versions
|
||||
|
||||
## [0.15.5] - Jul 22, 2019
|
||||
* Updated Artifactory version to 6.11.3
|
||||
|
||||
## [0.15.4] - Jul 11, 2019
|
||||
* Add `artifactory.customVolumeMounts` support to member node statefulset template
|
||||
|
||||
## [0.15.3] - Jul 11, 2019
|
||||
* Add ingress.hosts to the Nginx server_name directive when ingress is enabled to help with Docker repository sub domain configuration
|
||||
|
||||
## [0.15.2] - Jul 3, 2019
|
||||
* Add the option for changing nginx config using values.yaml and remove outdated reverse proxy documentation
|
||||
|
||||
## [0.15.1] - Jul 1, 2019
|
||||
* Updated Artifactory version to 6.11.1
|
||||
|
||||
## [0.15.0] - Jun 27, 2019
|
||||
* Updated Artifactory version to 6.11.0 and Restart Primary node when bootstrap.creds file has been modified in artifactory-ha
|
||||
|
||||
## [0.14.4] - Jun 24, 2019
|
||||
* Add the option to provide an IP for the access-admin endpoints
|
||||
|
||||
## [0.14.3] - Jun 24, 2019
|
||||
* Update chart maintainers
|
||||
|
||||
## [0.14.2] - Jun 24, 2019
|
||||
* Change Nginx to point to the artifactory externalPort
|
||||
|
||||
## [0.14.1] - Jun 23, 2019
|
||||
* Add values files for small, medium and large installations
|
||||
|
||||
## [0.14.0] - Jun 20, 2019
|
||||
* Use ConfigMaps for nginx configuration and remove nginx postStart command
|
||||
|
||||
## [0.13.10] - Jun 19, 2019
|
||||
* Updated Artifactory version to 6.10.4
|
||||
|
||||
## [0.13.9] - Jun 18, 2019
|
||||
* Add the option to provide additional ingress rules
|
||||
|
||||
## [0.13.8] - Jun 14, 2019
|
||||
* Updated readme with improved external database setup example
|
||||
|
||||
## [0.13.7] - Jun 6, 2019
|
||||
* Updated Artifactory version to 6.10.3
|
||||
* Updated installer-info template
|
||||
|
||||
## [0.13.6] - Jun 6, 2019
|
||||
* Updated Google Cloud Storage API URL and https settings
|
||||
|
||||
## [0.13.5] - Jun 5, 2019
|
||||
* Delete the db.properties file on Artifactory startup
|
||||
|
||||
## [0.13.4] - Jun 3, 2019
|
||||
* Updated Artifactory version to 6.10.2
|
||||
|
||||
## [0.13.3] - May 21, 2019
|
||||
* Updated Artifactory version to 6.10.1
|
||||
|
||||
## [0.13.2] - May 19, 2019
|
||||
* Fix missing logger image tag
|
||||
|
||||
## [0.13.1] - May 15, 2019
|
||||
* Support `artifactory.persistence.cacheProviderDir` for on-premise cluster
|
||||
|
||||
## [0.13.0] - May 7, 2019
|
||||
* Updated Artifactory version to 6.10.0
|
||||
|
||||
## [0.12.23] - May 5, 2019
|
||||
* Add support for setting `artifactory.async.corePoolSize`
|
||||
|
||||
## [0.12.22] - May 2, 2019
|
||||
* Remove unused property `artifactory.releasebundle.feature.enabled`
|
||||
|
||||
## [0.12.21] - Apr 30, 2019
|
||||
* Add support for JMX monitoring
|
||||
|
||||
## [0.12.20] - Apr29, 2019
|
||||
* Added support for headless services
|
||||
|
||||
## [0.12.19] - Apr 28, 2019
|
||||
* Added support for `cacheProviderDir`
|
||||
|
||||
## [0.12.18] - Apr 18, 2019
|
||||
* Changing API StatefulSet version to `v1` and permission fix for custom `artifactory.conf` for Nginx
|
||||
|
||||
## [0.12.17] - Apr 16, 2019
|
||||
* Updated documentation for Reverse Proxy Configuration
|
||||
|
||||
## [0.12.16] - Apr 12, 2019
|
||||
* Added support for `customVolumeMounts`
|
||||
|
||||
## [0.12.15] - Aprl 12, 2019
|
||||
* Added support for `bucketExists` flag for googleStorage
|
||||
|
||||
## [0.12.14] - Apr 11, 2019
|
||||
* Replace `curl` examples with `wget` due to the new base image
|
||||
|
||||
## [0.12.13] - Aprl 07, 2019
|
||||
* Add support for providing the Artifactory license as a parameter
|
||||
|
||||
## [0.12.12] - Apr 10, 2019
|
||||
* Updated Artifactory version to 6.9.1
|
||||
|
||||
## [0.12.11] - Aprl 04, 2019
|
||||
* Add support for templated extraEnvironmentVariables
|
||||
|
||||
## [0.12.10] - Aprl 07, 2019
|
||||
* Change network policy API group
|
||||
|
||||
## [0.12.9] - Aprl 04, 2019
|
||||
* Apply the existing PVC for members (in addition to primary)
|
||||
|
||||
## [0.12.8] - Aprl 03, 2019
|
||||
* Bugfix for userPluginSecrets
|
||||
|
||||
## [0.12.7] - Apr 4, 2019
|
||||
* Add information about upgrading Artifactory with auto-generated postgres password
|
||||
|
||||
## [0.12.6] - Aprl 03, 2019
|
||||
* Added installer info
|
||||
|
||||
## [0.12.5] - Aprl 03, 2019
|
||||
* Allow secret names for user plugins to contain template language
|
||||
|
||||
## [0.12.4] - Apr 02, 2019
|
||||
* Fix issue #253 (use existing PVC for data and backup storage)
|
||||
|
||||
## [0.12.3] - Apr 02, 2019
|
||||
* Allow NetworkPolicy configurations (defaults to allow all)
|
||||
|
||||
## [0.12.2] - Aprl 01, 2019
|
||||
* Add support for user plugin secret
|
||||
|
||||
## [0.12.1] - Mar 26, 2019
|
||||
* Add the option to copy a list of files to ARTIFACTORY_HOME on startup
|
||||
|
||||
## [0.12.0] - Mar 26, 2019
|
||||
* Updated Artifactory version to 6.9.0
|
||||
|
||||
## [0.11.18] - Mar 25, 2019
|
||||
* Add CI tests for persistence, ingress support and nginx
|
||||
|
||||
## [0.11.17] - Mar 22, 2019
|
||||
* Add the option to change the default access-admin password
|
||||
|
||||
## [0.11.16] - Mar 22, 2019
|
||||
* Added support for `<artifactory|nginx>.<readiness|liveness>Probe.path` to customise the paths used for health probes
|
||||
|
||||
## [0.11.15] - Mar 21, 2019
|
||||
* Added support for `artifactory.customSidecarContainers` to create custom sidecar containers
|
||||
* Added support for `artifactory.customVolumes` to create custom volumes
|
||||
|
||||
## [0.11.14] - Mar 21, 2019
|
||||
* Make ingress path configurable
|
||||
|
||||
## [0.11.13] - Mar 19, 2019
|
||||
* Move the copy of bootstrap config from postStart to preStart for Primary
|
||||
|
||||
## [0.11.12] - Mar 19, 2019
|
||||
* Fix existingClaim example
|
||||
|
||||
## [0.11.11] - Mar 18, 2019
|
||||
* Disable the option to use nginx PVC with more than one replica
|
||||
|
||||
## [0.11.10] - Mar 15, 2019
|
||||
* Wait for nginx configuration file before using it
|
||||
|
||||
## [0.11.9] - Mar 15, 2019
|
||||
* Revert securityContext changes since they were causing issues
|
||||
|
||||
## [0.11.8] - Mar 15, 2019
|
||||
* Fix issue #247 (init container failing to run)
|
||||
|
||||
## [0.11.7] - Mar 14, 2019
|
||||
* Updated Artifactory version to 6.8.7
|
||||
|
||||
## [0.11.6] - Mar 13, 2019
|
||||
* Move securityContext to container level
|
||||
|
||||
## [0.11.5] - Mar 11, 2019
|
||||
* Add the option to use existing volume claims for Artifactory storage
|
||||
|
||||
## [0.11.4] - Mar 11, 2019
|
||||
* Updated Artifactory version to 6.8.6
|
||||
|
||||
## [0.11.3] - Mar 5, 2019
|
||||
* Updated Artifactory version to 6.8.4
|
||||
|
||||
## [0.11.2] - Mar 4, 2019
|
||||
* Add support for catalina logs sidecars
|
||||
|
||||
## [0.11.1] - Feb 27, 2019
|
||||
* Updated Artifactory version to 6.8.3
|
||||
|
||||
## [0.11.0] - Feb 25, 2019
|
||||
* Add nginx support for tail sidecars
|
||||
|
||||
## [0.10.3] - Feb 21, 2019
|
||||
* Add s3AwsVersion option to awsS3 configuration for use with IAM roles
|
||||
|
||||
## [0.10.2] - Feb 19, 2019
|
||||
* Updated Artifactory version to 6.8.2
|
||||
|
||||
## [0.10.1] - Feb 17, 2019
|
||||
* Updated Artifactory version to 6.8.1
|
||||
* Add example of `SERVER_XML_EXTRA_CONNECTOR` usage
|
||||
|
||||
## [0.10.0] - Feb 15, 2019
|
||||
* Updated Artifactory version to 6.8.0
|
||||
|
||||
## [0.9.7] - Feb 13, 2019
|
||||
* Updated Artifactory version to 6.7.3
|
||||
|
||||
## [0.9.6] - Feb 7, 2019
|
||||
* Add support for tail sidecars to view logs from k8s api
|
||||
|
||||
## [0.9.5] - Feb 6, 2019
|
||||
* Fix support for customizing statefulset `terminationGracePeriodSeconds`
|
||||
|
||||
## [0.9.4] - Feb 5, 2019
|
||||
* Add support for customizing statefulset `terminationGracePeriodSeconds`
|
||||
|
||||
## [0.9.3] - Feb 5, 2019
|
||||
* Remove the inactive server remove plugin
|
||||
|
||||
## [0.9.2] - Feb 3, 2019
|
||||
* Updated Artifactory version to 6.7.2
|
||||
|
||||
## [0.9.1] - Jan 27, 2019
|
||||
* Fix support for Azure Blob Storage Binary provider
|
||||
|
||||
## [0.9.0] - Jan 23, 2019
|
||||
* Updated Artifactory version to 6.7.0
|
||||
|
||||
## [0.8.10] - Jan 22, 2019
|
||||
* Added support for `artifactory.customInitContainers` to create custom init containers
|
||||
|
||||
## [0.8.9] - Jan 18, 2019
|
||||
* Added support of values ingress.labels
|
||||
|
||||
## [0.8.8] - Jan 16, 2019
|
||||
* Mount replicator.yaml (config) directly to /replicator_extra_conf
|
||||
|
||||
## [0.8.7] - Jan 15, 2018
|
||||
* Add support for Azure Blob Storage Binary provider
|
||||
|
||||
## [0.8.6] - Jan 13, 2019
|
||||
* Fix documentation about nginx group id
|
||||
|
||||
## [0.8.5] - Jan 13, 2019
|
||||
* Updated Artifactory version to 6.6.5
|
||||
|
||||
## [0.8.4] - Jan 8, 2019
|
||||
* Make artifactory.replicator.publicUrl required when the replicator is enabled
|
||||
|
||||
## [0.8.3] - Jan 1, 2019
|
||||
* Updated Artifactory version to 6.6.3
|
||||
* Add support for `artifactory.extraEnvironmentVariables` to pass more environment variables to Artifactory
|
||||
|
||||
## [0.8.2] - Dec 28, 2018
|
||||
* Fix location `replicator.yaml` is copied to
|
||||
|
||||
## [0.8.1] - Dec 27, 2018
|
||||
* Updated Artifactory version to 6.6.1
|
||||
|
||||
## [0.8.0] - Dec 20, 2018
|
||||
* Updated Artifactory version to 6.6.0
|
||||
|
||||
## [0.7.17] - Dec 17, 2018
|
||||
* Updated Artifactory version to 6.5.13
|
||||
|
||||
## [0.7.16] - Dec 12, 2018
|
||||
* Fix documentation about Artifactory license setup using secret
|
||||
|
||||
## [0.7.15] - Dec 9, 2018
|
||||
* AWS S3 add `roleName` for using IAM role
|
||||
|
||||
## [0.7.14] - Dec 6, 2018
|
||||
* AWS S3 `identity` and `credential` are now added only if have a value to allow using IAM role
|
||||
|
||||
## [0.7.13] - Dec 5, 2018
|
||||
* Remove Distribution certificates creation.
|
||||
|
||||
## [0.7.12] - Dec 2, 2018
|
||||
* Remove Java option "-Dartifactory.locking.provider.type=db". This is already the default setting.
|
||||
|
||||
## [0.7.11] - Nov 30, 2018
|
||||
* Updated Artifactory version to 6.5.9
|
||||
|
||||
## [0.7.10] - Nov 29, 2018
|
||||
* Fixed the volumeMount for the replicator.yaml
|
||||
|
||||
## [0.7.9] - Nov 29, 2018
|
||||
* Optionally include primary node into poddisruptionbudget
|
||||
|
||||
## [0.7.8] - Nov 29, 2018
|
||||
* Updated postgresql version to 9.6.11
|
||||
|
||||
## [0.7.7] - Nov 27, 2018
|
||||
* Updated Artifactory version to 6.5.8
|
||||
|
||||
## [0.7.6] - Nov 18, 2018
|
||||
* Added support for configMap to use custom Reverse Proxy Configuration with Nginx
|
||||
|
||||
## [0.7.5] - Nov 14, 2018
|
||||
* Updated Artifactory version to 6.5.3
|
||||
|
||||
## [0.7.4] - Nov 13, 2018
|
||||
* Allow pod anti-affinity settings to include primary node
|
||||
|
||||
## [0.7.3] - Nov 12, 2018
|
||||
* Support artifactory.preStartCommand for running command before entrypoint starts
|
||||
|
||||
## [0.7.2] - Nov 7, 2018
|
||||
* Support database.url parameter (DB_URL)
|
||||
|
||||
## [0.7.1] - Oct 29, 2018
|
||||
* Change probes port to 8040 (so they will not be blocked when all tomcat threads on 8081 are exhausted)
|
||||
|
||||
## [0.7.0] - Oct 28, 2018
|
||||
* Update postgresql chart to version 0.9.5 to be able and use `postgresConfig` options
|
||||
|
||||
## [0.6.9] - Oct 23, 2018
|
||||
* Fix providing external secret for database credentials
|
||||
|
||||
## [0.6.8] - Oct 22, 2018
|
||||
* Allow user to configure externalTrafficPolicy for Loadbalancer
|
||||
|
||||
## [0.6.7] - Oct 22, 2018
|
||||
* Updated ingress annotation support (with examples) to support docker registry v2
|
||||
|
||||
## [0.6.6] - Oct 21, 2018
|
||||
* Updated Artifactory version to 6.5.2
|
||||
|
||||
## [0.6.5] - Oct 19, 2018
|
||||
* Allow providing pre-existing secret containing master key
|
||||
* Allow arbitrary annotations on primary and member node pods
|
||||
* Enforce size limits when using local storage with `emptyDir`
|
||||
* Allow `soft` or `hard` specification of member node anti-affinity
|
||||
* Allow providing pre-existing secrets containing external database credentials
|
||||
* Fix `s3` binary store provider to properly use the `cache-fs` provider
|
||||
* Allow arbitrary properties when using the `s3` binary store provider
|
||||
|
||||
## [0.6.4] - Oct 18, 2018
|
||||
* Updated Artifactory version to 6.5.1
|
||||
|
||||
## [0.6.3] - Oct 17, 2018
|
||||
* Add Apache 2.0 license
|
||||
|
||||
## [0.6.2] - Oct 14, 2018
|
||||
* Make S3 endpoint configurable (was hardcoded with `s3.amazonaws.com`)
|
||||
|
||||
## [0.6.1] - Oct 11, 2018
|
||||
* Allows ingress default `backend` to be enabled or disabled (defaults to enabled)
|
||||
|
||||
## [0.6.0] - Oct 11, 2018
|
||||
* Updated Artifactory version to 6.5.0
|
||||
|
||||
## [0.5.3] - Oct 9, 2018
|
||||
* Quote ingress hosts to support wildcard names
|
||||
|
||||
## [0.5.2] - Oct 2, 2018
|
||||
* Add `helm repo add jfrog https://charts.jfrog.io` to README
|
||||
|
||||
## [0.5.1] - Oct 2, 2018
|
||||
* Set Artifactory to 6.4.1
|
||||
|
||||
## [0.5.0] - Sep 27, 2018
|
||||
* Set Artifactory to 6.4.0
|
||||
|
||||
## [0.4.7] - Sep 26, 2018
|
||||
* Add ci/test-values.yaml
|
||||
|
||||
## [0.4.6] - Sep 25, 2018
|
||||
* Add PodDisruptionBudget for member nodes, defaulting to minAvailable of 1
|
||||
|
||||
## [0.4.4] - Sep 2, 2018
|
||||
* Updated Artifactory version to 6.3.2
|
||||
|
||||
## [0.4.0] - Aug 22, 2018
|
||||
* Added support to run as non root
|
||||
* Updated Artifactory version to 6.2.0
|
||||
|
||||
## [0.3.0] - Aug 22, 2018
|
||||
* Enabled RBAC Support
|
||||
* Added support for PostStartCommand (To download Database JDBC connector)
|
||||
* Increased postgresql max_connections
|
||||
* Added support for `nginx.conf` ConfigMap
|
||||
* Updated Artifactory version to 6.1.0
|
||||
## [1.0.0] - March 09, 2020
|
||||
* Updated Artifactory version to 7.2.1
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Openshift artifactory ha helm chart
|
||||
This chart extends the base artifactory-ha chart to make it compatiable with openshift 4 clusters
|
||||
@@ -1,140 +0,0 @@
|
||||
# JFrog Artifactory Reverse Proxy Settings using Nginx
|
||||
|
||||
#### Reverse Proxy
|
||||
* To use Artifactory as docker registry it's mandatory to use Reverse Proxy.
|
||||
* Artifactory provides a Reverse Proxy Configuration Generator screen in which you can fill in a set of fields to generate
|
||||
the required configuration snippet which you can then download and install directly in the corresponding directory of your reverse proxy server.
|
||||
* To learn about configuring NGINX or Apache for reverse proxy refer to documentation provided on [JFrog wiki](https://www.jfrog.com/confluence/display/RTF/Configuring+a+Reverse+Proxy)
|
||||
* By default Artifactory helm chart uses Nginx for reverse proxy and load balancing.
|
||||
|
||||
**Note**: Nginx image distributed with Artifactory helm chart is custom image managed and maintained by JFrog.
|
||||
|
||||
#### Features of Artifactory Nginx
|
||||
* Provides default configuration with self signed SSL certificate generated on each helm install/upgrade.
|
||||
* Persist configuration and SSL certificate in `/var/opt/jfrog/nginx` directory
|
||||
|
||||
#### Changing the default Artifactory nginx conf
|
||||
Use a values.yaml file for changing the value of nginx.mainConf or nginx.artifactoryConf
|
||||
These configuration will be mounted to the nginx container using a configmap.
|
||||
For example:
|
||||
1. Create a values file `nginx-values.yaml` with the following values:
|
||||
```yaml
|
||||
nginx:
|
||||
artifactoryConf: |
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
ssl_certificate {{ .Values.nginx.persistence.mountPath }}/ssl/tls.crt;
|
||||
ssl_certificate_key {{ .Values.nginx.persistence.mountPath }}/ssl/tls.key;
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_prefer_server_ciphers on;
|
||||
## server configuration
|
||||
server {
|
||||
listen {{ .Values.nginx.internalPortHttps }} ssl;
|
||||
listen {{ .Values.nginx.internalPortHttp }} ;
|
||||
## Change to you DNS name you use to access Artifactory
|
||||
server_name ~(?<repo>.+)\.{{ include "artifactory-ha.fullname" . }} {{ include "artifactory-ha.fullname" . }};
|
||||
|
||||
if ($http_x_forwarded_proto = '') {
|
||||
set $http_x_forwarded_proto $scheme;
|
||||
}
|
||||
## Application specific logs
|
||||
## access_log /var/log/nginx/artifactory-access.log timing;
|
||||
## error_log /var/log/nginx/artifactory-error.log;
|
||||
rewrite ^/$ /artifactory/webapp/ redirect;
|
||||
rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect;
|
||||
if ( $repo != "" ) {
|
||||
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/$repo/$1/$2 break;
|
||||
}
|
||||
rewrite ^/(v1|v2)/([^/]+)(.*)$ /artifactory/api/docker/$2/$1/$3;
|
||||
rewrite ^/(v1|v2)/ /artifactory/api/docker/$1/;
|
||||
chunked_transfer_encoding on;
|
||||
client_max_body_size 0;
|
||||
location /artifactory/ {
|
||||
proxy_read_timeout 900;
|
||||
proxy_pass_header Server;
|
||||
proxy_cookie_path ~*^/.* /;
|
||||
if ( $request_uri ~ ^/artifactory/(.*)$ ) {
|
||||
proxy_pass http://{{ include "artifactory-ha.fullname" . }}:{{ .Values.artifactory.externalPort }}/artifactory/$1;
|
||||
}
|
||||
proxy_pass http://{{ include "artifactory-ha.fullname" . }}:{{ .Values.artifactory.externalPort }}/artifactory/;
|
||||
proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port/artifactory;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Install/upgrade artifactory:
|
||||
```bash
|
||||
helm upgrade --install artifactory-ha jfrog/artifactory-ha -f nginx-values.yaml
|
||||
```
|
||||
|
||||
|
||||
#### Steps to use static configuration for reverse proxy in nginx.
|
||||
1. Get Artifactory service name using this command `kubectl get svc -n $NAMESPACE`
|
||||
|
||||
2. Create `artifactory.conf` file with nginx configuration. More [nginx configuration examples](https://github.com/jfrog/artifactory-docker-examples/tree/master/files/nginx/conf.d)
|
||||
|
||||
Following is example `artifactory.conf`
|
||||
|
||||
**Note**:
|
||||
* Create file with name `artifactory.conf` as it's fixed in configMap key.
|
||||
* Replace `artifactory-artifactory` with service name taken from step 1.
|
||||
|
||||
```bash
|
||||
## add ssl entries when https has been set in config
|
||||
ssl_certificate /var/opt/jfrog/nginx/ssl/tls.crt;
|
||||
ssl_certificate_key /var/opt/jfrog/nginx/ssl/tls.key;
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_prefer_server_ciphers on;
|
||||
## server configuration
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen 80;
|
||||
## Change to you DNS name you use to access Artifactory
|
||||
server_name ~(?<repo>.+)\.artifactory-artifactory artifactory-artifactory;
|
||||
|
||||
if ($http_x_forwarded_proto = '') {
|
||||
set $http_x_forwarded_proto $scheme;
|
||||
}
|
||||
## Application specific logs
|
||||
## access_log /var/log/nginx/artifactory-access.log timing;
|
||||
## error_log /var/log/nginx/artifactory-error.log;
|
||||
rewrite ^/$ /artifactory/webapp/ redirect;
|
||||
rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect;
|
||||
if ( $repo != "" ) {
|
||||
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/$repo/$1/$2 break;
|
||||
}
|
||||
rewrite ^/(v1|v2)/([^/]+)(.*)$ /artifactory/api/docker/$2/$1/$3;
|
||||
rewrite ^/(v1|v2)/ /artifactory/api/docker/$1/;
|
||||
chunked_transfer_encoding on;
|
||||
client_max_body_size 0;
|
||||
location /artifactory/ {
|
||||
proxy_read_timeout 900;
|
||||
proxy_pass_header Server;
|
||||
proxy_cookie_path ~*^/.* /;
|
||||
if ( $request_uri ~ ^/artifactory/(.*)$ ) {
|
||||
proxy_pass http://artifactory-artifactory:8081/artifactory/$1 break;
|
||||
}
|
||||
proxy_pass http://artifactory-artifactory:8081/artifactory/;
|
||||
proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port/artifactory;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Create configMap of `artifactory.conf` created with step above.
|
||||
```bash
|
||||
kubectl create configmap art-nginx-conf --from-file=artifactory.conf
|
||||
```
|
||||
4. Deploy Artifactory using helm chart.
|
||||
You can achieve this by providing the name of configMap created above to `nginx.customArtifactoryConfigMap` in [values.yaml](values.yaml)
|
||||
|
||||
Following is command to set values at runtime:
|
||||
```bash
|
||||
helm install --name artifactory-ha nginx.customArtifactoryConfigMap=art-nginx-conf jfrog/artifactory-ha
|
||||
```
|
||||
@@ -1,33 +0,0 @@
|
||||
# JFrog Artifactory Chart Upgrade Notes
|
||||
This file describes special upgrade notes needed at specific versions
|
||||
|
||||
## Upgrade from 0.X to 1.X
|
||||
**DOWNTIME IS REQUIRED FOR AN UPGRADE!**
|
||||
* If this is a new deployment or you already use an external database (`postgresql.enabled=false`), these changes **do not affect you!**
|
||||
* PostgreSQL sub chart was upgraded to version `6.5.x`. This version is not backward compatible with the old version (`0.9.5`)!
|
||||
* Note the following **PostgreSQL** Helm chart changes
|
||||
* The chart configuration has changed! See [values.yaml](values.yaml) for the new keys used
|
||||
* **PostgreSQL** is deployed as a StatefulSet
|
||||
* See [PostgreSQL helm chart](https://hub.helm.sh/charts/stable/postgresql) for all available configurations
|
||||
* Upgrade
|
||||
* Due to breaking changes in the **PostgreSQL** Helm chart, a migration of the database is needed from the old to the new database
|
||||
* The recommended migration process is the [full system export and import](https://www.jfrog.com/confluence/display/RTF/Importing+and+Exporting)
|
||||
* **NOTE:** To save time, export only metadata and configuration (check `Exclude Content` in the `System Import & Export`) since the Artifactory filestore is persisted
|
||||
* Upgrade steps:
|
||||
1. Block user access to Artifactory (do not shutdown)
|
||||
a. Scale down the cluster to primary node only (`node.replicaCount=0`) so the exported db and configuration will be kept on one known node (the primary)
|
||||
b. If your Artifactory HA K8s service is set to member nodes only (`service.pool=members`) you will need to access the primary node directly (use `kubectl port-forward`)
|
||||
2. Perform `Export System` from the `Admin` -> `Import & Export` -> `System` -> `Export System`
|
||||
a. Check `Exclude Content` to save export size (as Artifactory filestore will persist across upgrade)
|
||||
b. Choose to save the export on the persisted Artifactory volume (`/var/opt/jfrog/artifactory/`)
|
||||
c. Click `Export` (this can take some time)
|
||||
3. Run the `helm upgrade` with the new version. Old PostgreSQL will be removed and new one deployed
|
||||
a. You must pass explicit "ready for upgrade flag" with `--set databaseUpgradeReady=yes`. Failing to provide this will block the upgrade!
|
||||
4. Once ready, open Artifactory UI (you might need to re-enter a valid license). Skip all onboarding wizard steps
|
||||
a. **NOTE:** Don't worry you can't see the old config and files. It will all restore with the system import in the next step
|
||||
5. Perform `Import System` from the `Admin` -> `Import & Export` -> `System` -> `Import System`
|
||||
a. Browse to where the export was saved Artifactory volume (`/var/opt/jfrog/artifactory/<directory-you-set>`)
|
||||
b. Click `Import` (this can take some time)
|
||||
6. Restore access to Artifactory
|
||||
a. Scale the cluster member nodes back to the original size
|
||||
* Artifactory should now be ready to get back to normal operation
|
||||
@@ -1,2 +0,0 @@
|
||||
.git
|
||||
OWNERS
|
||||
@@ -1,23 +0,0 @@
|
||||
apiVersion: v1
|
||||
appVersion: 11.5.0
|
||||
description: Chart for PostgreSQL, an object-relational database management system
|
||||
(ORDBMS) with an emphasis on extensibility and on standards-compliance.
|
||||
engine: gotpl
|
||||
home: https://www.postgresql.org/
|
||||
icon: https://bitnami.com/assets/stacks/postgresql/img/postgresql-stack-110x117.png
|
||||
keywords:
|
||||
- postgresql
|
||||
- postgres
|
||||
- database
|
||||
- sql
|
||||
- replication
|
||||
- cluster
|
||||
maintainers:
|
||||
- email: containers@bitnami.com
|
||||
name: Bitnami
|
||||
- email: cedric@desaintmartin.fr
|
||||
name: desaintmartin
|
||||
name: postgresql
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-postgresql
|
||||
version: 7.0.1
|
||||
@@ -1,487 +0,0 @@
|
||||
# PostgreSQL
|
||||
|
||||
[PostgreSQL](https://www.postgresql.org/) is an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance.
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```console
|
||||
$ helm install stable/postgresql
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps a [PostgreSQL](https://github.com/bitnami/bitnami-docker-postgresql) 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. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.12+
|
||||
- Helm 2.11+ or Helm 3.0-beta3+
|
||||
- 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/postgresql
|
||||
```
|
||||
|
||||
The command deploys PostgreSQL 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` deployment:
|
||||
|
||||
```console
|
||||
$ helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Parameters
|
||||
|
||||
The following tables lists the configurable parameters of the PostgreSQL chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `global.imageRegistry` | Global Docker Image registry | `nil` |
|
||||
| `global.postgresql.postgresqlDatabase` | PostgreSQL database (overrides `postgresqlDatabase`) | `nil` |
|
||||
| `global.postgresql.postgresqlUsername` | PostgreSQL username (overrides `postgresqlUsername`) | `nil` |
|
||||
| `global.postgresql.existingSecret` | Name of existing secret to use for PostgreSQL passwords (overrides `existingSecret`) | `nil` |
|
||||
| `global.postgresql.postgresqlPassword` | PostgreSQL admin password (overrides `postgresqlPassword`) | `nil` |
|
||||
| `global.postgresql.servicePort` | PostgreSQL port (overrides `service.port`) | `nil` |
|
||||
| `global.postgresql.replicationPassword` | Replication user password (overrides `replication.password`) | `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` |
|
||||
| `image.registry` | PostgreSQL Image registry | `docker.io` |
|
||||
| `image.repository` | PostgreSQL Image name | `bitnami/postgresql` |
|
||||
| `image.tag` | PostgreSQL Image tag | `{TAG_NAME}` |
|
||||
| `image.pullPolicy` | PostgreSQL Image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify Image pull secrets | `nil` (does not add image pull secrets to deployed pods) |
|
||||
| `image.debug` | Specify if debug values should be set | `false` |
|
||||
| `nameOverride` | String to partially override postgresql.fullname template with a string (will prepend the release name) | `nil` |
|
||||
| `fullnameOverride` | String to fully override postgresql.fullname template with a string | `nil` |
|
||||
| `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 | `stretch` |
|
||||
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` |
|
||||
| `volumePermissions.securityContext.runAsUser` | User ID for the init container | `0` |
|
||||
| `usePasswordFile` | Have the secrets mounted as a file instead of env vars | `false` |
|
||||
| `replication.enabled` | Enable replication | `false` |
|
||||
| `replication.user` | Replication user | `repl_user` |
|
||||
| `replication.password` | Replication user password | `repl_password` |
|
||||
| `replication.slaveReplicas` | Number of slaves replicas | `1` |
|
||||
| `replication.synchronousCommit` | Set synchronous commit mode. Allowed values: `on`, `remote_apply`, `remote_write`, `local` and `off` | `off` |
|
||||
| `replication.numSynchronousReplicas` | Number of replicas that will have synchronous replication. Note: Cannot be greater than `replication.slaveReplicas`. | `0` |
|
||||
| `replication.applicationName` | Cluster application name. Useful for advanced replication settings | `my_application` |
|
||||
| `existingSecret` | Name of existing secret to use for PostgreSQL passwords | `nil` |
|
||||
| `postgresqlUsername` | PostgreSQL admin user | `postgres` |
|
||||
| `postgresqlPassword` | PostgreSQL admin password | _random 10 character alphanumeric string_ |
|
||||
| `postgresqlDatabase` | PostgreSQL database | `nil` |
|
||||
| `postgresqlDataDir` | PostgreSQL data dir folder | `/bitnami/postgresql` (same value as persistence.mountPath) |
|
||||
| `postgresqlInitdbArgs` | PostgreSQL initdb extra arguments | `nil` |
|
||||
| `postgresqlInitdbWalDir` | PostgreSQL location for transaction log | `nil` |
|
||||
| `postgresqlConfiguration` | Runtime Config Parameters | `nil` |
|
||||
| `postgresqlExtendedConf` | Extended Runtime Config Parameters (appended to main or default configuration) | `nil` |
|
||||
| `pgHbaConfiguration` | Content of pg\_hba.conf | `nil (do not create pg_hba.conf)` |
|
||||
| `configurationConfigMap` | ConfigMap with the PostgreSQL configuration files (Note: Overrides `postgresqlConfiguration` and `pgHbaConfiguration`). The value is evaluated as a template. | `nil` |
|
||||
| `extendedConfConfigMap` | ConfigMap with the extended PostgreSQL configuration files. The value is evaluated as a template. | `nil` |
|
||||
| `initdbScripts` | Dictionary of initdb scripts | `nil` |
|
||||
| `initdbUsername` | PostgreSQL user to execute the .sql and sql.gz scripts | `nil` |
|
||||
| `initdbPassword` | Password for the user specified in `initdbUsername` | `nil` |
|
||||
| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`). The value is evaluated as a template. | `nil` |
|
||||
| `initdbScriptsSecret` | Secret with initdb scripts that contain sensitive information (Note: can be used with `initdbScriptsConfigMap` or `initdbScripts`). The value is evaluated as a template. | `nil` |
|
||||
| `service.type` | Kubernetes Service type | `ClusterIP` |
|
||||
| `service.port` | PostgreSQL port | `5432` |
|
||||
| `service.nodePort` | Kubernetes Service nodePort | `nil` |
|
||||
| `service.annotations` | Annotations for PostgreSQL service, the value is evaluated as a template. | {} |
|
||||
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `service.loadBalancerSourceRanges` | Address that are allowed when svc is LoadBalancer | [] |
|
||||
| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` |
|
||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||
| `persistence.existingClaim` | Provide an existing `PersistentVolumeClaim`, the value is evaluated as a template. | `nil` |
|
||||
| `persistence.mountPath` | Path to mount the volume at | `/bitnami/postgresql` |
|
||||
| `persistence.subPath` | Subdirectory of the volume to mount at | `""` |
|
||||
| `persistence.storageClass` | PVC Storage Class for PostgreSQL volume | `nil` |
|
||||
| `persistence.accessModes` | PVC Access Mode for PostgreSQL volume | `[ReadWriteOnce]` |
|
||||
| `persistence.size` | PVC Storage Request for PostgreSQL volume | `8Gi` |
|
||||
| `persistence.annotations` | Annotations for the PVC | `{}` |
|
||||
| `master.nodeSelector` | Node labels for pod assignment (postgresql master) | `{}` |
|
||||
| `master.affinity` | Affinity labels for pod assignment (postgresql master) | `{}` |
|
||||
| `master.tolerations` | Toleration labels for pod assignment (postgresql master) | `[]` |
|
||||
| `master.anotations` | Map of annotations to add to the statefulset (postgresql master) | `{}` |
|
||||
| `master.labels` | Map of labels to add to the statefulset (postgresql master) | `{}` |
|
||||
| `master.podAnnotations` | Map of annotations to add to the pods (postgresql master) | `{}` |
|
||||
| `master.podLabels` | Map of labels to add to the pods (postgresql master) | `{}` |
|
||||
| `master.extraVolumeMounts` | Additional volume mounts to add to the pods (postgresql master) | `[]` |
|
||||
| `master.extraVolumes` | Additional volumes to add to the pods (postgresql master) | `[]` |
|
||||
| `slave.nodeSelector` | Node labels for pod assignment (postgresql slave) | `{}` |
|
||||
| `slave.affinity` | Affinity labels for pod assignment (postgresql slave) | `{}` |
|
||||
| `slave.tolerations` | Toleration labels for pod assignment (postgresql slave) | `[]` |
|
||||
| `slave.anotations` | Map of annotations to add to the statefulsets (postgresql slave) | `{}` |
|
||||
| `slave.labels` | Map of labels to add to the statefulsets (postgresql slave) | `{}` |
|
||||
| `slave.podAnnotations` | Map of annotations to add to the pods (postgresql slave) | `{}` |
|
||||
| `slave.podLabels` | Map of labels to add to the pods (postgresql slave) | `{}` |
|
||||
| `slave.extraVolumeMounts` | Additional volume mounts to add to the pods (postgresql slave) | `[]` |
|
||||
| `slave.extraVolumes` | Additional volumes to add to the pods (postgresql slave) | `[]` |
|
||||
| `terminationGracePeriodSeconds` | Seconds the pod needs to terminate gracefully | `nil` |
|
||||
| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `250m` |
|
||||
| `securityContext.enabled` | Enable security context | `true` |
|
||||
| `securityContext.fsGroup` | Group ID for the container | `1001` |
|
||||
| `securityContext.runAsUser` | User ID for the container | `1001` |
|
||||
| `serviceAccount.enabled` | Enable service account (Note: Service Account will only be automatically created if `serviceAccount.name` is not set) | `false` |
|
||||
| `serviceAcccount.name` | Name of existing service account | `nil` |
|
||||
| `livenessProbe.enabled` | Would you like a livenessProbe to be enabled | `true` |
|
||||
| `networkPolicy.enabled` | Enable NetworkPolicy | `false` |
|
||||
| `networkPolicy.allowExternal` | Don't require client label for connections | `true` |
|
||||
| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 30 |
|
||||
| `livenessProbe.periodSeconds` | How often to perform the probe | 10 |
|
||||
| `livenessProbe.timeoutSeconds` | When the probe times out | 5 |
|
||||
| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
|
||||
| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 |
|
||||
| `readinessProbe.enabled` | would you like a readinessProbe to be enabled | `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 | 5 |
|
||||
| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
|
||||
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 |
|
||||
| `metrics.enabled` | Start a prometheus exporter | `false` |
|
||||
| `metrics.service.type` | Kubernetes Service type | `ClusterIP` |
|
||||
| `service.clusterIP` | Static clusterIP or None for headless services | `nil` |
|
||||
| `metrics.service.annotations` | Additional annotations for metrics exporter pod | `{ prometheus.io/scrape: "true", prometheus.io/port: "9187"}` |
|
||||
| `metrics.service.loadBalancerIP` | loadBalancerIP if redis metrics service type is `LoadBalancer` | `nil` |
|
||||
| `metrics.serviceMonitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` |
|
||||
| `metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |
|
||||
| `metrics.serviceMonitor.namespace` | Optional namespace in which to create ServiceMonitor | `nil` |
|
||||
| `metrics.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
|
||||
| `metrics.serviceMonitor.scrapeTimeout` | Scrape timeout. If not set, the Prometheus default scrape timeout is used | `nil` |
|
||||
| `metrics.image.registry` | PostgreSQL Image registry | `docker.io` |
|
||||
| `metrics.image.repository` | PostgreSQL Image name | `bitnami/postgres-exporter` |
|
||||
| `metrics.image.tag` | PostgreSQL Image tag | `{TAG_NAME}` |
|
||||
| `metrics.image.pullPolicy` | PostgreSQL Image pull policy | `IfNotPresent` |
|
||||
| `metrics.image.pullSecrets` | Specify Image pull secrets | `nil` (does not add image pull secrets to deployed pods) |
|
||||
| `metrics.securityContext.enabled` | Enable security context for metrics | `false` |
|
||||
| `metrics.securityContext.runAsUser` | User ID for the container for metrics | `1001` |
|
||||
| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 30 |
|
||||
| `metrics.livenessProbe.periodSeconds` | How often to perform the probe | 10 |
|
||||
| `metrics.livenessProbe.timeoutSeconds` | When the probe times out | 5 |
|
||||
| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
|
||||
| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 |
|
||||
| `metrics.readinessProbe.enabled` | would you like a readinessProbe to be enabled | `true` |
|
||||
| `metrics.readinessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 5 |
|
||||
| `metrics.readinessProbe.periodSeconds` | How often to perform the probe | 10 |
|
||||
| `metrics.readinessProbe.timeoutSeconds` | When the probe times out | 5 |
|
||||
| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
|
||||
| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 |
|
||||
| `extraEnv` | Any extra environment variables you would like to pass on to the pod. The value is evaluated as a template. | `{}` |
|
||||
| `updateStrategy` | Update strategy policy | `{type: "RollingUpdate"}` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set postgresqlPassword=secretpassword,postgresqlDatabase=my-database \
|
||||
stable/postgresql
|
||||
```
|
||||
|
||||
The above command sets the PostgreSQL `postgres` account password to `secretpassword`. Additionally it creates a database named `my-database`.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release -f values.yaml stable/postgresql
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
## 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.
|
||||
|
||||
### Production configuration and horizontal scaling
|
||||
|
||||
This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one.
|
||||
|
||||
- Enable replication:
|
||||
```diff
|
||||
- replication.enabled: false
|
||||
+ replication.enabled: true
|
||||
```
|
||||
|
||||
- Number of slaves replicas:
|
||||
```diff
|
||||
- replication.slaveReplicas: 1
|
||||
+ replication.slaveReplicas: 2
|
||||
```
|
||||
|
||||
- Set synchronous commit mode:
|
||||
```diff
|
||||
- replication.synchronousCommit: "off"
|
||||
+ replication.synchronousCommit: "on"
|
||||
```
|
||||
|
||||
- Number of replicas that will have synchronous replication:
|
||||
```diff
|
||||
- replication.numSynchronousReplicas: 0
|
||||
+ replication.numSynchronousReplicas: 1
|
||||
```
|
||||
|
||||
- Start a prometheus exporter:
|
||||
```diff
|
||||
- metrics.enabled: false
|
||||
+ metrics.enabled: true
|
||||
```
|
||||
|
||||
To horizontally scale this chart, you can use the `--replicas` flag to modify the number of nodes in your PostgreSQL deployment. Also you can use the `values-production.yaml` file or modify the parameters shown above.
|
||||
|
||||
### Change PostgreSQL version
|
||||
|
||||
To modify the PostgreSQL version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/postgresql/tags/) using the `image.tag` parameter. For example, `image.tag=12.0.0-debian-9-r0`
|
||||
|
||||
### postgresql.conf / pg_hba.conf files as configMap
|
||||
|
||||
This helm chart also supports to customize the whole configuration file.
|
||||
|
||||
Add your custom file to "files/postgresql.conf" in your working directory. This file will be mounted as configMap to the containers and it will be used for configuring the PostgreSQL server.
|
||||
|
||||
Alternatively, you can specify PostgreSQL configuration parameters using the `postgresqlConfiguration` parameter as a dict, using camelCase, e.g. {"sharedBuffers": "500MB"}.
|
||||
|
||||
In addition to these options, you can also set an external ConfigMap with all the configuration files. This is done by setting the `configurationConfigMap` parameter. Note that this will override the two previous options.
|
||||
|
||||
### Allow settings to be loaded from files other than the default `postgresql.conf`
|
||||
|
||||
If you don't want to provide the whole PostgreSQL configuration file and only specify certain parameters, you can add your extended `.conf` files to "files/conf.d/" in your working directory.
|
||||
Those files will be mounted as configMap to the containers adding/overwriting the default configuration using the `include_dir` directive that allows settings to be loaded from files other than the default `postgresql.conf`.
|
||||
|
||||
Alternatively, you can also set an external ConfigMap with all the extra configuration files. This is done by setting the `extendedConfConfigMap` parameter. Note that this will override the previous option.
|
||||
|
||||
### Initialize a fresh instance
|
||||
|
||||
The [Bitnami PostgreSQL](https://github.com/bitnami/bitnami-docker-postgresql) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap.
|
||||
|
||||
Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict.
|
||||
|
||||
In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. If your initialization scripts contain sensitive information such as credentials or passwords, you can use the `initdbScriptsSecret` parameter.
|
||||
|
||||
The allowed extensions are `.sh`, `.sql` and `.sql.gz`.
|
||||
|
||||
### Metrics
|
||||
|
||||
The chart optionally can start a metrics exporter for [prometheus](https://prometheus.io). The metrics endpoint (port 9187) is not exposed and it is expected that the metrics are collected from inside the k8s cluster using something similar as the described in the [example Prometheus scrape configuration](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml).
|
||||
|
||||
The exporter allows to create custom metrics from additional SQL queries. See the Chart's `values.yaml` for an example and consult the [exporters documentation](https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file) for more details.
|
||||
|
||||
### Use of global variables
|
||||
|
||||
In more complex scenarios, we may have the following tree of dependencies
|
||||
|
||||
```
|
||||
+--------------+
|
||||
| |
|
||||
+------------+ Chart 1 +-----------+
|
||||
| | | |
|
||||
| --------+------+ |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
v v v
|
||||
+-------+------+ +--------+------+ +--------+------+
|
||||
| | | | | |
|
||||
| PostgreSQL | | Sub-chart 1 | | Sub-chart 2 |
|
||||
| | | | | |
|
||||
+--------------+ +---------------+ +---------------+
|
||||
```
|
||||
|
||||
The three charts below depend on the parent chart Chart 1. However, subcharts 1 and 2 may need to connect to PostgreSQL as well. In order to do so, subcharts 1 and 2 need to know the PostgreSQL credentials, so one option for deploying could be deploy Chart 1 with the following parameters:
|
||||
|
||||
```
|
||||
postgresql.postgresqlPassword=testtest
|
||||
subchart1.postgresql.postgresqlPassword=testtest
|
||||
subchart2.postgresql.postgresqlPassword=testtest
|
||||
postgresql.postgresqlDatabase=db1
|
||||
subchart1.postgresql.postgresqlDatabase=db1
|
||||
subchart2.postgresql.postgresqlDatabase=db1
|
||||
```
|
||||
|
||||
If the number of dependent sub-charts increases, installing the chart with parameters can become increasingly difficult. An alternative would be to set the credentials using global variables as follows:
|
||||
|
||||
```
|
||||
global.postgresql.postgresqlPassword=testtest
|
||||
global.postgresql.postgresqlDatabase=db1
|
||||
```
|
||||
|
||||
This way, the credentials will be available in all of the subcharts.
|
||||
|
||||
## Persistence
|
||||
|
||||
The [Bitnami PostgreSQL](https://github.com/bitnami/bitnami-docker-postgresql) image stores the PostgreSQL data and configurations at the `/bitnami/postgresql` 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 [Parameters](#parameters) section to configure the PVC or to disable persistence.
|
||||
|
||||
If you already have data in it, you will fail to sync to standby nodes for all commits, details can refer to [code](https://github.com/bitnami/bitnami-docker-postgresql/blob/8725fe1d7d30ebe8d9a16e9175d05f7ad9260c93/9.6/debian-9/rootfs/libpostgresql.sh#L518-L556). If you need to use those data, please covert them to sql and import after `helm install` finished.
|
||||
|
||||
## NetworkPolicy
|
||||
|
||||
To enable network policy for PostgreSQL, install [a networking plugin that implements the Kubernetes NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin), and set `networkPolicy.enabled` to `true`.
|
||||
|
||||
For Kubernetes v1.5 & v1.6, you must also turn on NetworkPolicy by setting the DefaultDeny namespace annotation. Note: this will enforce policy for _all_ pods in the namespace:
|
||||
|
||||
```console
|
||||
$ kubectl annotate namespace default "net.beta.kubernetes.io/network-policy={\"ingress\":{\"isolation\":\"DefaultDeny\"}}"
|
||||
```
|
||||
|
||||
With NetworkPolicy enabled, traffic will be limited to just port 5432.
|
||||
|
||||
For more precise policy, set `networkPolicy.allowExternal=false`. This will only allow pods with the generated client label to connect to PostgreSQL.
|
||||
This label will be displayed in the output of a successful install.
|
||||
|
||||
## Differences between Bitnami PostgreSQL image and [Docker Official](https://hub.docker.com/_/postgres) image
|
||||
|
||||
- The Docker Official PostgreSQL image does not support replication. If you pass any replication environment variable, this would be ignored. The only environment variables supported by the Docker Official image are POSTGRES_USER, POSTGRES_DB, POSTGRES_PASSWORD, POSTGRES_INITDB_ARGS, POSTGRES_INITDB_WALDIR and PGDATA. All the remaining environment variables are specific to the Bitnami PostgreSQL image.
|
||||
- The Bitnami PostgreSQL image is non-root by default. This requires that you run the pod with `securityContext` and updates the permissions of the volume with an `initContainer`. A key benefit of this configuration is that the pod follows security best practices and is prepared to run on Kubernetes distributions with hard security constraints like OpenShift.
|
||||
|
||||
### Deploy chart using Docker Official PostgreSQL Image
|
||||
|
||||
From chart version 4.0.0, it is possible to use this chart with the Docker Official PostgreSQL image.
|
||||
Besides specifying the new Docker repository and tag, it is important to modify the PostgreSQL data directory and volume mount point. Basically, the PostgreSQL data dir cannot be the mount point directly, it has to be a subdirectory.
|
||||
|
||||
```
|
||||
helm install --name postgres \
|
||||
--set image.repository=postgres \
|
||||
--set image.tag=10.6 \
|
||||
--set postgresqlDataDir=/data/pgdata \
|
||||
--set persistence.mountPath=/data/ \
|
||||
stable/postgresql
|
||||
```
|
||||
|
||||
## Upgrade
|
||||
|
||||
It's necessary to specify the existing passwords while performing an upgrade to ensure the secrets are not updated with invalid randomly generated passwords. Remember to specify the existing values of the `postgresqlPassword` and `replication.password` parameters when upgrading the chart:
|
||||
|
||||
```bash
|
||||
$ helm upgrade my-release bitnami/influxdb \
|
||||
--set postgresqlPassword=[POSTGRESQL_PASSWORD] \
|
||||
--set replication.password=[REPLICATION_PASSWORD]
|
||||
```
|
||||
|
||||
> Note: you need to substitute the placeholders _[POSTGRESQL_PASSWORD]_, and _[REPLICATION_PASSWORD]_ with the values obtained from instructions in the installation notes.
|
||||
|
||||
## 7.0.0
|
||||
|
||||
Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec.
|
||||
|
||||
In https://github.com/helm/charts/pull/17281 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage.
|
||||
|
||||
This major version bump signifies this change.
|
||||
|
||||
## 5.0.0
|
||||
|
||||
In this version, the **chart is using PostgreSQL 11 instead of PostgreSQL 10**. You can find the main difference and notable changes in the following links: [https://www.postgresql.org/about/news/1894/](https://www.postgresql.org/about/news/1894/) and [https://www.postgresql.org/about/featurematrix/](https://www.postgresql.org/about/featurematrix/).
|
||||
|
||||
For major releases of PostgreSQL, the internal data storage format is subject to change, thus complicating upgrades, you can see some errors like the following one in the logs:
|
||||
|
||||
```bash
|
||||
Welcome to the Bitnami postgresql container
|
||||
Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-postgresql
|
||||
Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-postgresql/issues
|
||||
Send us your feedback at containers@bitnami.com
|
||||
|
||||
INFO ==> ** Starting PostgreSQL setup **
|
||||
NFO ==> Validating settings in POSTGRESQL_* env vars..
|
||||
INFO ==> Initializing PostgreSQL database...
|
||||
INFO ==> postgresql.conf file not detected. Generating it...
|
||||
INFO ==> pg_hba.conf file not detected. Generating it...
|
||||
INFO ==> Deploying PostgreSQL with persisted data...
|
||||
INFO ==> Configuring replication parameters
|
||||
INFO ==> Loading custom scripts...
|
||||
INFO ==> Enabling remote connections
|
||||
INFO ==> Stopping PostgreSQL...
|
||||
INFO ==> ** PostgreSQL setup finished! **
|
||||
|
||||
INFO ==> ** Starting PostgreSQL **
|
||||
[1] FATAL: database files are incompatible with server
|
||||
[1] DETAIL: The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 11.3.
|
||||
```
|
||||
In this case, you should migrate the data from the old chart to the new one following an approach similar to that described in [this section](https://www.postgresql.org/docs/current/upgrading.html#UPGRADING-VIA-PGDUMPALL) from the official documentation. Basically, create a database dump in the old chart, move and restore it in the new one.
|
||||
|
||||
### 4.0.0
|
||||
|
||||
This chart will use by default the Bitnami PostgreSQL container starting from version `10.7.0-r68`. This version moves the initialization logic from node.js to bash. This new version of the chart requires setting the `POSTGRES_PASSWORD` in the slaves as well, in order to properly configure the `pg_hba.conf` file. Users from previous versions of the chart are advised to upgrade immediately.
|
||||
|
||||
IMPORTANT: If you do not want to upgrade the chart version then make sure you use the `10.7.0-r68` version of the container. Otherwise, you will get this error
|
||||
|
||||
```
|
||||
The POSTGRESQL_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development
|
||||
```
|
||||
|
||||
### 3.0.0
|
||||
|
||||
This releases make it possible to specify different nodeSelector, affinity and tolerations for master and slave pods.
|
||||
It also fixes an issue with `postgresql.master.fullname` helper template not obeying fullnameOverride.
|
||||
|
||||
#### Breaking changes
|
||||
|
||||
- `affinty` has been renamed to `master.affinity` and `slave.affinity`.
|
||||
- `tolerations` has been renamed to `master.tolerations` and `slave.tolerations`.
|
||||
- `nodeSelector` has been renamed to `master.nodeSelector` and `slave.nodeSelector`.
|
||||
|
||||
### 2.0.0
|
||||
|
||||
In order to upgrade from the `0.X.X` branch to `1.X.X`, you should follow the below steps:
|
||||
|
||||
- Obtain the service name (`SERVICE_NAME`) and password (`OLD_PASSWORD`) of the existing postgresql chart. You can find the instructions to obtain the password in the NOTES.txt, the service name can be obtained by running
|
||||
|
||||
```console
|
||||
$ kubectl get svc
|
||||
```
|
||||
|
||||
- Install (not upgrade) the new version
|
||||
|
||||
```console
|
||||
$ helm repo update
|
||||
$ helm install --name my-release stable/postgresql
|
||||
```
|
||||
|
||||
- Connect to the new pod (you can obtain the name by running `kubectl get pods`):
|
||||
|
||||
```console
|
||||
$ kubectl exec -it NAME bash
|
||||
```
|
||||
|
||||
- Once logged in, create a dump file from the previous database using `pg_dump`, for that we should connect to the previous postgresql chart:
|
||||
|
||||
```console
|
||||
$ pg_dump -h SERVICE_NAME -U postgres DATABASE_NAME > /tmp/backup.sql
|
||||
```
|
||||
|
||||
After run above command you should be prompted for a password, this password is the previous chart password (`OLD_PASSWORD`).
|
||||
This operation could take some time depending on the database size.
|
||||
|
||||
- Once you have the backup file, you can restore it with a command like the one below:
|
||||
|
||||
```console
|
||||
$ psql -U postgres DATABASE_NAME < /tmp/backup.sql
|
||||
```
|
||||
|
||||
In this case, you are accessing to the local postgresql, so the password should be the new one (you can find it in NOTES.txt).
|
||||
|
||||
If you want to restore the database and the database schema does not exist, it is necessary to first follow the steps described below.
|
||||
|
||||
```console
|
||||
$ psql -U postgres
|
||||
postgres=# drop database DATABASE_NAME;
|
||||
postgres=# create database DATABASE_NAME;
|
||||
postgres=# create user USER_NAME;
|
||||
postgres=# alter role USER_NAME with password 'BITNAMI_USER_PASSWORD';
|
||||
postgres=# grant all privileges on database DATABASE_NAME to USER_NAME;
|
||||
postgres=# alter database DATABASE_NAME owner to USER_NAME;
|
||||
```
|
||||
@@ -1 +0,0 @@
|
||||
Copy here your postgresql.conf and/or pg_hba.conf files to use it as a config map.
|
||||
@@ -1,4 +0,0 @@
|
||||
If you don't want to provide the whole configuration file and only specify certain parameters, you can copy here your extended `.conf` files.
|
||||
These files will be injected as a config maps and add/overwrite the default configuration using the `include_dir` directive that allows settings to be loaded from files other than the default `postgresql.conf`.
|
||||
|
||||
More info in the [bitnami-docker-postgresql README](https://github.com/bitnami/bitnami-docker-postgresql#configuration-file).
|
||||
@@ -1,3 +0,0 @@
|
||||
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-postgresql](https://github.com/bitnami/bitnami-docker-postgresql#initializing-a-new-instance) repository.
|
||||
@@ -1,50 +0,0 @@
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
PostgreSQL can be accessed via port {{ template "postgresql.port" . }} on the following DNS name from within your cluster:
|
||||
|
||||
{{ template "postgresql.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - Read/Write connection
|
||||
{{- if .Values.replication.enabled }}
|
||||
{{ template "postgresql.fullname" . }}-read.{{ .Release.Namespace }}.svc.cluster.local - Read only connection
|
||||
{{- end }}
|
||||
To get the password for "{{ template "postgresql.username" . }}" run:
|
||||
|
||||
export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "postgresql.secretName" . }} -o jsonpath="{.data.postgresql-password}" | base64 --decode)
|
||||
|
||||
To connect to your database run the following command:
|
||||
|
||||
kubectl run {{ template "postgresql.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ .Release.Namespace }} --image {{ template "postgresql.image" . }} --env="PGPASSWORD=$POSTGRES_PASSWORD" {{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}
|
||||
--labels="{{ template "postgresql.fullname" . }}-client=true" {{- end }} --command -- psql --host {{ template "postgresql.fullname" . }} -U {{ .Values.postgresqlUsername }}{{- if .Values.postgresqlDatabase }} -d {{ .Values.postgresqlDatabase }}{{- end }} -p {{ template "postgresql.port" . }}
|
||||
|
||||
{{ if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}
|
||||
Note: Since NetworkPolicy is enabled, only pods with label {{ template "postgresql.fullname" . }}-client=true" will be able to connect to this PostgreSQL cluster.
|
||||
{{- end }}
|
||||
|
||||
To connect to your database 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 {{ template "postgresql.fullname" . }})
|
||||
{{ if (include "postgresql.password" . ) }}PGPASSWORD="$POSTGRES_PASSWORD" {{ end }}psql --host $NODE_IP --port $NODE_PORT -U {{ .Values.postgresqlUsername }}{{- if .Values.postgresqlDatabase }} -d {{ .Values.postgresqlDatabase }}{{- end }}
|
||||
|
||||
{{- 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 {{ template "postgresql.fullname" . }}'
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "postgresql.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
{{ if (include "postgresql.password" . ) }}PGPASSWORD="$POSTGRES_PASSWORD" {{ end }}psql --host $SERVICE_IP --port {{ template "postgresql.port" . }} -U {{ .Values.postgresqlUsername }}{{- if .Values.postgresqlDatabase }} -d {{ .Values.postgresqlDatabase }}{{- end }}
|
||||
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
|
||||
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "postgresql.fullname" . }} {{ template "postgresql.port" . }}:{{ template "postgresql.port" . }} &
|
||||
{{ if (include "postgresql.password" . ) }}PGPASSWORD="$POSTGRES_PASSWORD" {{ end }}psql --host 127.0.0.1 -U {{ .Values.postgresqlUsername }}{{- if .Values.postgresqlDatabase }} -d {{ .Values.postgresqlDatabase }}{{- end }} -p {{ template "postgresql.port" . }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}
|
||||
|
||||
WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
|
||||
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
|
||||
|
||||
{{- end }}
|
||||
@@ -1,374 +0,0 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "postgresql.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 "postgresql.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "postgresql.master.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- $fullname := default (printf "%s-%s" .Release.Name $name) .Values.fullnameOverride -}}
|
||||
{{- if .Values.replication.enabled -}}
|
||||
{{- printf "%s-%s" $fullname "master" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" $fullname | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for networkpolicy.
|
||||
*/}}
|
||||
{{- define "postgresql.networkPolicy.apiVersion" -}}
|
||||
{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
"extensions/v1beta1"
|
||||
{{- else if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
"networking.k8s.io/v1"
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "postgresql.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper PostgreSQL image name
|
||||
*/}}
|
||||
{{- define "postgresql.image" -}}
|
||||
{{- $registryName := .Values.image.registry -}}
|
||||
{{- $repositoryName := .Values.image.repository -}}
|
||||
{{- $tag := .Values.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return PostgreSQL password
|
||||
*/}}
|
||||
{{- define "postgresql.password" -}}
|
||||
{{- if .Values.global.postgresql.postgresqlPassword }}
|
||||
{{- .Values.global.postgresql.postgresqlPassword -}}
|
||||
{{- else if .Values.postgresqlPassword -}}
|
||||
{{- .Values.postgresqlPassword -}}
|
||||
{{- else -}}
|
||||
{{- randAlphaNum 10 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return PostgreSQL replication password
|
||||
*/}}
|
||||
{{- define "postgresql.replication.password" -}}
|
||||
{{- if .Values.global.postgresql.replicationPassword }}
|
||||
{{- .Values.global.postgresql.replicationPassword -}}
|
||||
{{- else if .Values.replication.password -}}
|
||||
{{- .Values.replication.password -}}
|
||||
{{- else -}}
|
||||
{{- randAlphaNum 10 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return PostgreSQL username
|
||||
*/}}
|
||||
{{- define "postgresql.username" -}}
|
||||
{{- if .Values.global.postgresql.postgresqlUsername }}
|
||||
{{- .Values.global.postgresql.postgresqlUsername -}}
|
||||
{{- else -}}
|
||||
{{- .Values.postgresqlUsername -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Return PostgreSQL replication username
|
||||
*/}}
|
||||
{{- define "postgresql.replication.username" -}}
|
||||
{{- if .Values.global.postgresql.replicationUser }}
|
||||
{{- .Values.global.postgresql.replicationUser -}}
|
||||
{{- else -}}
|
||||
{{- .Values.replication.user -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return PostgreSQL port
|
||||
*/}}
|
||||
{{- define "postgresql.port" -}}
|
||||
{{- if .Values.global.postgresql.servicePort }}
|
||||
{{- .Values.global.postgresql.servicePort -}}
|
||||
{{- else -}}
|
||||
{{- .Values.service.port -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return PostgreSQL created database
|
||||
*/}}
|
||||
{{- define "postgresql.database" -}}
|
||||
{{- if .Values.global.postgresql.postgresqlDatabase }}
|
||||
{{- .Values.global.postgresql.postgresqlDatabase -}}
|
||||
{{- else if .Values.postgresqlDatabase -}}
|
||||
{{- .Values.postgresqlDatabase -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name to change the volume permissions
|
||||
*/}}
|
||||
{{- define "postgresql.volumePermissions.image" -}}
|
||||
{{- $registryName := .Values.volumePermissions.image.registry -}}
|
||||
{{- $repositoryName := .Values.volumePermissions.image.repository -}}
|
||||
{{- $tag := .Values.volumePermissions.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper PostgreSQL metrics image name
|
||||
*/}}
|
||||
{{- define "postgresql.metrics.image" -}}
|
||||
{{- $registryName := default "docker.io" .Values.metrics.image.registry -}}
|
||||
{{- $repositoryName := .Values.metrics.image.repository -}}
|
||||
{{- $tag := default "latest" .Values.metrics.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the password secret.
|
||||
*/}}
|
||||
{{- define "postgresql.secretName" -}}
|
||||
{{- if .Values.global.postgresql.existingSecret }}
|
||||
{{- printf "%s" .Values.global.postgresql.existingSecret -}}
|
||||
{{- else if .Values.existingSecret -}}
|
||||
{{- printf "%s" .Values.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (include "postgresql.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return true if a secret object should be created
|
||||
*/}}
|
||||
{{- define "postgresql.createSecret" -}}
|
||||
{{- if .Values.global.postgresql.existingSecret }}
|
||||
{{- else if .Values.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the configuration ConfigMap name.
|
||||
*/}}
|
||||
{{- define "postgresql.configurationCM" -}}
|
||||
{{- if .Values.configurationConfigMap -}}
|
||||
{{- printf "%s" (tpl .Values.configurationConfigMap $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-configuration" (include "postgresql.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the extended configuration ConfigMap name.
|
||||
*/}}
|
||||
{{- define "postgresql.extendedConfigurationCM" -}}
|
||||
{{- if .Values.extendedConfConfigMap -}}
|
||||
{{- printf "%s" (tpl .Values.extendedConfConfigMap $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-extended-configuration" (include "postgresql.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the initialization scripts ConfigMap name.
|
||||
*/}}
|
||||
{{- define "postgresql.initdbScriptsCM" -}}
|
||||
{{- if .Values.initdbScriptsConfigMap -}}
|
||||
{{- printf "%s" (tpl .Values.initdbScriptsConfigMap $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-init-scripts" (include "postgresql.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the initialization scripts Secret name.
|
||||
*/}}
|
||||
{{- define "postgresql.initdbScriptsSecret" -}}
|
||||
{{- printf "%s" (tpl .Values.initdbScriptsSecret $) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "postgresql.imagePullSecrets" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
Also, we can not use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.volumePermissions.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.volumePermissions.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the readiness probe command
|
||||
*/}}
|
||||
{{- define "postgresql.readinessProbeCommand" -}}
|
||||
- |
|
||||
{{- if (include "postgresql.database" .) }}
|
||||
pg_isready -U {{ include "postgresql.username" . | quote }} -d {{ (include "postgresql.database" .) | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }}
|
||||
{{- else }}
|
||||
pg_isready -U {{ include "postgresql.username" . | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }}
|
||||
{{- end }}
|
||||
{{- if contains "bitnami/" .Values.image.repository }}
|
||||
[ -f /opt/bitnami/postgresql/tmp/.initialized ]
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Storage Class
|
||||
*/}}
|
||||
{{- define "postgresql.storageClass" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
*/}}
|
||||
{{- if .Values.global -}}
|
||||
{{- if .Values.global.storageClass -}}
|
||||
{{- if (eq "-" .Values.global.storageClass) -}}
|
||||
{{- printf "storageClassName: \"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "storageClassName: %s" .Values.global.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.persistence.storageClass -}}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) -}}
|
||||
{{- printf "storageClassName: \"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "storageClassName: %s" .Values.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.persistence.storageClass -}}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) -}}
|
||||
{{- printf "storageClassName: \"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "storageClassName: %s" .Values.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "postgresql.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "postgresql.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for statefulset.
|
||||
*/}}
|
||||
{{- define "postgresql.statefulset.apiVersion" -}}
|
||||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "apps/v1beta2" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,26 +0,0 @@
|
||||
{{ if and (or (.Files.Glob "files/postgresql.conf") (.Files.Glob "files/pg_hba.conf") .Values.postgresqlConfiguration .Values.pgHbaConfiguration) (not .Values.configurationConfigMap) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}-configuration
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
data:
|
||||
{{- if (.Files.Glob "files/postgresql.conf") }}
|
||||
{{ (.Files.Glob "files/postgresql.conf").AsConfig | indent 2 }}
|
||||
{{- else if .Values.postgresqlConfiguration }}
|
||||
postgresql.conf: |
|
||||
{{- range $key, $value := default dict .Values.postgresqlConfiguration }}
|
||||
{{ $key | snakecase }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if (.Files.Glob "files/pg_hba.conf") }}
|
||||
{{ (.Files.Glob "files/pg_hba.conf").AsConfig | indent 2 }}
|
||||
{{- else if .Values.pgHbaConfiguration }}
|
||||
pg_hba.conf: |
|
||||
{{ .Values.pgHbaConfiguration | indent 4 }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
@@ -1,21 +0,0 @@
|
||||
{{- if and (or (.Files.Glob "files/conf.d/*.conf") .Values.postgresqlExtendedConf) (not .Values.extendedConfConfigMap)}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}-extended-configuration
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
data:
|
||||
{{- with .Files.Glob "files/conf.d/*.conf" }}
|
||||
{{ .AsConfig | indent 2 }}
|
||||
{{- end }}
|
||||
{{ with .Values.postgresqlExtendedConf }}
|
||||
override.conf: |
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key | snakecase }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,24 +0,0 @@
|
||||
{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}-init-scripts
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
{{- with .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }}
|
||||
binaryData:
|
||||
{{- range $path, $bytes := . }}
|
||||
{{ base $path }}: {{ $.Files.Get $path | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
data:
|
||||
{{- with .Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}" }}
|
||||
{{ .AsConfig | indent 2 }}
|
||||
{{- end }}
|
||||
{{- with .Values.initdbScripts }}
|
||||
{{ toYaml . | indent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,26 +0,0 @@
|
||||
{{- if .Values.metrics.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}-metrics
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
annotations:
|
||||
{{ toYaml .Values.metrics.service.annotations | indent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.metrics.service.type }}
|
||||
{{- if and (eq .Values.metrics.service.type "LoadBalancer") .Values.metrics.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.metrics.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
port: 9187
|
||||
targetPort: metrics
|
||||
selector:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
role: master
|
||||
{{- end }}
|
||||
@@ -1,34 +0,0 @@
|
||||
{{- if .Values.networkPolicy.enabled }}
|
||||
kind: NetworkPolicy
|
||||
apiVersion: {{ template "postgresql.networkPolicy.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
ingress:
|
||||
# Allow inbound connections
|
||||
- ports:
|
||||
- port: {{ template "postgresql.port" . }}
|
||||
{{- if not .Values.networkPolicy.allowExternal }}
|
||||
from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
{{ template "postgresql.fullname" . }}-client: "true"
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: slave
|
||||
{{- end }}
|
||||
# Allow prometheus scrapes
|
||||
- ports:
|
||||
- port: 9187
|
||||
{{- end }}
|
||||
@@ -1,17 +0,0 @@
|
||||
{{- if (include "postgresql.createSecret" .) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
type: Opaque
|
||||
data:
|
||||
postgresql-password: {{ include "postgresql.password" . | b64enc | quote }}
|
||||
{{- if .Values.replication.enabled }}
|
||||
postgresql-replication-password: {{ include "postgresql.replication.password" . | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -1,11 +0,0 @@
|
||||
{{- if and (.Values.serviceAccount.enabled) (not .Values.serviceAccount.name) }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
{{- end }}
|
||||
@@ -1,33 +0,0 @@
|
||||
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "postgresql.fullname" . }}
|
||||
{{- if .Values.metrics.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
|
||||
{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
endpoints:
|
||||
- port: metrics
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
@@ -1,247 +0,0 @@
|
||||
{{- if .Values.replication.enabled }}
|
||||
apiVersion: {{ template "postgresql.statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ template "postgresql.fullname" . }}-slave"
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
{{- with .Values.slave.labels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.slave.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
serviceName: {{ template "postgresql.fullname" . }}-headless
|
||||
replicas: {{ .Values.replication.slaveReplicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: slave
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
role: slave
|
||||
{{- with .Values.slave.podLabels }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.slave.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: "{{ .Values.schedulerName }}"
|
||||
{{- end }}
|
||||
{{- include "postgresql.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.slave.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.slave.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.slave.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.slave.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.slave.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.slave.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceAccount.enabled }}
|
||||
serviceAccountName: {{ default (include "postgresql.fullname" . ) .Values.serviceAccount.name}}
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
|
||||
initContainers:
|
||||
- name: init-chmod-data
|
||||
image: {{ template "postgresql.volumePermissions.image" . }}
|
||||
imagePullPolicy: "{{ .Values.volumePermissions.image.pullPolicy }}"
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p {{ .Values.persistence.mountPath }}/data
|
||||
chmod 700 {{ .Values.persistence.mountPath }}/data
|
||||
find {{ .Values.persistence.mountPath }} -mindepth 0 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | \
|
||||
xargs chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.volumePermissions.securityContext.runAsUser }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: {{ .Values.persistence.mountPath }}
|
||||
subPath: {{ .Values.persistence.subPath }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "postgresql.fullname" . }}
|
||||
image: {{ template "postgresql.image" . }}
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: POSTGRESQL_VOLUME_DIR
|
||||
value: "{{ .Values.persistence.mountPath }}"
|
||||
- name: POSTGRESQL_PORT_NUMBER
|
||||
value: "{{ template "postgresql.port" . }}"
|
||||
{{- if .Values.persistence.mountPath }}
|
||||
- name: PGDATA
|
||||
value: {{ .Values.postgresqlDataDir | quote }}
|
||||
{{- end }}
|
||||
- name: POSTGRES_REPLICATION_MODE
|
||||
value: "slave"
|
||||
- name: POSTGRES_REPLICATION_USER
|
||||
value: {{ include "postgresql.replication.username" . | quote }}
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: POSTGRES_REPLICATION_PASSWORD_FILE
|
||||
value: "/opt/bitnami/postgresql/secrets/postgresql-replication-password"
|
||||
{{- else }}
|
||||
- name: POSTGRES_REPLICATION_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "postgresql.secretName" . }}
|
||||
key: postgresql-replication-password
|
||||
{{- end }}
|
||||
- name: POSTGRES_CLUSTER_APP_NAME
|
||||
value: {{ .Values.replication.applicationName }}
|
||||
- name: POSTGRES_MASTER_HOST
|
||||
value: {{ template "postgresql.fullname" . }}
|
||||
- name: POSTGRES_MASTER_PORT_NUMBER
|
||||
value: {{ include "postgresql.port" . | quote }}
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: POSTGRES_PASSWORD_FILE
|
||||
value: "/opt/bitnami/postgresql/secrets/postgresql-password"
|
||||
{{- else }}
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "postgresql.secretName" . }}
|
||||
key: postgresql-password
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: postgresql
|
||||
containerPort: {{ template "postgresql.port" . }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
{{- if (include "postgresql.database" .) }}
|
||||
- exec pg_isready -U {{ include "postgresql.username" . | quote }} -d {{ (include "postgresql.database" .) | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }}
|
||||
{{- else }}
|
||||
- exec pg_isready -U {{ include "postgresql.username" . | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }}
|
||||
{{- end }}
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- -e
|
||||
{{- include "postgresql.readinessProbeCommand" . | nindent 16 }}
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: postgresql-password
|
||||
mountPath: /opt/bitnami/postgresql/secrets/
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
- name: data
|
||||
mountPath: {{ .Values.persistence.mountPath }}
|
||||
subPath: {{ .Values.persistence.subPath }}
|
||||
{{ end }}
|
||||
{{- if or (.Files.Glob "files/conf.d/*.conf") .Values.postgresqlExtendedConf .Values.extendedConfConfigMap }}
|
||||
- name: postgresql-extended-config
|
||||
mountPath: /bitnami/postgresql/conf/conf.d/
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/postgresql.conf") (.Files.Glob "files/pg_hba.conf") .Values.postgresqlConfiguration .Values.pgHbaConfiguration .Values.configurationConfigMap }}
|
||||
- name: postgresql-config
|
||||
mountPath: /bitnami/postgresql/conf
|
||||
{{- end }}
|
||||
{{- if .Values.slave.extraVolumeMounts }}
|
||||
{{- toYaml .Values.slave.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: postgresql-password
|
||||
secret:
|
||||
secretName: {{ template "postgresql.secretName" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/postgresql.conf") (.Files.Glob "files/pg_hba.conf") .Values.postgresqlConfiguration .Values.pgHbaConfiguration .Values.configurationConfigMap}}
|
||||
- name: postgresql-config
|
||||
configMap:
|
||||
name: {{ template "postgresql.configurationCM" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/conf.d/*.conf") .Values.postgresqlExtendedConf .Values.extendedConfConfigMap }}
|
||||
- name: postgresql-extended-config
|
||||
configMap:
|
||||
name: {{ template "postgresql.extendedConfigurationCM" . }}
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.slave.extraVolumes }}
|
||||
{{- toYaml .Values.slave.extraVolumes | nindent 8 }}
|
||||
{{- end }}
|
||||
updateStrategy:
|
||||
type: {{ .Values.updateStrategy.type }}
|
||||
{{- if (eq "Recreate" .Values.updateStrategy.type) }}
|
||||
rollingUpdate: null
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
{{- with .Values.persistence.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "postgresql.storageClass" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,355 +0,0 @@
|
||||
apiVersion: {{ template "postgresql.statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ template "postgresql.master.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
{{- with .Values.master.labels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.master.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
serviceName: {{ template "postgresql.fullname" . }}-headless
|
||||
replicas: 1
|
||||
updateStrategy:
|
||||
type: {{ .Values.updateStrategy.type }}
|
||||
{{- if (eq "Recreate" .Values.updateStrategy.type) }}
|
||||
rollingUpdate: null
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: master
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
role: master
|
||||
{{- with .Values.master.podLabels }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.master.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: "{{ .Values.schedulerName }}"
|
||||
{{- end }}
|
||||
{{- include "postgresql.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.master.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.master.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.master.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.master.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceAccount.enabled }}
|
||||
serviceAccountName: {{ default (include "postgresql.fullname" . ) .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
|
||||
initContainers:
|
||||
- name: init-chmod-data
|
||||
image: {{ template "postgresql.volumePermissions.image" . }}
|
||||
imagePullPolicy: "{{ .Values.volumePermissions.image.pullPolicy }}"
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p {{ .Values.persistence.mountPath }}/data
|
||||
chmod 700 {{ .Values.persistence.mountPath }}/data
|
||||
find {{ .Values.persistence.mountPath }} -mindepth 0 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | \
|
||||
xargs chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.volumePermissions.securityContext.runAsUser }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: {{ .Values.persistence.mountPath }}
|
||||
subPath: {{ .Values.persistence.subPath }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "postgresql.fullname" . }}
|
||||
image: {{ template "postgresql.image" . }}
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: POSTGRESQL_PORT_NUMBER
|
||||
value: "{{ template "postgresql.port" . }}"
|
||||
- name: POSTGRESQL_VOLUME_DIR
|
||||
value: "{{ .Values.persistence.mountPath }}"
|
||||
{{- if .Values.postgresqlInitdbArgs }}
|
||||
- name: POSTGRES_INITDB_ARGS
|
||||
value: {{ .Values.postgresqlInitdbArgs | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.postgresqlInitdbWalDir }}
|
||||
- name: POSTGRES_INITDB_WALDIR
|
||||
value: {{ .Values.postgresqlInitdbWalDir | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.initdbUser }}
|
||||
- name: POSTGRESQL_INITSCRIPTS_USERNAME
|
||||
value: {{ .Values.initdbUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.initdbPassword }}
|
||||
- name: POSTGRESQL_INITSCRIPTS_PASSWORD
|
||||
value: .Values.initdbPassword
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.mountPath }}
|
||||
- name: PGDATA
|
||||
value: {{ .Values.postgresqlDataDir | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.replication.enabled }}
|
||||
- name: POSTGRES_REPLICATION_MODE
|
||||
value: "master"
|
||||
- name: POSTGRES_REPLICATION_USER
|
||||
value: {{ include "postgresql.replication.username" . | quote }}
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: POSTGRES_REPLICATION_PASSWORD_FILE
|
||||
value: "/opt/bitnami/postgresql/secrets/postgresql-replication-password"
|
||||
{{- else }}
|
||||
- name: POSTGRES_REPLICATION_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "postgresql.secretName" . }}
|
||||
key: postgresql-replication-password
|
||||
{{- end }}
|
||||
{{- if not (eq .Values.replication.synchronousCommit "off")}}
|
||||
- name: POSTGRES_SYNCHRONOUS_COMMIT_MODE
|
||||
value: {{ .Values.replication.synchronousCommit | quote }}
|
||||
- name: POSTGRES_NUM_SYNCHRONOUS_REPLICAS
|
||||
value: {{ .Values.replication.numSynchronousReplicas | quote }}
|
||||
{{- end }}
|
||||
- name: POSTGRES_CLUSTER_APP_NAME
|
||||
value: {{ .Values.replication.applicationName }}
|
||||
{{- end }}
|
||||
- name: POSTGRES_USER
|
||||
value: {{ include "postgresql.username" . | quote }}
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: POSTGRES_PASSWORD_FILE
|
||||
value: "/opt/bitnami/postgresql/secrets/postgresql-password"
|
||||
{{- else }}
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "postgresql.secretName" . }}
|
||||
key: postgresql-password
|
||||
{{- end }}
|
||||
{{- if (include "postgresql.database" .) }}
|
||||
- name: POSTGRES_DB
|
||||
value: {{ (include "postgresql.database" .) | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnv }}
|
||||
{{- include "postgresql.tplValue" (dict "value" .Values.extraEnv "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: postgresql
|
||||
containerPort: {{ template "postgresql.port" . }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
{{- if (include "postgresql.database" .) }}
|
||||
- exec pg_isready -U {{ include "postgresql.username" . | quote }} -d {{ (include "postgresql.database" .) | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }}
|
||||
{{- else }}
|
||||
- exec pg_isready -U {{ include "postgresql.username" . | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }}
|
||||
{{- end }}
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- -e
|
||||
{{- include "postgresql.readinessProbeCommand" . | nindent 16 }}
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }}
|
||||
- name: custom-init-scripts
|
||||
mountPath: /docker-entrypoint-initdb.d/
|
||||
{{- end }}
|
||||
{{- if .Values.initdbScriptsSecret }}
|
||||
- name: custom-init-scripts-secret
|
||||
mountPath: /docker-entrypoint-initdb.d/secret
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/conf.d/*.conf") .Values.postgresqlExtendedConf .Values.extendedConfConfigMap }}
|
||||
- name: postgresql-extended-config
|
||||
mountPath: /bitnami/postgresql/conf/conf.d/
|
||||
{{- end }}
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: postgresql-password
|
||||
mountPath: /opt/bitnami/postgresql/secrets/
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
- name: data
|
||||
mountPath: {{ .Values.persistence.mountPath }}
|
||||
subPath: {{ .Values.persistence.subPath }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/postgresql.conf") (.Files.Glob "files/pg_hba.conf") .Values.postgresqlConfiguration .Values.pgHbaConfiguration .Values.configurationConfigMap }}
|
||||
- name: postgresql-config
|
||||
mountPath: /bitnami/postgresql/conf
|
||||
{{- end }}
|
||||
{{- if .Values.master.extraVolumeMounts }}
|
||||
{{- toYaml .Values.master.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ template "postgresql.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
{{- if .Values.metrics.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.metrics.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- $database := required "In order to enable metrics you need to specify a database (.Values.postgresqlDatabase or .Values.global.postgresql.postgresqlDatabase)" (include "postgresql.database" .) }}
|
||||
- name: DATA_SOURCE_URI
|
||||
value: {{ printf "127.0.0.1:%d/%s?sslmode=disable" (int (include "postgresql.port" .)) $database | quote }}
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: DATA_SOURCE_PASS_FILE
|
||||
value: "/opt/bitnami/postgresql/secrets/postgresql-password"
|
||||
{{- else }}
|
||||
- name: DATA_SOURCE_PASS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "postgresql.secretName" . }}
|
||||
key: postgresql-password
|
||||
{{- end }}
|
||||
- name: DATA_SOURCE_USER
|
||||
value: {{ template "postgresql.username" . }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: metrics
|
||||
initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: metrics
|
||||
initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: postgresql-password
|
||||
mountPath: /opt/bitnami/postgresql/secrets/
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9187
|
||||
{{- if .Values.metrics.resources }}
|
||||
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if or (.Files.Glob "files/postgresql.conf") (.Files.Glob "files/pg_hba.conf") .Values.postgresqlConfiguration .Values.pgHbaConfiguration .Values.configurationConfigMap}}
|
||||
- name: postgresql-config
|
||||
configMap:
|
||||
name: {{ template "postgresql.configurationCM" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/conf.d/*.conf") .Values.postgresqlExtendedConf .Values.extendedConfConfigMap }}
|
||||
- name: postgresql-extended-config
|
||||
configMap:
|
||||
name: {{ template "postgresql.extendedConfigurationCM" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.usePasswordFile }}
|
||||
- name: postgresql-password
|
||||
secret:
|
||||
secretName: {{ template "postgresql.secretName" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }}
|
||||
- name: custom-init-scripts
|
||||
configMap:
|
||||
name: {{ template "postgresql.initdbScriptsCM" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.initdbScriptsSecret }}
|
||||
- name: custom-init-scripts-secret
|
||||
secret:
|
||||
secretName: {{ template "postgresql.initdbScriptsSecret" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.extraVolumes }}
|
||||
{{- toYaml .Values.master.extraVolumes | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
{{- with .Values.persistence.existingClaim }}
|
||||
claimName: {{ tpl . $ }}
|
||||
{{- end }}
|
||||
{{- else if not .Values.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
{{- with .Values.persistence.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "postgresql.storageClass" . }}
|
||||
{{- end }}
|
||||
@@ -1,19 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}-headless
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: postgresql
|
||||
port: {{ template "postgresql.port" . }}
|
||||
targetPort: postgresql
|
||||
selector:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
@@ -1,31 +0,0 @@
|
||||
{{- if .Values.replication.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}-read
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: postgresql
|
||||
port: {{ template "postgresql.port" . }}
|
||||
targetPort: postgresql
|
||||
{{- if .Values.service.nodePort }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: slave
|
||||
{{- end }}
|
||||
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
chart: {{ template "postgresql.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{ tpl (toYaml .) $ | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ with .Values.service.loadBalancerSourceRanges }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }}
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: postgresql
|
||||
port: {{ template "postgresql.port" . }}
|
||||
targetPort: postgresql
|
||||
{{- if .Values.service.nodePort }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "postgresql.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: master
|
||||
@@ -1,392 +0,0 @@
|
||||
## 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:
|
||||
postgresql: {}
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
|
||||
## Bitnami PostgreSQL image version
|
||||
## ref: https://hub.docker.com/r/bitnami/postgresql/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgresql
|
||||
tag: 11.5.0-debian-9-r84
|
||||
## 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
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## It turns BASH and NAMI debugging in minideb
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
debug: false
|
||||
|
||||
## String to partially override postgresql.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override postgresql.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
##
|
||||
## Init containers parameters:
|
||||
## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: true
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
tag: stretch
|
||||
## 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: 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 container Security Context
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
|
||||
## Use an alternate scheduler, e.g. "stork".
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
# schedulerName:
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Pod Service Account
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
## Name of an already existing service account. Setting this value disables the automatic service account creation.
|
||||
# name:
|
||||
|
||||
replication:
|
||||
enabled: true
|
||||
user: repl_user
|
||||
password: repl_password
|
||||
slaveReplicas: 2
|
||||
## Set synchronous commit mode: on, off, remote_apply, remote_write and local
|
||||
## ref: https://www.postgresql.org/docs/9.6/runtime-config-wal.html#GUC-WAL-LEVEL
|
||||
synchronousCommit: "on"
|
||||
## From the number of `slaveReplicas` defined above, set the number of those that will have synchronous replication
|
||||
## NOTE: It cannot be > slaveReplicas
|
||||
numSynchronousReplicas: 1
|
||||
## Replication Cluster application name. Useful for defining multiple replication policies
|
||||
applicationName: my_application
|
||||
|
||||
## PostgreSQL admin user
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
postgresqlUsername: postgres
|
||||
|
||||
## PostgreSQL password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
##
|
||||
# postgresqlPassword:
|
||||
|
||||
## PostgreSQL password using existing secret
|
||||
## existingSecret: secret
|
||||
|
||||
## Mount PostgreSQL secret as a file instead of passing environment variable
|
||||
# usePasswordFile: false
|
||||
|
||||
## Create a database
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#creating-a-database-on-first-run
|
||||
##
|
||||
# postgresqlDatabase:
|
||||
|
||||
## PostgreSQL data dir
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md
|
||||
##
|
||||
postgresqlDataDir: /bitnami/postgresql/data
|
||||
|
||||
## Specify extra initdb args
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md
|
||||
##
|
||||
# postgresqlInitdbArgs:
|
||||
|
||||
## Specify a custom location for the PostgreSQL transaction log
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md
|
||||
##
|
||||
# postgresqlInitdbWalDir:
|
||||
|
||||
## PostgreSQL configuration
|
||||
## Specify runtime configuration parameters as a dict, using camelCase, e.g.
|
||||
## {"sharedBuffers": "500MB"}
|
||||
## Alternatively, you can put your postgresql.conf under the files/ directory
|
||||
## ref: https://www.postgresql.org/docs/current/static/runtime-config.html
|
||||
##
|
||||
# postgresqlConfiguration:
|
||||
|
||||
## PostgreSQL extended configuration
|
||||
## As above, but _appended_ to the main configuration
|
||||
## Alternatively, you can put your *.conf under the files/conf.d/ directory
|
||||
## https://github.com/bitnami/bitnami-docker-postgresql#allow-settings-to-be-loaded-from-files-other-than-the-default-postgresqlconf
|
||||
##
|
||||
# postgresqlExtendedConf:
|
||||
|
||||
## PostgreSQL client authentication configuration
|
||||
## Specify content for pg_hba.conf
|
||||
## Default: do not create pg_hba.conf
|
||||
## Alternatively, you can put your pg_hba.conf under the files/ directory
|
||||
# pgHbaConfiguration: |-
|
||||
# local all all trust
|
||||
# host all all localhost trust
|
||||
# host mydatabase mysuser 192.168.0.0/24 md5
|
||||
|
||||
## ConfigMap with PostgreSQL configuration
|
||||
## NOTE: This will override postgresqlConfiguration and pgHbaConfiguration
|
||||
# configurationConfigMap:
|
||||
|
||||
## ConfigMap with PostgreSQL extended configuration
|
||||
# extendedConfConfigMap:
|
||||
|
||||
## initdb scripts
|
||||
## Specify dictionary of scripts to be run at first boot
|
||||
## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory
|
||||
##
|
||||
# initdbScripts:
|
||||
# my_init_script.sh: |
|
||||
# #!/bin/sh
|
||||
# echo "Do something."
|
||||
|
||||
## Specify the PostgreSQL username and password to execute the initdb scripts
|
||||
# initdbUser:
|
||||
# initdbPassword:
|
||||
|
||||
## ConfigMap with scripts to be run at first boot
|
||||
## NOTE: This will override initdbScripts
|
||||
# initdbScriptsConfigMap:
|
||||
|
||||
## Secret with scripts to be run at first boot (in case it contains sensitive information)
|
||||
## NOTE: This can work along initdbScripts or initdbScriptsConfigMap
|
||||
# initdbScriptsSecret:
|
||||
|
||||
## Optional duration in seconds the pod needs to terminate gracefully.
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
|
||||
##
|
||||
# terminationGracePeriodSeconds: 30
|
||||
|
||||
## PostgreSQL service configuration
|
||||
service:
|
||||
## PosgresSQL service type
|
||||
type: ClusterIP
|
||||
# clusterIP: None
|
||||
port: 5432
|
||||
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required.
|
||||
## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart
|
||||
annotations: {}
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
|
||||
## PostgreSQL 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)
|
||||
##
|
||||
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, so, for example, the name can depend on .Release or .Chart
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## The path the volume will be mounted at, useful when using different
|
||||
## PostgreSQL images.
|
||||
##
|
||||
mountPath: /bitnami/postgresql
|
||||
|
||||
## The subdirectory of the volume to mount to, useful in dev environments
|
||||
## and one PV for multiple services.
|
||||
##
|
||||
subPath: ""
|
||||
|
||||
# storageClass: "-"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: 8Gi
|
||||
annotations: {}
|
||||
|
||||
## updateStrategy for PostgreSQL StatefulSet and its slaves StatefulSets
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
##
|
||||
## PostgreSQL Master parameters
|
||||
##
|
||||
master:
|
||||
## Node, affinity and tolerations labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
nodeSelector: {}
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
labels: {}
|
||||
annotations: {}
|
||||
podLabels: {}
|
||||
podAnnotations: {}
|
||||
## Additional PostgreSQL Master Volume mounts
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
## Additional PostgreSQL Master Volumes
|
||||
##
|
||||
extraVolumes: []
|
||||
|
||||
##
|
||||
## PostgreSQL Slave parameters
|
||||
##
|
||||
slave:
|
||||
## Node, affinity and tolerations labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
nodeSelector: {}
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
labels: {}
|
||||
annotations: {}
|
||||
podLabels: {}
|
||||
podAnnotations: {}
|
||||
## Additional PostgreSQL Slave Volume mounts
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
## Additional PostgreSQL Slave Volumes
|
||||
##
|
||||
extraVolumes: []
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 250m
|
||||
|
||||
networkPolicy:
|
||||
## Enable creation of NetworkPolicy resources.
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## The Policy model to apply. When set to false, only pods with the correct
|
||||
## client label will have network access to the port PostgreSQL is listening
|
||||
## on. When true, PostgreSQL will accept connections from any source
|
||||
## (with the correct destination port).
|
||||
##
|
||||
allowExternal: true
|
||||
|
||||
## 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
|
||||
|
||||
## Configure metrics exporter
|
||||
##
|
||||
metrics:
|
||||
enabled: true
|
||||
# resources: {}
|
||||
service:
|
||||
type: ClusterIP
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9187"
|
||||
loadBalancerIP:
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
# namespace: monitoring
|
||||
# interval: 30s
|
||||
# scrapeTimeout: 10s
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgres-exporter
|
||||
tag: 0.6.0-debian-9-r0
|
||||
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
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: false
|
||||
runAsUser: 1001
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## Configure extra options for liveness and readiness probes
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
# Define custom environment variables to pass to the image here
|
||||
extraEnv: []
|
||||
@@ -1,103 +0,0 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema#",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"postgresqlUsername": {
|
||||
"type": "string",
|
||||
"title": "Admin user",
|
||||
"form": true
|
||||
},
|
||||
"postgresqlPassword": {
|
||||
"type": "string",
|
||||
"title": "Password",
|
||||
"form": true
|
||||
},
|
||||
"persistence": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"size": {
|
||||
"type": "string",
|
||||
"title": "Persistent Volume Size",
|
||||
"form": true,
|
||||
"render": "slider",
|
||||
"sliderMin": 1,
|
||||
"sliderMax": 100,
|
||||
"sliderUnit": "Gi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"title": "Required Resources",
|
||||
"description": "Configure resource requests",
|
||||
"form": true,
|
||||
"properties": {
|
||||
"requests": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"memory": {
|
||||
"type": "string",
|
||||
"form": true,
|
||||
"render": "slider",
|
||||
"title": "Memory Request",
|
||||
"sliderMin": 10,
|
||||
"sliderMax": 2048,
|
||||
"sliderUnit": "Mi"
|
||||
},
|
||||
"cpu": {
|
||||
"type": "string",
|
||||
"form": true,
|
||||
"render": "slider",
|
||||
"title": "CPU Request",
|
||||
"sliderMin": 10,
|
||||
"sliderMax": 2000,
|
||||
"sliderUnit": "m"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"replication": {
|
||||
"type": "object",
|
||||
"form": true,
|
||||
"title": "Replication Details",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"title": "Enable Replication",
|
||||
"form": true
|
||||
},
|
||||
"slaveReplicas": {
|
||||
"type": "integer",
|
||||
"title": "Slave Replicas",
|
||||
"form": true,
|
||||
"hidden": {
|
||||
"condition": false,
|
||||
"value": "replication.enabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"volumePermissions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"form": true,
|
||||
"title": "Enable Init Containers",
|
||||
"description": "Change the owner of the persist volume mountpoint to RunAsUser:fsGroup"
|
||||
}
|
||||
}
|
||||
},
|
||||
"metrics": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"title": "Configure metrics exporter",
|
||||
"form": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,392 +0,0 @@
|
||||
## 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:
|
||||
postgresql: {}
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
|
||||
## Bitnami PostgreSQL image version
|
||||
## ref: https://hub.docker.com/r/bitnami/postgresql/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgresql
|
||||
tag: 11.5.0-debian-9-r84
|
||||
## 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
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## It turns BASH and NAMI debugging in minideb
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
debug: false
|
||||
|
||||
## String to partially override postgresql.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override postgresql.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
##
|
||||
## Init containers parameters:
|
||||
## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: true
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
tag: stretch
|
||||
## 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: 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 container Security Context
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
|
||||
## Use an alternate scheduler, e.g. "stork".
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
# schedulerName:
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Pod Service Account
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
## Name of an already existing service account. Setting this value disables the automatic service account creation.
|
||||
# name:
|
||||
|
||||
replication:
|
||||
enabled: false
|
||||
user: repl_user
|
||||
password: repl_password
|
||||
slaveReplicas: 1
|
||||
## Set synchronous commit mode: on, off, remote_apply, remote_write and local
|
||||
## ref: https://www.postgresql.org/docs/9.6/runtime-config-wal.html#GUC-WAL-LEVEL
|
||||
synchronousCommit: "off"
|
||||
## From the number of `slaveReplicas` defined above, set the number of those that will have synchronous replication
|
||||
## NOTE: It cannot be > slaveReplicas
|
||||
numSynchronousReplicas: 0
|
||||
## Replication Cluster application name. Useful for defining multiple replication policies
|
||||
applicationName: my_application
|
||||
|
||||
## PostgreSQL admin user
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
postgresqlUsername: postgres
|
||||
|
||||
## PostgreSQL password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
##
|
||||
# postgresqlPassword:
|
||||
|
||||
## PostgreSQL password using existing secret
|
||||
## existingSecret: secret
|
||||
|
||||
## Mount PostgreSQL secret as a file instead of passing environment variable
|
||||
# usePasswordFile: false
|
||||
|
||||
## Create a database
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#creating-a-database-on-first-run
|
||||
##
|
||||
# postgresqlDatabase:
|
||||
|
||||
## PostgreSQL data dir
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md
|
||||
##
|
||||
postgresqlDataDir: /bitnami/postgresql/data
|
||||
|
||||
## Specify extra initdb args
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md
|
||||
##
|
||||
# postgresqlInitdbArgs:
|
||||
|
||||
## Specify a custom location for the PostgreSQL transaction log
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md
|
||||
##
|
||||
# postgresqlInitdbWalDir:
|
||||
|
||||
## PostgreSQL configuration
|
||||
## Specify runtime configuration parameters as a dict, using camelCase, e.g.
|
||||
## {"sharedBuffers": "500MB"}
|
||||
## Alternatively, you can put your postgresql.conf under the files/ directory
|
||||
## ref: https://www.postgresql.org/docs/current/static/runtime-config.html
|
||||
##
|
||||
# postgresqlConfiguration:
|
||||
|
||||
## PostgreSQL extended configuration
|
||||
## As above, but _appended_ to the main configuration
|
||||
## Alternatively, you can put your *.conf under the files/conf.d/ directory
|
||||
## https://github.com/bitnami/bitnami-docker-postgresql#allow-settings-to-be-loaded-from-files-other-than-the-default-postgresqlconf
|
||||
##
|
||||
# postgresqlExtendedConf:
|
||||
|
||||
## PostgreSQL client authentication configuration
|
||||
## Specify content for pg_hba.conf
|
||||
## Default: do not create pg_hba.conf
|
||||
## Alternatively, you can put your pg_hba.conf under the files/ directory
|
||||
# pgHbaConfiguration: |-
|
||||
# local all all trust
|
||||
# host all all localhost trust
|
||||
# host mydatabase mysuser 192.168.0.0/24 md5
|
||||
|
||||
## ConfigMap with PostgreSQL configuration
|
||||
## NOTE: This will override postgresqlConfiguration and pgHbaConfiguration
|
||||
# configurationConfigMap:
|
||||
|
||||
## ConfigMap with PostgreSQL extended configuration
|
||||
# extendedConfConfigMap:
|
||||
|
||||
## initdb scripts
|
||||
## Specify dictionary of scripts to be run at first boot
|
||||
## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory
|
||||
##
|
||||
# initdbScripts:
|
||||
# my_init_script.sh: |
|
||||
# #!/bin/sh
|
||||
# echo "Do something."
|
||||
|
||||
## ConfigMap with scripts to be run at first boot
|
||||
## NOTE: This will override initdbScripts
|
||||
# initdbScriptsConfigMap:
|
||||
|
||||
## Secret with scripts to be run at first boot (in case it contains sensitive information)
|
||||
## NOTE: This can work along initdbScripts or initdbScriptsConfigMap
|
||||
# initdbScriptsSecret:
|
||||
|
||||
## Specify the PostgreSQL username and password to execute the initdb scripts
|
||||
# initdbUser:
|
||||
# initdbPassword:
|
||||
|
||||
## Optional duration in seconds the pod needs to terminate gracefully.
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
|
||||
##
|
||||
# terminationGracePeriodSeconds: 30
|
||||
|
||||
## PostgreSQL service configuration
|
||||
service:
|
||||
## PosgresSQL service type
|
||||
type: ClusterIP
|
||||
# clusterIP: None
|
||||
port: 5432
|
||||
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required.
|
||||
## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart
|
||||
annotations: {}
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
|
||||
## PostgreSQL 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)
|
||||
##
|
||||
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, so, for example, the name can depend on .Release or .Chart
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## The path the volume will be mounted at, useful when using different
|
||||
## PostgreSQL images.
|
||||
##
|
||||
mountPath: /bitnami/postgresql
|
||||
|
||||
## The subdirectory of the volume to mount to, useful in dev environments
|
||||
## and one PV for multiple services.
|
||||
##
|
||||
subPath: ""
|
||||
|
||||
# storageClass: "-"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: 8Gi
|
||||
annotations: {}
|
||||
|
||||
## updateStrategy for PostgreSQL StatefulSet and its slaves StatefulSets
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
##
|
||||
## PostgreSQL Master parameters
|
||||
##
|
||||
master:
|
||||
## Node, affinity and tolerations labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
nodeSelector: {}
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
labels: {}
|
||||
annotations: {}
|
||||
podLabels: {}
|
||||
podAnnotations: {}
|
||||
## Additional PostgreSQL Master Volume mounts
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
## Additional PostgreSQL Master Volumes
|
||||
##
|
||||
extraVolumes: []
|
||||
|
||||
##
|
||||
## PostgreSQL Slave parameters
|
||||
##
|
||||
slave:
|
||||
## Node, affinity and tolerations labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
nodeSelector: {}
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
labels: {}
|
||||
annotations: {}
|
||||
podLabels: {}
|
||||
podAnnotations: {}
|
||||
## Additional PostgreSQL Slave Volume mounts
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
## Additional PostgreSQL Slave Volumes
|
||||
##
|
||||
extraVolumes: []
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 250m
|
||||
|
||||
networkPolicy:
|
||||
## Enable creation of NetworkPolicy resources.
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## The Policy model to apply. When set to false, only pods with the correct
|
||||
## client label will have network access to the port PostgreSQL is listening
|
||||
## on. When true, PostgreSQL will accept connections from any source
|
||||
## (with the correct destination port).
|
||||
##
|
||||
allowExternal: true
|
||||
|
||||
## 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
|
||||
|
||||
## Configure metrics exporter
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
# resources: {}
|
||||
service:
|
||||
type: ClusterIP
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9187"
|
||||
loadBalancerIP:
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
# namespace: monitoring
|
||||
# interval: 30s
|
||||
# scrapeTimeout: 10s
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgres-exporter
|
||||
tag: 0.6.0-debian-9-r0
|
||||
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
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: false
|
||||
runAsUser: 1001
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## Configure extra options for liveness and readiness probes
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
# Define custom environment variables to pass to the image here
|
||||
extraEnv: []
|
||||
@@ -1,113 +0,0 @@
|
||||
Congratulations. You have just deployed JFrog Artifactory HA!
|
||||
|
||||
{{- if and (not .Values.artifactory.masterKeySecretName) (eq .Values.artifactory.masterKey "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") }}
|
||||
|
||||
|
||||
***************************************** WARNING ******************************************
|
||||
* Your Artifactory master key is still set to the provided example: *
|
||||
* artifactory.masterKey=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF *
|
||||
* *
|
||||
* You should change this to your own generated key: *
|
||||
* $ export MASTER_KEY=$(openssl rand -hex 32) *
|
||||
* $ echo ${MASTER_KEY} *
|
||||
* *
|
||||
* Pass the created master key to helm with '--set artifactory.masterKey=${MASTER_KEY}' *
|
||||
* *
|
||||
* Alternatively, you can use a pre-existing secret with a key called master-key with *
|
||||
* '--set artifactory.masterKeySecretName=${SECRET_NAME}' *
|
||||
********************************************************************************************
|
||||
{{- end }}
|
||||
|
||||
{{ if eq .Values.artifactory.joinKey "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE" }}
|
||||
|
||||
|
||||
***************************************** WARNING ******************************************
|
||||
* Your Artifactory join key is still set to the provided example: *
|
||||
* artifactory.joinKey=EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE *
|
||||
* *
|
||||
* You should change this to your own generated key: *
|
||||
* $ export JOIN_KEY=$(openssl rand -hex 16) *
|
||||
* $ echo ${JOIN_KEY} *
|
||||
* *
|
||||
* Pass the created master key to helm with '--set artifactory.joinKey=${JOIN_KEY}' *
|
||||
* *
|
||||
********************************************************************************************
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
|
||||
DATABASE:
|
||||
To extract the database password, run the following
|
||||
export DB_PASSWORD=$(kubectl get --namespace {{ .Release.Namespace }} $(kubectl get secret --namespace {{ .Release.Namespace }} -o name | grep postgresql) -o jsonpath="{.data.postgresql-password}" | base64 --decode)
|
||||
echo ${DB_PASSWORD}
|
||||
{{- end }}
|
||||
|
||||
SETUP:
|
||||
1. Get the Artifactory IP and URL
|
||||
|
||||
{{- if contains "NodePort" .Values.nginx.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "artifactory-ha.nginx.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT/
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.nginx.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer public IP to be available!
|
||||
|
||||
You can watch the status of the service by running 'kubectl get svc -w {{ template "artifactory-ha.nginx.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "artifactory-ha.nginx.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo http://$SERVICE_IP/
|
||||
|
||||
{{- else if contains "ClusterIP" .Values.nginx.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "component={{ .Values.nginx.name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 8080:80
|
||||
echo http://127.0.0.1:8080
|
||||
|
||||
{{- end }}
|
||||
|
||||
2. Open Artifactory in your browser
|
||||
Default credential for Artifactory:
|
||||
user: admin
|
||||
password: password
|
||||
|
||||
{{- if .Values.artifactory.license.secret }}
|
||||
|
||||
3. Manage Artifactory license through the {{ .Values.artifactory.license.secret }} secret ONLY!
|
||||
Since the artifactory license(s) is managed with a secret ({{ .Values.artifactory.license.secret }}), any change through the Artifactory UI might not be saved!
|
||||
|
||||
{{- else }}
|
||||
|
||||
3. Add HA licenses to activate Artifactory HA through the Artifactory UI
|
||||
NOTE: Each Artifactory node requires a valid license. See https://www.jfrog.com/confluence/display/RTF/HA+Installation+and+Setup for more details.
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{ if or .Values.artifactory.primary.javaOpts.jmx.enabled .Values.artifactory.node.javaOpts.jmx.enabled }}
|
||||
JMX configuration:
|
||||
{{- if not (contains "LoadBalancer" .Values.artifactory.service.type) }}
|
||||
If you want to access JMX from you computer with jconsole, you should set ".Values.artifactory.service.type=LoadBalancer" !!!
|
||||
{{ end }}
|
||||
|
||||
1. Get the Artifactory service IP:
|
||||
{{- if .Values.artifactory.primary.javaOpts.jmx.enabled }}
|
||||
export PRIMARY_SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "artifactory-ha.primary.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.node.javaOpts.jmx.enabled }}
|
||||
export MEMBER_SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "artifactory-ha.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
{{- end }}
|
||||
|
||||
2. Map the service name to the service IP in /etc/hosts:
|
||||
{{- if .Values.artifactory.primary.javaOpts.jmx.enabled }}
|
||||
sudo sh -c "echo \"${PRIMARY_SERVICE_IP} {{ template "artifactory-ha.primary.name" . }}\" >> /etc/hosts"
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.node.javaOpts.jmx.enabled }}
|
||||
sudo sh -c "echo \"${MEMBER_SERVICE_IP} {{ template "artifactory-ha.fullname" . }}\" >> /etc/hosts"
|
||||
{{- end }}
|
||||
|
||||
3. Launch jconsole:
|
||||
{{- if .Values.artifactory.primary.javaOpts.jmx.enabled }}
|
||||
jconsole {{ template "artifactory-ha.primary.name" . }}:{{ .Values.artifactory.primary.javaOpts.jmx.port }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.node.javaOpts.jmx.enabled }}
|
||||
jconsole {{ template "artifactory-ha.fullname" . }}:{{ .Values.artifactory.node.javaOpts.jmx.port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,103 +0,0 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "artifactory-ha.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
The primary node name
|
||||
*/}}
|
||||
{{- define "artifactory-ha.primary.name" -}}
|
||||
{{- if .Values.nameOverride -}}
|
||||
{{- printf "%s-primary" .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := .Release.Name | trunc 29 -}}
|
||||
{{- printf "%s-%s-primary" $name .Chart.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
The member node name
|
||||
*/}}
|
||||
{{- define "artifactory-ha.node.name" -}}
|
||||
{{- if .Values.nameOverride -}}
|
||||
{{- printf "%s-member" .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := .Release.Name | trunc 29 -}}
|
||||
{{- printf "%s-%s-member" $name .Chart.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Expand the name nginx service.
|
||||
*/}}
|
||||
{{- define "artifactory-ha.nginx.name" -}}
|
||||
{{- default .Values.nginx.name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "artifactory-ha.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "artifactory-ha.nginx.fullname" -}}
|
||||
{{- if .Values.nginx.fullnameOverride -}}
|
||||
{{- .Values.nginx.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nginx.name -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "artifactory-ha.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "artifactory-ha.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "artifactory-ha.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Generate SSL certificates
|
||||
*/}}
|
||||
{{- define "artifactory-ha.gen-certs" -}}
|
||||
{{- $altNames := list ( printf "%s.%s" (include "artifactory-ha.name" .) .Release.Namespace ) ( printf "%s.%s.svc" (include "artifactory-ha.name" .) .Release.Namespace ) -}}
|
||||
{{- $ca := genCA "artifactory-ca" 365 -}}
|
||||
{{- $cert := genSignedCert ( include "artifactory-ha.name" . ) nil $altNames 365 $ca -}}
|
||||
tls.crt: {{ $cert.Cert | b64enc }}
|
||||
tls.key: {{ $cert.Key | b64enc }}
|
||||
{{- end -}}
|
||||
@@ -1,15 +0,0 @@
|
||||
{{- if not (and .Values.artifactory.accessAdmin.secret .Values.artifactory.accessAdmin.dataKey) }}
|
||||
{{- if .Values.artifactory.accessAdmin.password }}
|
||||
kind: Secret
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-bootstrap-creds
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
bootstrap.creds: {{ (printf "access-admin@%s=%s" .Values.artifactory.accessAdmin.ip .Values.artifactory.accessAdmin.password) | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,14 +0,0 @@
|
||||
{{- if not .Values.artifactory.persistence.customBinarystoreXmlSecret }}
|
||||
kind: Secret
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-binarystore
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
stringData:
|
||||
binarystore.xml: |-
|
||||
{{ tpl .Values.artifactory.persistence.binarystoreXml . | indent 4 }}
|
||||
{{- end }}
|
||||
@@ -1,13 +0,0 @@
|
||||
{{ if .Values.artifactory.configMaps }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-configmaps
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.fullname" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
{{ tpl .Values.artifactory.configMaps . | indent 2 }}
|
||||
{{ end -}}
|
||||
@@ -1,25 +0,0 @@
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-installer-info
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
installer-info.json: |
|
||||
{
|
||||
"productId": "Helm_artifactory-ha/{{ .Chart.Version }}",
|
||||
"features": [
|
||||
{
|
||||
"featureId": "ArtifactoryVersion/{{ default .Chart.AppVersion .Values.artifactory.image.version }}"
|
||||
},
|
||||
{
|
||||
"featureId": "{{ if .Values.postgresql.enabled }}postgresql{{ else }}{{ default "derby" .Values.database.type }}{{ end }}/0.0.0"
|
||||
},
|
||||
{
|
||||
"featureId": "Platform/{{ default "kubernetes" .Values.installer.platform }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{{- with .Values.artifactory.license.licenseKey }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" $ }}-license
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" $ }}
|
||||
chart: {{ template "artifactory-ha.chart" $ }}
|
||||
heritage: {{ $.Release.Service }}
|
||||
release: {{ $.Release.Name }}
|
||||
type: Opaque
|
||||
data:
|
||||
artifactory.lic: {{ . | b64enc | quote }}
|
||||
{{- end }}
|
||||
@@ -1,34 +0,0 @@
|
||||
{{- range .Values.networkpolicy }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" $ }}-{{ .name }}-networkpolicy
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" $ }}
|
||||
chart: {{ template "artifactory-ha.chart" $ }}
|
||||
release: {{ $.Release.Name }}
|
||||
heritage: {{ $.Release.Service }}
|
||||
spec:
|
||||
{{- if .podSelector }}
|
||||
podSelector:
|
||||
{{ .podSelector | toYaml | trimSuffix "\n" | indent 4 -}}
|
||||
{{ else }}
|
||||
podSelector: {}
|
||||
{{- end }}
|
||||
policyTypes:
|
||||
{{- if .ingress }}
|
||||
- Ingress
|
||||
{{- end }}
|
||||
{{- if .egress }}
|
||||
- Egress
|
||||
{{- end }}
|
||||
{{- if .ingress }}
|
||||
ingress:
|
||||
{{ .ingress | toYaml | trimSuffix "\n" | indent 2 -}}
|
||||
{{- end }}
|
||||
{{- if .egress }}
|
||||
egress:
|
||||
{{ .egress | toYaml | trimSuffix "\n" | indent 2 -}}
|
||||
{{- end }}
|
||||
---
|
||||
{{- end -}}
|
||||
@@ -1,101 +0,0 @@
|
||||
{{- if eq .Values.artifactory.persistence.type "nfs" }}
|
||||
### Artifactory HA data
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-data-pv
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
id: {{ template "artifactory-ha.name" . }}-data-pv
|
||||
type: nfs-volume
|
||||
spec:
|
||||
{{- if .Values.artifactory.persistence.nfs.mountOptions }}
|
||||
mountOptions:
|
||||
{{ toYaml .Values.artifactory.persistence.nfs.mountOptions | indent 4 }}
|
||||
{{- end }}
|
||||
capacity:
|
||||
storage: {{ .Values.artifactory.persistence.nfs.capacity }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
nfs:
|
||||
server: {{ .Values.artifactory.persistence.nfs.ip }}
|
||||
path: "{{ .Values.artifactory.persistence.nfs.haDataMount }}"
|
||||
readOnly: false
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-data-pvc
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
type: nfs-volume
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: ""
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.artifactory.persistence.nfs.capacity }}
|
||||
selector:
|
||||
matchLabels:
|
||||
id: {{ template "artifactory-ha.name" . }}-data-pv
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
---
|
||||
### Artifactory HA backup
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-backup-pv
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
id: {{ template "artifactory-ha.name" . }}-backup-pv
|
||||
type: nfs-volume
|
||||
spec:
|
||||
{{- if .Values.artifactory.persistence.nfs.mountOptions }}
|
||||
mountOptions:
|
||||
{{ toYaml .Values.artifactory.persistence.nfs.mountOptions | indent 4 }}
|
||||
{{- end }}
|
||||
capacity:
|
||||
storage: {{ .Values.artifactory.persistence.nfs.capacity }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
nfs:
|
||||
server: {{ .Values.artifactory.persistence.nfs.ip }}
|
||||
path: "{{ .Values.artifactory.persistence.nfs.haBackupMount }}"
|
||||
readOnly: false
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-backup-pvc
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
type: nfs-volume
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: ""
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.artifactory.persistence.nfs.capacity }}
|
||||
selector:
|
||||
matchLabels:
|
||||
id: {{ template "artifactory-ha.name" . }}-backup-pv
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
@@ -1,19 +0,0 @@
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-node
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
{{- if eq .Values.artifactory.service.pool "members" }}
|
||||
role: {{ template "artifactory-ha.node.name" . }}
|
||||
{{- end }}
|
||||
release: {{ .Release.Name }}
|
||||
minAvailable: {{ .Values.artifactory.node.minAvailable }}
|
||||
@@ -1,510 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.node.name" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
force-update: "{{ randAlpha 63 | lower }}"
|
||||
{{- if .Values.artifactory.node.labels }}
|
||||
{{ toYaml .Values.artifactory.node.labels | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
serviceName: {{ template "artifactory-ha.node.name" . }}
|
||||
replicas: {{ .Values.artifactory.node.replicaCount }}
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
role: {{ template "artifactory-ha.node.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
role: {{ template "artifactory-ha.node.name" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
release: {{ .Release.Name }}
|
||||
annotations:
|
||||
checksum/binarystore: {{ include (print $.Template.BasePath "/artifactory-binarystore-secret.yaml") . | sha256sum }}
|
||||
checksum/systemyaml: {{ include (print $.Template.BasePath "/artifactory-system-yaml.yaml") . | sha256sum }}
|
||||
{{- range $key, $value := .Values.artifactory.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.artifactory.priorityClass.existingPriorityClass }}
|
||||
priorityClassName: {{ .Values.artifactory.priorityClass.existingPriorityClass }}
|
||||
{{- else -}}
|
||||
{{- if .Values.artifactory.priorityClass.create }}
|
||||
priorityClassName: {{ default (include "artifactory-ha.fullname" .) .Values.artifactory.priorityClass.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }}
|
||||
terminationGracePeriodSeconds: {{ .Values.artifactory.terminationGracePeriodSeconds }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.imagePullSecrets }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.artifactory.uid }}
|
||||
fsGroup: {{ .Values.artifactory.uid }}
|
||||
initContainers:
|
||||
{{- if .Values.artifactory.customInitContainersBegin }}
|
||||
{{ tpl .Values.artifactory.customInitContainersBegin . | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.persistence.enabled }}
|
||||
{{- if eq .Values.artifactory.persistence.type "file-system" }}
|
||||
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
|
||||
- name: "create-artifactory-data-dir"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
|
||||
resources:
|
||||
{{ toYaml .Values.initContainers.resources | indent 10 }}
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- >
|
||||
mkdir -p {{ tpl .Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir . }};
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
|
||||
name: volume
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.deleteDBPropertiesOnStartup }}
|
||||
- name: "delete-db-properties"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
|
||||
resources:
|
||||
{{ toYaml .Values.initContainers.resources | indent 10 }}
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- 'rm -fv {{ .Values.artifactory.persistence.mountPath }}/etc/db.properties'
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
|
||||
name: volume
|
||||
{{- end }}
|
||||
- name: "remove-lost-found"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
|
||||
resources:
|
||||
{{ toYaml .Values.initContainers.resources | indent 10 }}
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- >
|
||||
rm -rfv {{ .Values.artifactory.persistence.mountPath }}/lost+found
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
|
||||
name: volume
|
||||
{{- end }}
|
||||
- name: 'copy-system-yaml'
|
||||
image: '{{ .Values.initContainerImage }}'
|
||||
command:
|
||||
- '/bin/sh'
|
||||
- '-c'
|
||||
- >
|
||||
{{- if .Values.artifactory.node.waitForPrimaryStartup.enabled }}
|
||||
echo "Sleeping to allow time for primary node to come up";
|
||||
sleep {{ .Values.artifactory.node.waitForPrimaryStartup.seconds }};
|
||||
{{- end }}
|
||||
echo "Copy system.yaml to {{ .Values.artifactory.persistence.mountPath }}/etc";
|
||||
mkdir -p {{ .Values.artifactory.persistence.mountPath }}/etc;
|
||||
mkdir -p {{ .Values.artifactory.persistence.mountPath }}/etc/access/keys/trusted;
|
||||
cp -fv /tmp/etc/system.yaml {{ .Values.artifactory.persistence.mountPath }}/etc/system.yaml;
|
||||
echo "Remove {{ .Values.artifactory.persistence.mountPath }}/lost+found folder if exists";
|
||||
rm -rfv {{ .Values.artifactory.persistence.mountPath }}/lost+found;
|
||||
volumeMounts:
|
||||
- name: volume
|
||||
mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
|
||||
- name: systemyaml
|
||||
mountPath: "/tmp/etc/system.yaml"
|
||||
subPath: system.yaml
|
||||
{{- if .Values.artifactory.customPersistentPodVolumeClaim }}
|
||||
- name: "prepare-custom-persistent-volume"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- >
|
||||
chown -Rv {{ .Values.artifactory.uid }}:{{ .Values.artifactory.uid }} {{ .Values.artifactory.customPersistentPodVolumeClaim.mountPath }}
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- name: {{ .Values.artifactory.customPersistentPodVolumeClaim.name }}
|
||||
mountPath: {{ .Values.artifactory.customPersistentPodVolumeClaim.mountPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.waitForDatabase }}
|
||||
{{- if or .Values.postgresql.enabled }}
|
||||
- name: "wait-for-db"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
resources:
|
||||
{{ toYaml .Values.initContainers.resources | indent 10 }}
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- >
|
||||
until nc -z -w 2 {{ .Release.Name }}-postgresql {{ .Values.postgresql.service.port }} && echo database ok; do
|
||||
sleep 2;
|
||||
done;
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customInitContainers }}
|
||||
{{ tpl .Values.artifactory.customInitContainers . | indent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Values.artifactory.name }}
|
||||
image: '{{ .Values.artifactory.image.repository }}:{{ default .Chart.AppVersion .Values.artifactory.image.version }}'
|
||||
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
command:
|
||||
- '/bin/sh'
|
||||
- '-c'
|
||||
- >
|
||||
{{- if .Values.artifactory.userPluginSecrets }}
|
||||
echo "Copying plugins";
|
||||
cp -Lrf /tmp/plugin/*/* /tmp/plugins;
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.preStartCommand }}
|
||||
echo "Running custom preStartCommand command";
|
||||
{{ tpl .Values.artifactory.preStartCommand . }};
|
||||
{{- end }}
|
||||
/entrypoint-artifactory.sh
|
||||
lifecycle:
|
||||
postStart:
|
||||
exec:
|
||||
command:
|
||||
- '/bin/sh'
|
||||
- '-c'
|
||||
- >
|
||||
echo;
|
||||
{{- if .Values.artifactory.postStartCommand }}
|
||||
{{ .Values.artifactory.postStartCommand }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.database.secrets.user }}
|
||||
- name: JF_SHARED_DATABSE_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.database.secrets.user.name }}
|
||||
key: {{ .Values.database.secrets.user.key }}
|
||||
{{- end }}
|
||||
{{- if .Values.database.secrets.password }}
|
||||
- name: JF_SHARED_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.database.secrets.password.name }}
|
||||
key: {{ .Values.database.secrets.password.key }}
|
||||
{{- end }}
|
||||
{{- if .Values.database.secrets.url }}
|
||||
- name: JF_SHARED_DATABSE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.database.secrets.url.name }}
|
||||
key: {{ .Values.database.secrets.url.key }}
|
||||
{{- end }}
|
||||
- name: JF_SHARED_NODE_PRIMARY
|
||||
value: "false"
|
||||
- name: JF_SHARED_NODE_HAENABLED
|
||||
value: "true"
|
||||
- name: JF_SHARED_DATABSE_USERNAME
|
||||
value: "artifactory"
|
||||
- name: JF_SHARED_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-postgresql
|
||||
key: postgresql-password
|
||||
ports:
|
||||
- containerPort: {{ .Values.artifactory.internalPort }}
|
||||
- containerPort: {{ .Values.artifactory.internalArtifactoryPort }}
|
||||
{{- if .Values.artifactory.node.javaOpts.jmx.enabled }}
|
||||
- containerPort: {{ .Values.artifactory.node.javaOpts.jmx.port }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.artifactory.customPersistentVolumeClaim }}
|
||||
- name: {{ .Values.artifactory.customPersistentVolumeClaim.name }}
|
||||
mountPath: {{ .Values.artifactory.customPersistentVolumeClaim.mountPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customPersistentPodVolumeClaim }}
|
||||
- name: {{ .Values.artifactory.customPersistentPodVolumeClaim.name }}
|
||||
mountPath: {{ .Values.artifactory.customPersistentPodVolumeClaim.mountPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.userPluginSecrets }}
|
||||
- name: tmp-plugins
|
||||
mountPath: "/tmp/plugins/"
|
||||
{{- range .Values.artifactory.userPluginSecrets }}
|
||||
- name: {{ tpl . $ }}
|
||||
mountPath: "/tmp/plugin/{{ tpl . $ }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: volume
|
||||
mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
|
||||
{{- if eq .Values.artifactory.persistence.type "file-system" }}
|
||||
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
|
||||
{{- range $sharedClaimNumber, $e := until (.Values.artifactory.persistence.fileSystem.existingSharedClaim.numberOfExistingClaims|int) }}
|
||||
- name: artifactory-ha-data-{{ $sharedClaimNumber }}
|
||||
mountPath: "{{ tpl $.Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir $ }}/filestore{{ $sharedClaimNumber }}"
|
||||
{{- end }}
|
||||
- name: artifactory-ha-backup
|
||||
mountPath: "{{ $.Values.artifactory.persistence.fileSystem.existingSharedClaim.backupDir }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.artifactory.persistence.type "nfs" }}
|
||||
- name: artifactory-ha-data
|
||||
mountPath: "{{ .Values.artifactory.persistence.nfs.dataDir }}"
|
||||
- name: artifactory-ha-backup
|
||||
mountPath: "{{ .Values.artifactory.persistence.nfs.backupDir }}"
|
||||
{{- else }}
|
||||
{{- if .Values.artifactory.binarystore.enabled }}
|
||||
- name: binarystore-xml
|
||||
mountPath: "/artifactory_extra_conf/binarystore.xml"
|
||||
subPath: binarystore.xml
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: installer-info
|
||||
mountPath: "/artifactory_extra_conf/info/installer-info.json"
|
||||
subPath: installer-info.json
|
||||
{{- if .Values.artifactory.customVolumeMounts }}
|
||||
{{ tpl .Values.artifactory.customVolumeMounts . | indent 8 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{ toYaml .Values.artifactory.node.resources | indent 10 }}
|
||||
{{- if .Values.artifactory.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.artifactory.readinessProbe.path }}
|
||||
port: {{ .Values.artifactory.internalPort }}
|
||||
initialDelaySeconds: {{ .Values.artifactory.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.artifactory.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.artifactory.readinessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.artifactory.readinessProbe.failureThreshold }}
|
||||
successThreshold: {{ .Values.artifactory.readinessProbe.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.artifactory.livenessProbe.path }}
|
||||
port: {{ .Values.artifactory.internalPort }}
|
||||
initialDelaySeconds: {{ .Values.artifactory.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.artifactory.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.artifactory.livenessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.artifactory.livenessProbe.failureThreshold }}
|
||||
successThreshold: {{ .Values.artifactory.livenessProbe.successThreshold }}
|
||||
{{- end }}
|
||||
{{- $image := .Values.logger.image.repository }}
|
||||
{{- $tag := .Values.logger.image.tag }}
|
||||
{{- $mountPath := .Values.artifactory.persistence.mountPath }}
|
||||
{{- range .Values.artifactory.loggers }}
|
||||
- name: {{ . | replace "_" "-" | replace "." "-" }}
|
||||
image: '{{ $image }}:{{ $tag }}'
|
||||
command:
|
||||
- tail
|
||||
args:
|
||||
- '-F'
|
||||
- '{{ $mountPath }}/logs/{{ . }}'
|
||||
volumeMounts:
|
||||
- name: volume
|
||||
mountPath: {{ $mountPath }}
|
||||
{{- end }}
|
||||
{{ if .Values.artifactory.catalinaLoggers }}
|
||||
{{- range .Values.artifactory.catalinaLoggers }}
|
||||
- name: {{ . | replace "_" "-" | replace "." "-" }}
|
||||
image: '{{ $image }}:{{ $tag }}'
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- 'sh /scripts/tail-log.sh {{ $mountPath }}/logs/catalina {{ . }}'
|
||||
volumeMounts:
|
||||
- name: volume
|
||||
mountPath: {{ $mountPath }}
|
||||
- name: catalina-logger
|
||||
mountPath: /scripts/tail-log.sh
|
||||
subPath: tail-log.sh
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.filebeat.enabled }}
|
||||
- name: {{ .Values.filebeat.name }}
|
||||
image: "{{ .Values.filebeat.image.repository }}:{{ .Values.filebeat.image.version }}"
|
||||
imagePullPolicy: {{ .Values.filebeat.image.pullPolicy }}
|
||||
args:
|
||||
- "-e"
|
||||
- "-E"
|
||||
- "http.enabled=true"
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- name: filebeat-config
|
||||
mountPath: /usr/share/filebeat/filebeat.yml
|
||||
readOnly: true
|
||||
subPath: filebeat.yml
|
||||
- name: volume
|
||||
mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
|
||||
livenessProbe:
|
||||
{{ toYaml .Values.filebeat.livenessProbe | indent 10 }}
|
||||
readinessProbe:
|
||||
{{ toYaml .Values.filebeat.readinessProbe | indent 10 }}
|
||||
resources:
|
||||
{{ toYaml .Values.filebeat.resources | indent 10 }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customSidecarContainers }}
|
||||
{{ tpl .Values.artifactory.customSidecarContainers . | indent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.artifactory.node.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.node.affinity }}
|
||||
{{- with .Values.artifactory.node.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- else if eq .Values.artifactory.node.podAntiAffinity.type "soft" }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
topologyKey: {{ .Values.artifactory.node.podAntiAffinity.topologyKey }}
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- if eq .Values.artifactory.service.pool "members" }}
|
||||
role: {{ template "artifactory-ha.node.name" . }}
|
||||
{{- end }}
|
||||
{{- else if eq .Values.artifactory.node.podAntiAffinity.type "hard" }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: {{ .Values.artifactory.node.podAntiAffinity.topologyKey }}
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- if eq .Values.artifactory.service.pool "members" }}
|
||||
role: {{ template "artifactory-ha.node.name" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.artifactory.node.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.artifactory.binarystore.enabled }}
|
||||
- name: binarystore-xml
|
||||
secret:
|
||||
{{- if .Values.artifactory.persistence.customBinarystoreXmlSecret }}
|
||||
secretName: {{ .Values.artifactory.persistence.customBinarystoreXmlSecret }}
|
||||
{{- else }}
|
||||
secretName: {{ template "artifactory-ha.fullname" . }}-binarystore
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: installer-info
|
||||
configMap:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-installer-info
|
||||
{{- if .Values.artifactory.userPluginSecrets }}
|
||||
- name: tmp-plugins
|
||||
emptyDir: {}
|
||||
{{- range .Values.artifactory.userPluginSecrets }}
|
||||
- name: {{ tpl . $ }}
|
||||
secret:
|
||||
secretName: {{ tpl . $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.catalinaLoggers }}
|
||||
- name: catalina-logger
|
||||
configMap:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-catalina-logger
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.configMaps }}
|
||||
- name: artifactory-configmaps
|
||||
configMap:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-configmaps
|
||||
{{- end }}
|
||||
{{- if eq .Values.artifactory.persistence.type "file-system" }}
|
||||
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
|
||||
{{- range $sharedClaimNumber, $e := until (.Values.artifactory.persistence.fileSystem.existingSharedClaim.numberOfExistingClaims|int) }}
|
||||
- name: artifactory-ha-data-{{ $sharedClaimNumber }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "artifactory-ha.fullname" $ }}-data-pvc-{{ $sharedClaimNumber }}
|
||||
{{- end }}
|
||||
- name: artifactory-ha-backup
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "artifactory-ha.fullname" $ }}-backup-pvc
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.artifactory.persistence.type "nfs" }}
|
||||
- name: artifactory-ha-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "artifactory-ha.fullname" . }}-data-pvc
|
||||
- name: artifactory-ha-backup
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "artifactory-ha.fullname" . }}-backup-pvc
|
||||
{{- end }}
|
||||
- name: systemyaml
|
||||
secret:
|
||||
secretName: {{ template "artifactory-ha.primary.name" . }}-system-yaml
|
||||
{{- if .Values.artifactory.customPersistentVolumeClaim }}
|
||||
- name: {{ .Values.artifactory.customPersistentVolumeClaim.name }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.artifactory.customPersistentVolumeClaim.name }}
|
||||
{{- end }}
|
||||
{{- if .Values.filebeat.enabled }}
|
||||
- name: filebeat-config
|
||||
configMap:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-filebeat-config
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customVolumes }}
|
||||
{{ tpl .Values.artifactory.customVolumes . | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.artifactory.persistence.enabled }}
|
||||
- name: volume
|
||||
emptyDir:
|
||||
sizeLimit: {{ .Values.artifactory.persistence.size }}
|
||||
{{- end }}
|
||||
volumeClaimTemplates:
|
||||
{{- if .Values.artifactory.persistence.enabled }}
|
||||
- metadata:
|
||||
name: volume
|
||||
{{- if not .Values.artifactory.node.persistence.existingClaim }}
|
||||
spec:
|
||||
{{- if .Values.artifactory.persistence.storageClassName }}
|
||||
{{- if (eq "-" .Values.artifactory.persistence.storageClassName) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.artifactory.persistence.storageClassName }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
accessModes: [ "{{ .Values.artifactory.persistence.accessMode }}" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.artifactory.persistence.size }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customPersistentPodVolumeClaim }}
|
||||
- metadata:
|
||||
name: {{ .Values.artifactory.customPersistentPodVolumeClaim.name }}
|
||||
spec:
|
||||
{{- if .Values.artifactory.customPersistentPodVolumeClaim.storageClassName }}
|
||||
{{- if (eq "-" .Values.artifactory.customPersistentPodVolumeClaim.storageClassName) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.artifactory.customPersistentPodVolumeClaim.storageClassName }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
accessModes:
|
||||
{{- range .Values.artifactory.customPersistentPodVolumeClaim.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.artifactory.customPersistentPodVolumeClaim.size }}
|
||||
{{- end }}
|
||||
@@ -1,587 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.primary.name" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
force-update: "{{ randAlpha 63 | lower }}"
|
||||
{{- if .Values.artifactory.primary.labels }}
|
||||
{{ toYaml .Values.artifactory.primary.labels | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
serviceName: {{ template "artifactory-ha.primary.name" . }}
|
||||
replicas: 1
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
role: {{ template "artifactory-ha.primary.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
role: {{ template "artifactory-ha.primary.name" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
annotations:
|
||||
checksum/binarystore: {{ include (print $.Template.BasePath "/artifactory-binarystore-secret.yaml") . | sha256sum }}
|
||||
checksum/systemyaml: {{ include (print $.Template.BasePath "/artifactory-system-yaml.yaml") . | sha256sum }}
|
||||
{{- if not (and .Values.artifactory.accessAdmin.secret .Values.artifactory.accessAdmin.dataKey) }}
|
||||
checksum/access-creds: {{ include (print $.Template.BasePath "/access-bootstrap-creds.yaml") . | sha256sum }}
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.artifactory.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.artifactory.priorityClass.existingPriorityClass }}
|
||||
priorityClassName: {{ .Values.artifactory.priorityClass.existingPriorityClass }}
|
||||
{{- else -}}
|
||||
{{- if .Values.artifactory.priorityClass.create }}
|
||||
priorityClassName: {{ default (include "artifactory-ha.fullname" .) .Values.artifactory.priorityClass.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }}
|
||||
terminationGracePeriodSeconds: {{ .Values.artifactory.terminationGracePeriodSeconds }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.imagePullSecrets }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.artifactory.uid }}
|
||||
fsGroup: {{ .Values.artifactory.uid }}
|
||||
initContainers:
|
||||
{{- if .Values.artifactory.customInitContainersBegin }}
|
||||
{{ tpl .Values.artifactory.customInitContainersBegin . | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.persistence.enabled }}
|
||||
{{- if eq .Values.artifactory.persistence.type "file-system" }}
|
||||
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
|
||||
- name: "create-artifactory-data-dir"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
|
||||
resources:
|
||||
{{ toYaml .Values.initContainers.resources | indent 10 }}
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- >
|
||||
mkdir -p {{ tpl .Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir . }};
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
|
||||
name: volume
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.deleteDBPropertiesOnStartup }}
|
||||
- name: "delete-db-properties"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
|
||||
resources:
|
||||
{{ toYaml .Values.initContainers.resources | indent 10 }}
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- 'rm -fv {{ .Values.artifactory.persistence.mountPath }}/etc/db.properties'
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
|
||||
name: volume
|
||||
{{- end }}
|
||||
- name: "remove-lost-found"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
|
||||
resources:
|
||||
{{ toYaml .Values.initContainers.resources | indent 10 }}
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- >
|
||||
rm -rfv {{ .Values.artifactory.persistence.mountPath }}/lost+found;
|
||||
rm -rfv {{ tpl .Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir . }}/lost+found;
|
||||
rm -rfv {{ .Values.artifactory.persistence.fileSystem.existingSharedClaim.backupDir }}/lost+found;
|
||||
volumeMounts:
|
||||
- name: volume
|
||||
mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
|
||||
{{- if eq .Values.artifactory.persistence.type "file-system" }}
|
||||
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
|
||||
{{- range $sharedClaimNumber, $e := until (.Values.artifactory.persistence.fileSystem.existingSharedClaim.numberOfExistingClaims|int) }}
|
||||
- name: artifactory-ha-data-{{ $sharedClaimNumber }}
|
||||
mountPath: "{{ tpl $.Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir $ }}/filestore{{ $sharedClaimNumber }}"
|
||||
{{- end }}
|
||||
- name: artifactory-ha-backup
|
||||
mountPath: "{{ $.Values.artifactory.persistence.fileSystem.existingSharedClaim.backupDir }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or (and .Values.artifactory.accessAdmin.secret .Values.artifactory.accessAdmin.dataKey) .Values.artifactory.accessAdmin.password }}
|
||||
- name: "access-bootstrap-creds"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
|
||||
resources:
|
||||
{{ toYaml .Values.initContainers.resources | indent 10 }}
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- >
|
||||
echo "Preparing custom Access bootstrap.creds";
|
||||
mkdir -p {{ .Values.artifactory.persistence.mountPath }}/access/etc;
|
||||
cp -Lrf /tmp/access/bootstrap.creds {{ .Values.artifactory.persistence.mountPath }}/access/etc/bootstrap.creds;
|
||||
chmod 600 {{ .Values.artifactory.persistence.mountPath }}/access/etc/bootstrap.creds;
|
||||
volumeMounts:
|
||||
- name: volume
|
||||
mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
|
||||
- name: access-bootstrap-creds
|
||||
mountPath: "/tmp/access/bootstrap.creds"
|
||||
{{- if and .Values.artifactory.accessAdmin.secret .Values.artifactory.accessAdmin.dataKey }}
|
||||
subPath: {{ .Values.artifactory.accessAdmin.dataKey }}
|
||||
{{- else }}
|
||||
subPath: bootstrap.creds
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: 'copy-system-yaml'
|
||||
image: '{{ .Values.initContainerImage }}'
|
||||
command:
|
||||
- '/bin/sh'
|
||||
- '-c'
|
||||
- >
|
||||
echo "Copy system.yaml to {{ .Values.artifactory.persistence.mountPath }}/etc";
|
||||
mkdir -p {{ .Values.artifactory.persistence.mountPath }}/etc;
|
||||
mkdir -p {{ .Values.artifactory.persistence.mountPath }}/etc/access/keys/trusted;
|
||||
cp -fv /tmp/etc/system.yaml {{ .Values.artifactory.persistence.mountPath }}/etc/system.yaml;
|
||||
echo "Remove {{ .Values.artifactory.persistence.mountPath }}/lost+found folder if exists";
|
||||
rm -rfv {{ .Values.artifactory.persistence.mountPath }}/lost+found;
|
||||
volumeMounts:
|
||||
- name: volume
|
||||
mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
|
||||
- name: systemyaml
|
||||
mountPath: "/tmp/etc/system.yaml"
|
||||
subPath: system.yaml
|
||||
{{- if .Values.artifactory.customPersistentPodVolumeClaim }}
|
||||
- name: "prepare-custom-persistent-volume"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- >
|
||||
chown -Rv {{ .Values.artifactory.uid }}:{{ .Values.artifactory.uid }} {{ .Values.artifactory.customPersistentPodVolumeClaim.mountPath }}
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- name: {{ .Values.artifactory.customPersistentPodVolumeClaim.name }}
|
||||
mountPath: {{ .Values.artifactory.customPersistentPodVolumeClaim.mountPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.waitForDatabase }}
|
||||
{{- if or .Values.postgresql.enabled }}
|
||||
- name: "wait-for-db"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
resources:
|
||||
{{ toYaml .Values.initContainers.resources | indent 10 }}
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- >
|
||||
until nc -z -w 2 {{ .Release.Name }}-postgresql {{ .Values.postgresql.service.port }} && echo database ok; do
|
||||
sleep 2;
|
||||
done;
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customInitContainers }}
|
||||
{{ tpl .Values.artifactory.customInitContainers . | indent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Values.artifactory.name }}
|
||||
image: '{{ .Values.artifactory.image.repository }}:{{ default .Chart.AppVersion .Values.artifactory.image.version }}'
|
||||
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
command:
|
||||
- '/bin/sh'
|
||||
- '-c'
|
||||
- >
|
||||
set -e;
|
||||
{{- if .Values.artifactory.configMapName }}
|
||||
echo "Copying bootstrap configs";
|
||||
cp -Lrf /bootstrap/* /artifactory_extra_conf/;
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.userPluginSecrets }}
|
||||
echo "Copying plugins";
|
||||
cp -Lrf /tmp/plugin/*/* /tmp/plugins;
|
||||
{{- end }}
|
||||
{{- range .Values.artifactory.copyOnEveryStartup }}
|
||||
{{- $targetPath := printf "%s/%s" $.Values.artifactory.persistence.mountPath .target }}
|
||||
{{- $baseDirectory := regexFind ".*/" $targetPath }}
|
||||
mkdir -p {{ $baseDirectory }};
|
||||
cp -Lrf {{ .source }} {{ $.Values.artifactory.persistence.mountPath }}/{{ .target }};
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.preStartCommand }}
|
||||
echo "Running custom preStartCommand command";
|
||||
{{ tpl .Values.artifactory.preStartCommand . }};
|
||||
{{- end }}
|
||||
/entrypoint-artifactory.sh
|
||||
lifecycle:
|
||||
postStart:
|
||||
exec:
|
||||
command:
|
||||
- '/bin/sh'
|
||||
- '-c'
|
||||
- >
|
||||
echo;
|
||||
{{- if .Values.artifactory.postStartCommand }}
|
||||
{{ .Values.artifactory.postStartCommand }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.database.secrets.user }}
|
||||
- name: JF_SHARED_DATABSE_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.database.secrets.user.name }}
|
||||
key: {{ .Values.database.secrets.user.key }}
|
||||
{{- end }}
|
||||
{{- if .Values.database.secrets.password }}
|
||||
- name: JF_SHARED_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.database.secrets.password.name }}
|
||||
key: {{ .Values.database.secrets.password.key }}
|
||||
{{- end }}
|
||||
{{- if .Values.database.secrets.url }}
|
||||
- name: JF_SHARED_DATABSE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.database.secrets.url.name }}
|
||||
key: {{ .Values.database.secrets.url.key }}
|
||||
{{- end }}
|
||||
- name: JF_SHARED_NODE_PRIMARY
|
||||
value: "true"
|
||||
- name: JF_SHARED_NODE_HAENABLED
|
||||
value: "true"
|
||||
- name: JF_SHARED_DATABSE_USERNAME
|
||||
value: "artifactory"
|
||||
- name: JF_SHARED_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-postgresql
|
||||
key: postgresql-password
|
||||
ports:
|
||||
- containerPort: {{ .Values.artifactory.internalPort }}
|
||||
- containerPort: {{ .Values.artifactory.internalArtifactoryPort }}
|
||||
{{- if .Values.artifactory.primary.javaOpts.jmx.enabled }}
|
||||
- containerPort: {{ .Values.artifactory.primary.javaOpts.jmx.port }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.artifactory.customPersistentVolumeClaim }}
|
||||
- name: {{ .Values.artifactory.customPersistentVolumeClaim.name }}
|
||||
mountPath: {{ .Values.artifactory.customPersistentVolumeClaim.mountPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customPersistentPodVolumeClaim }}
|
||||
- name: {{ .Values.artifactory.customPersistentPodVolumeClaim.name }}
|
||||
mountPath: {{ .Values.artifactory.customPersistentPodVolumeClaim.mountPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.userPluginSecrets }}
|
||||
- name: tmp-plugins
|
||||
mountPath: "/tmp/plugins/"
|
||||
{{- range .Values.artifactory.userPluginSecrets }}
|
||||
- name: {{ tpl . $ }}
|
||||
mountPath: "/tmp/plugin/{{ tpl . $ }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: volume
|
||||
mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
|
||||
{{- if eq .Values.artifactory.persistence.type "file-system" }}
|
||||
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
|
||||
{{- range $sharedClaimNumber, $e := until (.Values.artifactory.persistence.fileSystem.existingSharedClaim.numberOfExistingClaims|int) }}
|
||||
- name: artifactory-ha-data-{{ $sharedClaimNumber }}
|
||||
mountPath: "{{ tpl $.Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir $ }}/filestore{{ $sharedClaimNumber }}"
|
||||
{{- end }}
|
||||
- name: artifactory-ha-backup
|
||||
mountPath: "{{ $.Values.artifactory.persistence.fileSystem.existingSharedClaim.backupDir }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.artifactory.persistence.type "nfs" }}
|
||||
- name: artifactory-ha-data
|
||||
mountPath: "{{ .Values.artifactory.persistence.nfs.dataDir }}"
|
||||
- name: artifactory-ha-backup
|
||||
mountPath: "{{ .Values.artifactory.persistence.nfs.backupDir }}"
|
||||
{{- else }}
|
||||
{{- if .Values.artifactory.binarystore.enabled }}
|
||||
- name: binarystore-xml
|
||||
mountPath: "/artifactory_extra_conf/binarystore.xml"
|
||||
subPath: binarystore.xml
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.configMapName }}
|
||||
- name: bootstrap-config
|
||||
mountPath: "/bootstrap/"
|
||||
{{- end }}
|
||||
{{- if or .Values.artifactory.license.secret .Values.artifactory.license.licenseKey }}
|
||||
- name: artifactory-license
|
||||
mountPath: "/artifactory_extra_conf/artifactory.cluster.license"
|
||||
{{- if .Values.artifactory.license.secret }}
|
||||
subPath: {{ .Values.artifactory.license.dataKey }}
|
||||
{{- else if .Values.artifactory.license.licenseKey }}
|
||||
subPath: artifactory.lic
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: installer-info
|
||||
mountPath: "/artifactory_extra_conf/info/installer-info.json"
|
||||
subPath: installer-info.json
|
||||
{{- if .Values.artifactory.customVolumeMounts }}
|
||||
{{ tpl .Values.artifactory.customVolumeMounts . | indent 8 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{ toYaml .Values.artifactory.primary.resources | indent 10 }}
|
||||
{{- if .Values.artifactory.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.artifactory.readinessProbe.path }}
|
||||
port: {{ .Values.artifactory.internalPort }}
|
||||
initialDelaySeconds: {{ .Values.artifactory.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.artifactory.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.artifactory.readinessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.artifactory.readinessProbe.failureThreshold }}
|
||||
successThreshold: {{ .Values.artifactory.readinessProbe.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.artifactory.livenessProbe.path }}
|
||||
port: {{ .Values.artifactory.internalPort }}
|
||||
initialDelaySeconds: {{ .Values.artifactory.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.artifactory.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.artifactory.livenessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.artifactory.livenessProbe.failureThreshold }}
|
||||
successThreshold: {{ .Values.artifactory.livenessProbe.successThreshold }}
|
||||
{{- end }}
|
||||
{{- $image := .Values.logger.image.repository }}
|
||||
{{- $tag := .Values.logger.image.tag }}
|
||||
{{- $mountPath := .Values.artifactory.persistence.mountPath }}
|
||||
{{- range .Values.artifactory.loggers }}
|
||||
- name: {{ . | replace "_" "-" | replace "." "-" }}
|
||||
image: '{{ $image }}:{{ $tag }}'
|
||||
command:
|
||||
- tail
|
||||
args:
|
||||
- '-F'
|
||||
- '{{ $mountPath }}/logs/{{ . }}'
|
||||
volumeMounts:
|
||||
- name: volume
|
||||
mountPath: {{ $mountPath }}
|
||||
{{- end }}
|
||||
{{ if .Values.artifactory.catalinaLoggers }}
|
||||
{{- range .Values.artifactory.catalinaLoggers }}
|
||||
- name: {{ . | replace "_" "-" | replace "." "-" }}
|
||||
image: '{{ $image }}:{{ $tag }}'
|
||||
command:
|
||||
- 'sh'
|
||||
- '-c'
|
||||
- 'sh /scripts/tail-log.sh {{ $mountPath }}/logs/catalina {{ . }}'
|
||||
volumeMounts:
|
||||
- name: volume
|
||||
mountPath: {{ $mountPath }}
|
||||
- name: catalina-logger
|
||||
mountPath: /scripts/tail-log.sh
|
||||
subPath: tail-log.sh
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.filebeat.enabled }}
|
||||
- name: {{ .Values.filebeat.name }}
|
||||
image: "{{ .Values.filebeat.image.repository }}:{{ .Values.filebeat.image.version }}"
|
||||
imagePullPolicy: {{ .Values.filebeat.image.pullPolicy }}
|
||||
args:
|
||||
- "-e"
|
||||
- "-E"
|
||||
- "http.enabled=true"
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- name: filebeat-config
|
||||
mountPath: /usr/share/filebeat/filebeat.yml
|
||||
readOnly: true
|
||||
subPath: filebeat.yml
|
||||
- name: volume
|
||||
mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
|
||||
livenessProbe:
|
||||
{{ toYaml .Values.filebeat.livenessProbe | indent 10 }}
|
||||
readinessProbe:
|
||||
{{ toYaml .Values.filebeat.readinessProbe | indent 10 }}
|
||||
resources:
|
||||
{{ toYaml .Values.filebeat.resources | indent 10 }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customSidecarContainers }}
|
||||
{{ tpl .Values.artifactory.customSidecarContainers . | indent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.artifactory.primary.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.primary.affinity }}
|
||||
{{- with .Values.artifactory.primary.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- else if eq .Values.artifactory.primary.podAntiAffinity.type "soft" }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
topologyKey: {{ .Values.artifactory.primary.podAntiAffinity.topologyKey }}
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- else if eq .Values.artifactory.primary.podAntiAffinity.type "hard" }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: {{ .Values.artifactory.primary.podAntiAffinity.topologyKey }}
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
{{- with .Values.artifactory.primary.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.artifactory.binarystore.enabled }}
|
||||
- name: binarystore-xml
|
||||
secret:
|
||||
{{- if .Values.artifactory.persistence.customBinarystoreXmlSecret }}
|
||||
secretName: {{ .Values.artifactory.persistence.customBinarystoreXmlSecret }}
|
||||
{{- else }}
|
||||
secretName: {{ template "artifactory-ha.fullname" . }}-binarystore
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: installer-info
|
||||
configMap:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-installer-info
|
||||
{{- if .Values.artifactory.userPluginSecrets }}
|
||||
- name: tmp-plugins
|
||||
emptyDir: {}
|
||||
{{- range .Values.artifactory.userPluginSecrets }}
|
||||
- name: {{ tpl . $ }}
|
||||
secret:
|
||||
secretName: {{ tpl . $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.configMapName }}
|
||||
- name: bootstrap-config
|
||||
configMap:
|
||||
name: {{ .Values.artifactory.configMapName }}
|
||||
{{- end}}
|
||||
{{- if .Values.artifactory.catalinaLoggers }}
|
||||
- name: catalina-logger
|
||||
configMap:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-catalina-logger
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.configMaps }}
|
||||
- name: artifactory-configmaps
|
||||
configMap:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-configmaps
|
||||
{{- end }}
|
||||
{{- if or .Values.artifactory.license.secret .Values.artifactory.license.licenseKey }}
|
||||
- name: artifactory-license
|
||||
secret:
|
||||
{{- if .Values.artifactory.license.secret }}
|
||||
secretName: {{ .Values.artifactory.license.secret }}
|
||||
{{- else if .Values.artifactory.license.licenseKey }}
|
||||
secretName: {{ template "artifactory-ha.fullname" . }}-license
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or (and .Values.artifactory.accessAdmin.secret .Values.artifactory.accessAdmin.dataKey) .Values.artifactory.accessAdmin.password }}
|
||||
- name: access-bootstrap-creds
|
||||
secret:
|
||||
{{- if and .Values.artifactory.accessAdmin.secret .Values.artifactory.accessAdmin.dataKey }}
|
||||
secretName: {{ .Values.artifactory.accessAdmin.secret }}
|
||||
{{- else }}
|
||||
secretName: {{ template "artifactory-ha.fullname" . }}-bootstrap-creds
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.artifactory.persistence.type "file-system" }}
|
||||
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
|
||||
{{- range $sharedClaimNumber, $e := until (.Values.artifactory.persistence.fileSystem.existingSharedClaim.numberOfExistingClaims|int) }}
|
||||
- name: artifactory-ha-data-{{ $sharedClaimNumber }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "artifactory-ha.fullname" $ }}-data-pvc-{{ $sharedClaimNumber }}
|
||||
{{- end }}
|
||||
- name: artifactory-ha-backup
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "artifactory-ha.fullname" $ }}-backup-pvc
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.artifactory.persistence.type "nfs" }}
|
||||
- name: artifactory-ha-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "artifactory-ha.fullname" . }}-data-pvc
|
||||
- name: artifactory-ha-backup
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "artifactory-ha.fullname" . }}-backup-pvc
|
||||
{{- end }}
|
||||
- name: systemyaml
|
||||
secret:
|
||||
secretName: {{ template "artifactory-ha.primary.name" . }}-system-yaml
|
||||
{{- if .Values.artifactory.customPersistentVolumeClaim }}
|
||||
- name: {{ .Values.artifactory.customPersistentVolumeClaim.name }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.artifactory.customPersistentVolumeClaim.name }}
|
||||
{{- end }}
|
||||
{{- if .Values.filebeat.enabled }}
|
||||
- name: filebeat-config
|
||||
configMap:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-filebeat-config
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customVolumes }}
|
||||
{{ tpl .Values.artifactory.customVolumes . | indent 6 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.artifactory.persistence.enabled }}
|
||||
- name: volume
|
||||
emptyDir:
|
||||
sizeLimit: {{ .Values.artifactory.persistence.size }}
|
||||
{{- end }}
|
||||
volumeClaimTemplates:
|
||||
{{- if .Values.artifactory.persistence.enabled }}
|
||||
- metadata:
|
||||
name: volume
|
||||
{{- if not .Values.artifactory.primary.persistence.existingClaim }}
|
||||
spec:
|
||||
{{- if .Values.artifactory.persistence.storageClassName }}
|
||||
{{- if (eq "-" .Values.artifactory.persistence.storageClassName) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.artifactory.persistence.storageClassName }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
accessModes: [ "{{ .Values.artifactory.persistence.accessMode }}" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.artifactory.persistence.size }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customPersistentPodVolumeClaim }}
|
||||
- metadata:
|
||||
name: {{ .Values.artifactory.customPersistentPodVolumeClaim.name }}
|
||||
spec:
|
||||
{{- if .Values.artifactory.customPersistentPodVolumeClaim.storageClassName }}
|
||||
{{- if (eq "-" .Values.artifactory.customPersistentPodVolumeClaim.storageClassName) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.artifactory.customPersistentPodVolumeClaim.storageClassName }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
accessModes:
|
||||
{{- range .Values.artifactory.customPersistentPodVolumeClaim.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.artifactory.customPersistentPodVolumeClaim.size }}
|
||||
{{- end }}
|
||||
@@ -1,9 +0,0 @@
|
||||
{{- if .Values.artifactory.priorityClass.create }}
|
||||
apiVersion: scheduling.k8s.io/v1
|
||||
kind: PriorityClass
|
||||
metadata:
|
||||
name: {{ default (include "artifactory-ha.fullname" .) .Values.artifactory.priorityClass.name }}
|
||||
value: {{ .Values.artifactory.priorityClass.value }}
|
||||
globalDefault: false
|
||||
description: "Artifactory priority class"
|
||||
{{- end }}
|
||||
@@ -1,14 +0,0 @@
|
||||
{{- if .Values.rbac.create }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "artifactory-ha.fullname" . }}
|
||||
rules:
|
||||
{{ toYaml .Values.rbac.role.rules }}
|
||||
{{- end }}
|
||||
@@ -1,19 +0,0 @@
|
||||
{{- if .Values.rbac.create }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "artifactory-ha.fullname" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "artifactory-ha.serviceAccountName" . }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
name: {{ template "artifactory-ha.fullname" . }}
|
||||
{{- end }}
|
||||
@@ -1,17 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if not .Values.artifactory.masterKeySecretName }}
|
||||
master-key: {{ .Values.artifactory.masterKey | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.database.password }}
|
||||
db-password: {{ .Values.database.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
@@ -1,88 +0,0 @@
|
||||
# Service for all Artifactory cluster nodes.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- if .Values.artifactory.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.artifactory.service.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.artifactory.service.type }}
|
||||
{{- if and (eq .Values.artifactory.service.type "ClusterIP") .Values.artifactory.service.clusterIP }}
|
||||
clusterIP: {{ .Values.artifactory.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.artifactory.service.loadBalancerSourceRanges | indent 4 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: {{ .Values.artifactory.externalPort }}
|
||||
targetPort: {{ .Values.artifactory.internalPort }}
|
||||
protocol: TCP
|
||||
name: {{ .Release.Name }}-router
|
||||
- port: {{ .Values.artifactory.externalArtifactoryPort }}
|
||||
targetPort: {{ .Values.artifactory.internalArtifactoryPort }}
|
||||
protocol: TCP
|
||||
name: {{ .Release.Name }}-artifactory
|
||||
{{- with .Values.artifactory.node.javaOpts.jmx }}
|
||||
{{- if .enabled }}
|
||||
- port: {{ .port }}
|
||||
targetPort: {{ .port }}
|
||||
protocol: TCP
|
||||
name: jmx
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- if eq .Values.artifactory.service.pool "members" }}
|
||||
role: {{ template "artifactory-ha.node.name" . }}
|
||||
{{- end }}
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
component: "{{ .Values.artifactory.name }}"
|
||||
release: {{ .Release.Name }}
|
||||
---
|
||||
# Internal service for Artifactory primary node only!
|
||||
# Used by member nodes to check readiness of primary node before starting up
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.primary.name" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
type: {{ .Values.artifactory.service.type }}
|
||||
{{- if and (eq .Values.artifactory.service.type "ClusterIP") .Values.artifactory.service.clusterIP }}
|
||||
clusterIP: {{ .Values.artifactory.service.clusterIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: {{ .Values.artifactory.externalPort }}
|
||||
targetPort: {{ .Values.artifactory.internalPort }}
|
||||
protocol: TCP
|
||||
name: {{ .Release.Name }}-router
|
||||
- port: {{ .Values.artifactory.externalArtifactoryPort }}
|
||||
targetPort: {{ .Values.artifactory.internalArtifactoryPort }}
|
||||
protocol: TCP
|
||||
name: {{ .Release.Name }}-artifactory
|
||||
{{- with .Values.artifactory.primary.javaOpts.jmx }}
|
||||
{{- if .enabled }}
|
||||
- port: {{ .port }}
|
||||
targetPort: {{ .port }}
|
||||
protocol: TCP
|
||||
name: jmx
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
role: {{ template "artifactory-ha.primary.name" . }}
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
component: "{{ .Values.artifactory.name }}"
|
||||
release: {{ .Release.Name }}
|
||||
@@ -1,16 +0,0 @@
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
{{- if .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{ tpl (toYaml .) $ | indent 4 }}
|
||||
{{- end}}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "artifactory-ha.serviceAccountName" . }}
|
||||
{{- end }}
|
||||
@@ -1,27 +0,0 @@
|
||||
{{ if .Values.artifactory.customPersistentVolumeClaim }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .Values.artifactory.customPersistentVolumeClaim.name }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
version: "{{ .Values.artifactory.version }}"
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.artifactory.customPersistentVolumeClaim.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.artifactory.customPersistentVolumeClaim.storageClassName }}
|
||||
{{- if (eq "-" .Values.artifactory.customPersistentVolumeClaim.storageClassName) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.artifactory.customPersistentVolumeClaim.storageClassName }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.artifactory.customPersistentVolumeClaim.size | quote }}
|
||||
{{ end -}}
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.primary.name" . }}-system-yaml
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.artifactory.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
system.yaml: |
|
||||
{{ tpl .Values.artifactory.systemYaml . | indent 4 }}
|
||||
@@ -1,53 +0,0 @@
|
||||
{{- if .Values.artifactory.catalinaLoggers }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-catalina-logger
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
tail-log.sh: |
|
||||
#!/bin/sh
|
||||
|
||||
LOG_DIR=$1
|
||||
LOG_NAME=$2
|
||||
PID=
|
||||
|
||||
# Wait for log dir to appear
|
||||
while [ ! -d ${LOG_DIR} ]; do
|
||||
sleep 1
|
||||
done
|
||||
sleep 5
|
||||
|
||||
cd ${LOG_DIR}
|
||||
|
||||
LOG_PREFIX=$(echo ${LOG_NAME} | awk -F\. '{print $1}')
|
||||
|
||||
# Find the log to tail
|
||||
LOG_FILE=$(ls -1t ./${LOG_PREFIX}.*.log | head -1)
|
||||
|
||||
# echo "Tailing ${LOG_FILE}"
|
||||
tail -F ${LOG_FILE} &
|
||||
PID=$!
|
||||
|
||||
# Loop forever to see if a new log was created
|
||||
while true; do
|
||||
# Find the latest log
|
||||
NEW_LOG_FILE=$(ls -1t ./${LOG_PREFIX}.*.log | head -1)
|
||||
|
||||
# If a new log file is found, kill old tail and switch to tailing it
|
||||
if [ "${LOG_FILE}" != "${NEW_LOG_FILE}" ]; then
|
||||
kill -9 ${PID}
|
||||
wait $! 2>/dev/null
|
||||
LOG_FILE=${NEW_LOG_FILE}
|
||||
|
||||
# echo "Tailing ${LOG_FILE}"
|
||||
tail -F ${LOG_FILE} &
|
||||
PID=$!
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
{{- end }}
|
||||
@@ -1,15 +0,0 @@
|
||||
{{- if .Values.filebeat.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.name" . }}-filebeat-config
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
data:
|
||||
filebeat.yml: |
|
||||
{{ tpl .Values.filebeat.filebeatYml . | indent 4 }}
|
||||
{{- end -}}
|
||||
@@ -1,56 +0,0 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $serviceName := include "artifactory-ha.fullname" . -}}
|
||||
{{- $servicePort := .Values.artifactory.externalPort -}}
|
||||
{{- $artifactoryServicePort := .Values.artifactory.externalArtifactoryPort -}}
|
||||
{{- if semverCompare ">=v1.14.0" .Capabilities.KubeVersion.GitVersion }}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else }}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- if .Values.ingress.labels }}
|
||||
{{ .Values.ingress.labels | toYaml | trimSuffix "\n"| indent 4 -}}
|
||||
{{- end}}
|
||||
{{- if .Values.ingress.annotations }}
|
||||
annotations:
|
||||
force-update: "{{ randAlpha 63 | lower }}"
|
||||
{{ .Values.ingress.annotations | toYaml | trimSuffix "\n" | indent 4 -}}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.defaultBackend.enabled }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ $servicePort }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.ingress.hosts }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
- host: {{ $host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $.Values.ingress.routerPath }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ $servicePort }}
|
||||
- path: {{ $.Values.ingress.artifactoryPath }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ $artifactoryServicePort }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with .Values.ingress.additionalRules }}
|
||||
{{ tpl . $ | indent 2 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.ingress.tls | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,14 +0,0 @@
|
||||
{{- if and (not .Values.nginx.customArtifactoryConfigMap) .Values.nginx.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-nginx-artifactory-conf
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
artifactory.conf: |
|
||||
{{ tpl .Values.nginx.artifactoryConf . | indent 4 }}
|
||||
{{- end }}
|
||||
@@ -1,14 +0,0 @@
|
||||
{{- if and (not .Values.nginx.tlsSecretName) .Values.nginx.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: kubernetes.io/tls
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-nginx-certificate
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
{{ ( include "artifactory-ha.gen-certs" . ) | indent 2 }}
|
||||
{{- end }}
|
||||
@@ -1,14 +0,0 @@
|
||||
{{- if and (not .Values.nginx.customConfigMap) .Values.nginx.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}-nginx-conf
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
nginx.conf: |
|
||||
{{ tpl .Values.nginx.mainConf . | indent 4 }}
|
||||
{{- end }}
|
||||
@@ -1,185 +0,0 @@
|
||||
{{- if .Values.nginx.enabled -}}
|
||||
{{- $serviceName := include "artifactory-ha.fullname" . -}}
|
||||
{{- $servicePort := .Values.artifactory.externalPort -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.nginx.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
component: {{ .Values.nginx.name }}
|
||||
{{- if .Values.nginx.labels }}
|
||||
{{ toYaml .Values.nginx.labels | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.nginx.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
component: {{ .Values.nginx.name }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
checksum/nginx-conf: {{ include (print $.Template.BasePath "/nginx-conf.yaml") . | sha256sum }}
|
||||
checksum/nginx-artifactory-conf: {{ include (print $.Template.BasePath "/nginx-artifactory-conf.yaml") . | sha256sum }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
component: {{ .Values.nginx.name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.imagePullSecrets }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: "setup"
|
||||
image: "{{ .Values.initContainerImage }}"
|
||||
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
|
||||
command:
|
||||
- '/bin/sh'
|
||||
- '-c'
|
||||
- >
|
||||
rm -rfv {{ .Values.nginx.persistence.mountPath }}/lost+found;
|
||||
mkdir -p {{ .Values.nginx.persistence.mountPath }}/logs;
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.nginx.persistence.mountPath | quote }}
|
||||
name: nginx-volume
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.nginx.uid }}
|
||||
fsGroup: {{ .Values.nginx.gid }}
|
||||
containers:
|
||||
- name: {{ .Values.nginx.name }}
|
||||
image: '{{ .Values.nginx.image.repository }}:{{ default .Chart.AppVersion .Values.nginx.image.version }}'
|
||||
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
|
||||
command:
|
||||
- 'nginx'
|
||||
- '-g'
|
||||
- 'daemon off;'
|
||||
ports:
|
||||
# DEPRECATION NOTE: The following is to maintain support for values pre 1.3.1 and
|
||||
# will be cleaned up in a later version
|
||||
{{- if .Values.nginx.http }}
|
||||
{{- if .Values.nginx.http.enabled }}
|
||||
- containerPort: {{ .Values.nginx.http.internalPort }}
|
||||
{{- end }}
|
||||
{{- else }} # DEPRECATED
|
||||
- containerPort: {{ .Values.nginx.internalPortHttp }}
|
||||
{{- end }}
|
||||
{{- if .Values.nginx.https }}
|
||||
{{- if .Values.nginx.https.enabled }}
|
||||
- containerPort: {{ .Values.nginx.https.internalPort }}
|
||||
{{- end }}
|
||||
{{- else }} # DEPRECATED
|
||||
- containerPort: {{ .Values.nginx.internalPortHttps }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: nginx-conf
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
- name: nginx-artifactory-conf
|
||||
mountPath: "{{ .Values.nginx.persistence.mountPath }}/conf.d/"
|
||||
- name: nginx-volume
|
||||
mountPath: {{ .Values.nginx.persistence.mountPath | quote }}
|
||||
- name: ssl-certificates
|
||||
mountPath: "{{ .Values.nginx.persistence.mountPath }}/ssl"
|
||||
resources:
|
||||
{{ toYaml .Values.nginx.resources | indent 10 }}
|
||||
{{- if .Values.nginx.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.nginx.readinessProbe.path }}
|
||||
{{- if .Values.nginx.http.enabled }}
|
||||
port: {{ .Values.nginx.http.internalPort }}
|
||||
scheme: HTTP
|
||||
{{- else }}
|
||||
port: {{ .Values.nginx.https.internalPort }}
|
||||
scheme: HTTPS
|
||||
{{- end }}
|
||||
initialDelaySeconds: {{ .Values.nginx.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.nginx.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.nginx.readinessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.nginx.readinessProbe.failureThreshold }}
|
||||
successThreshold: {{ .Values.nginx.readinessProbe.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.nginx.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.nginx.livenessProbe.path }}
|
||||
{{- if .Values.nginx.http.enabled }}
|
||||
port: {{ .Values.nginx.http.internalPort }}
|
||||
scheme: HTTP
|
||||
{{- else }}
|
||||
port: {{ .Values.nginx.https.internalPort }}
|
||||
scheme: HTTPS
|
||||
{{- end }}
|
||||
initialDelaySeconds: {{ .Values.nginx.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.nginx.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.nginx.livenessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.nginx.livenessProbe.failureThreshold }}
|
||||
successThreshold: {{ .Values.nginx.livenessProbe.successThreshold }}
|
||||
{{- end }}
|
||||
{{- $image := .Values.logger.image.repository }}
|
||||
{{- $tag := .Values.logger.image.tag }}
|
||||
{{- $mountPath := .Values.nginx.persistence.mountPath }}
|
||||
{{- range .Values.nginx.loggers }}
|
||||
- name: {{ . | replace "_" "-" | replace "." "-" }}
|
||||
image: '{{ $image }}:{{ $tag }}'
|
||||
command:
|
||||
- tail
|
||||
args:
|
||||
- '-F'
|
||||
- '{{ $mountPath }}/logs/{{ . }}'
|
||||
volumeMounts:
|
||||
- name: nginx-volume
|
||||
mountPath: {{ $mountPath }}
|
||||
{{- end }}
|
||||
{{- with .Values.nginx.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nginx.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nginx.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: nginx-conf
|
||||
configMap:
|
||||
{{- if .Values.nginx.customConfigMap }}
|
||||
name: {{ .Values.nginx.customConfigMap }}
|
||||
{{- else }}
|
||||
name: {{ template "artifactory-ha.fullname" . }}-nginx-conf
|
||||
{{- end }}
|
||||
- name: nginx-artifactory-conf
|
||||
configMap:
|
||||
{{- if .Values.nginx.customArtifactoryConfigMap }}
|
||||
name: {{ .Values.nginx.customArtifactoryConfigMap }}
|
||||
{{- else }}
|
||||
name: {{ template "artifactory-ha.fullname" . }}-nginx-artifactory-conf
|
||||
{{- end }}
|
||||
|
||||
- name: nginx-volume
|
||||
{{- if .Values.nginx.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.nginx.persistence.existingClaim | default (include "artifactory-ha.nginx.fullname" .) }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: ssl-certificates
|
||||
secret:
|
||||
{{- if .Values.nginx.tlsSecretName }}
|
||||
secretName: {{ .Values.nginx.tlsSecretName }}
|
||||
{{- else }}
|
||||
secretName: {{ template "artifactory-ha.fullname" . }}-nginx-certificate
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,26 +0,0 @@
|
||||
{{- if and .Values.nginx.persistence.enabled (.Values.nginx.enabled) (eq (int .Values.nginx.replicaCount) 1) }}
|
||||
{{- if (not .Values.nginx.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.nginx.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.nginx.persistence.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.nginx.persistence.size | quote }}
|
||||
{{- if .Values.nginx.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.nginx.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.nginx.persistence.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,69 +0,0 @@
|
||||
{{- if .Values.nginx.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.nginx.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
component: {{ .Values.nginx.name }}
|
||||
{{- if .Values.nginx.service.labels }}
|
||||
{{ toYaml .Values.nginx.service.labels | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nginx.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.nginx.service.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.nginx.service.type }}
|
||||
{{- if and (eq .Values.nginx.service.type "ClusterIP") .Values.nginx.service.clusterIP }}
|
||||
clusterIP: {{ .Values.nginx.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.nginx.service.type "LoadBalancer" }}
|
||||
{{ if .Values.nginx.service.loadBalancerIP -}}
|
||||
loadBalancerIP: {{ .Values.nginx.service.loadBalancerIP }}
|
||||
{{ end -}}
|
||||
{{- if .Values.nginx.service.externalTrafficPolicy }}
|
||||
externalTrafficPolicy: {{ .Values.nginx.service.externalTrafficPolicy }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.nginx.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.nginx.service.loadBalancerSourceRanges | indent 4 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
# DEPRECATION NOTE: The following is to maintain support for values pre 1.3.0 and
|
||||
# will be cleaned up in a later verion
|
||||
{{- if .Values.nginx.http }}
|
||||
{{- if .Values.nginx.http.enabled }}
|
||||
- port: {{ .Values.nginx.http.externalPort }}
|
||||
targetPort: {{ .Values.nginx.http.internalPort }}
|
||||
protocol: TCP
|
||||
name: http
|
||||
{{- end }}
|
||||
{{- else }} # DEPRECATED
|
||||
- port: {{ .Values.nginx.externalPortHttp }}
|
||||
targetPort: {{ .Values.nginx.internalPortHttp }}
|
||||
protocol: TCP
|
||||
name: http
|
||||
{{- end }}
|
||||
{{- if .Values.nginx.https }}
|
||||
{{- if .Values.nginx.https.enabled }}
|
||||
- port: {{ .Values.nginx.https.externalPort }}
|
||||
targetPort: {{ .Values.nginx.https.internalPort }}
|
||||
protocol: TCP
|
||||
name: https
|
||||
{{- end }}
|
||||
{{- else }} # DEPRECATED
|
||||
- port: {{ .Values.nginx.externalPortHttps }}
|
||||
targetPort: {{ .Values.nginx.internalPortHttps }}
|
||||
protocol: TCP
|
||||
name: https
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
component: {{ .Values.nginx.name }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
@@ -1,24 +0,0 @@
|
||||
artifactory:
|
||||
primary:
|
||||
resources:
|
||||
requests:
|
||||
memory: "6Gi"
|
||||
cpu: "4"
|
||||
limits:
|
||||
memory: "10Gi"
|
||||
cpu: "8"
|
||||
javaOpts:
|
||||
xms: "6g"
|
||||
xmx: "8g"
|
||||
node:
|
||||
replicaCount: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "6Gi"
|
||||
cpu: "4"
|
||||
limits:
|
||||
memory: "10Gi"
|
||||
cpu: "8"
|
||||
javaOpts:
|
||||
xms: "6g"
|
||||
xmx: "8g"
|
||||
@@ -1,24 +0,0 @@
|
||||
artifactory:
|
||||
primary:
|
||||
resources:
|
||||
requests:
|
||||
memory: "4Gi"
|
||||
cpu: "2"
|
||||
limits:
|
||||
memory: "8Gi"
|
||||
cpu: "6"
|
||||
javaOpts:
|
||||
xms: "4g"
|
||||
xmx: "6g"
|
||||
node:
|
||||
replicaCount: 2
|
||||
resources:
|
||||
requests:
|
||||
memory: "4Gi"
|
||||
cpu: "2"
|
||||
limits:
|
||||
memory: "8Gi"
|
||||
cpu: "6"
|
||||
javaOpts:
|
||||
xms: "4g"
|
||||
xmx: "6g"
|
||||
@@ -1,24 +0,0 @@
|
||||
artifactory:
|
||||
primary:
|
||||
resources:
|
||||
requests:
|
||||
memory: "4Gi"
|
||||
cpu: "2"
|
||||
limits:
|
||||
memory: "6Gi"
|
||||
cpu: "4"
|
||||
javaOpts:
|
||||
xms: "4g"
|
||||
xmx: "4g"
|
||||
node:
|
||||
replicaCount: 1
|
||||
resources:
|
||||
requests:
|
||||
memory: "4Gi"
|
||||
cpu: "2"
|
||||
limits:
|
||||
memory: "6Gi"
|
||||
cpu: "4"
|
||||
javaOpts:
|
||||
xms: "4g"
|
||||
xmx: "4g"
|
||||
Reference in New Issue
Block a user