Commit 30a68cc9 by jainishshah17 Committed by Guangbo

added chart version 0.12.16

parent 86841fab
File mode changed from 100644 to 100755
# JFrog Artifactory-ha Chart Changelog # JFrog Artifactory-ha Chart Changelog
All changes to this chart will be documented in this file. All changes to this chart will be documented in this file.
## [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 ## [0.8.3] - Jan 1, 2019
* Updated Artifactory version to 6.6.3 * Updated Artifactory version to 6.6.3
* Add support for `artifactory.extraEnvironmentVariables` to pass more environment variables to Artifactory * Add support for `artifactory.extraEnvironmentVariables` to pass more environment variables to Artifactory
......
apiVersion: v1 apiVersion: v1
name: artifactory-ha appVersion: 6.9.1
home: https://www.jfrog.com/artifactory/
version: 0.8.3
appVersion: 6.6.3
description: Universal Repository Manager supporting all major packaging formats, description: Universal Repository Manager supporting all major packaging formats,
build tools and CI servers. build tools and CI servers.
home: https://www.jfrog.com/artifactory/
icon: https://raw.githubusercontent.com/jfrog/artifactory-dcos/master/images/jfrog_med.png
keywords: keywords:
- artifactory - artifactory
- jfrog - jfrog
- devops - devops
maintainers:
- email: jainishs@jfrog.com
name: jainishshah17
- email: eldada@jfrog.com
name: eldada
- email: rimasm@jfrog.com
name: rimusz
name: artifactory-ha
sources: sources:
- https://bintray.com/jfrog/product/JFrog-Artifactory-Pro/view - https://bintray.com/jfrog/product/JFrog-Artifactory-Pro/view
- https://github.com/jfrog/charts - https://github.com/jfrog/charts
maintainers: version: 0.12.16
- name: jainishshah17
email: jainishs@jfrog.com
- name: eldada
email: eldada@jfrog.com
- name: rimusz
email: rimasm@jfrog.com
icon: https://raw.githubusercontent.com/jfrog/artifactory-dcos/master/images/jfrog_med.png
File mode changed from 100644 to 100755
...@@ -35,10 +35,11 @@ To install the chart with the release name `artifactory-ha`: ...@@ -35,10 +35,11 @@ To install the chart with the release name `artifactory-ha`:
helm install --name artifactory-ha jfrog/artifactory-ha helm install --name artifactory-ha jfrog/artifactory-ha
``` ```
### Deploying Artifactory with replicator enabled ### Deploying Artifactory with replicator
The [Artifactory replicator](https://www.jfrog.com/confluence/display/RTF/Replicator) is used with an [Enterprise Plus](https://www.jfrog.com/confluence/display/EP/Welcome+to+JFrog+Enterprise+Plus) license.
```bash ```bash
## Artifactory replicator is disabled by default. To enable it use the following: ## Artifactory replicator is disabled by default. When the replicator is enabled, the replicator.publicUrl parameter is required. To enable it use the following:
helm install --name artifactory --set artifactory.replicator.enabled=true jfrog/artifactory-ha helm install --name artifactory --set artifactory.replicator.enabled=true --set artifactory.replicator.publicUrl=<artifactory_url>:<replicator_port> jfrog/artifactory-ha
``` ```
### Accessing Artifactory ### Accessing Artifactory
...@@ -51,6 +52,16 @@ Once you have a new chart version, you can update your deployment with ...@@ -51,6 +52,16 @@ Once you have a new chart version, you can update your deployment with
helm upgrade artifactory-ha jfrog/artifactory-ha helm upgrade artifactory-ha jfrog/artifactory-ha
``` ```
If artifactory was installed without providing a value to postgresql.postgresPassword (a password was autogenerated), follow these instructions:
1. Get the current password by running:
```bash
POSTGRES_PASSWORD=$(kubectl get secret -n <namespace> <myrelease>-postgresql -o jsonpath="{.data.postgres-password}" | base64 --decode)
```
2. Upgrade the release by passing the previously auto-generated secret:
```bash
helm upgrade <myrelease> jfrog/artifactory-ha --set postgresql.postgresPassword=${POSTGRES_PASSWORD}
```
This will apply any configuration changes on your existing deployment. This will apply any configuration changes on your existing deployment.
### Artifactory memory and CPU resources ### Artifactory memory and CPU resources
...@@ -99,6 +110,47 @@ This is used to set how many replicas of a binary should be stored in the cluste ...@@ -99,6 +110,47 @@ This is used to set how many replicas of a binary should be stored in the cluste
Once this value is set on initial deployment, you can not update it using helm. Once this value is set on initial deployment, you can not update it using helm.
It is recommended to set this to a number greater than half of your cluster's size, and never scale your cluster down to a size smaller than this number. It is recommended to set this to a number greater than half of your cluster's size, and never scale your cluster down to a size smaller than this number.
#### Existing volume claim
###### Primary node
In order to use an existing volume claim for the Artifactory primary storage, you need to:
- Create a persistent volume claim by the name `volume-<release-name>-artifactory-ha-primary-0` e.g `volume-myrelease-artifactory-ha-primary-0`
- Pass a parameter to `helm install` and `helm upgrade`
```bash
...
--set artifactory.primary.persistence.existingClaim=true
```
###### Member nodes
In order to use an existing volume claim for the Artifactory member nodes storage, you need to:
- Create persistent volume claims according to the number of replicas defined at `artifactory.node.replicaCount` by the names `volume-<release-name>-artifactory-ha-member-<ordinal-number>`, e.g `volume-myrelease-artifactory-ha-member-0` and `volume-myrelease-artifactory-ha-primary-1`.
- Pass a parameter to `helm install` and `helm upgrade`
```bash
...
--set artifactory.node.persistence.existingClaim=true
```
#### Existing shared volume claim
In order to use an existing claim (for data and backup) that is to be shared across all nodes, you need to:
- Create PVCs with ReadWriteMany that match the naming conventions:
```
{{ template "artifactory-ha.fullname" . }}-data-pvc-<claim-ordinal>
{{ template "artifactory-ha.fullname" . }}-backup-pvc-<claim-ordinal>
```
An example that shows 2 existing claims to be used:
```
myexample-artifactory-ha-data-pvc-0
myexample-artifactory-ha-backup-pvc-0
myexample-artifactory-ha-data-pvc-1
myexample-artifactory-ha-backup-pvc-1
```
- Set the artifactory.persistence.file-system.existingSharedClaim.enabled in values.yaml to true:
```
-- set artifactory.persistence.fileSystem.existingSharedClaim.enabled=true
```
#### NFS #### NFS
To use an NFS server as your cluster's storage, you need to To use an NFS server as your cluster's storage, you need to
- Setup an NFS server. Get its IP as `NFS_IP` - Setup an NFS server. Get its IP as `NFS_IP`
...@@ -112,7 +164,7 @@ To use an NFS server as your cluster's storage, you need to ...@@ -112,7 +164,7 @@ To use an NFS server as your cluster's storage, you need to
``` ```
#### Google Storage #### Google Storage
To use a Google Storage bucket as the cluster's filestore To use a Google Storage bucket as the cluster's filestore. See [Google Storage Binary Provider](https://www.jfrog.com/confluence/display/RTF/Configuring+the+Filestore#ConfiguringtheFilestore-GoogleStorageBinaryProvider)
- Pass Google Storage parameters to `helm install` and `helm upgrade` - Pass Google Storage parameters to `helm install` and `helm upgrade`
```bash ```bash
... ...
...@@ -123,7 +175,7 @@ To use a Google Storage bucket as the cluster's filestore ...@@ -123,7 +175,7 @@ To use a Google Storage bucket as the cluster's filestore
``` ```
#### AWS S3 #### AWS S3
To use an AWS S3 bucket as the cluster's filestore To use an AWS S3 bucket as the cluster's filestore. See [S3 Binary Provider](https://www.jfrog.com/confluence/display/RTF/Configuring+the+Filestore#ConfiguringtheFilestore-S3BinaryProvider)
- Pass AWS S3 parameters to `helm install` and `helm upgrade` - Pass AWS S3 parameters to `helm install` and `helm upgrade`
```bash ```bash
... ...
...@@ -145,6 +197,19 @@ To use an AWS S3 bucket as the cluster's filestore ...@@ -145,6 +197,19 @@ To use an AWS S3 bucket as the cluster's filestore
``` ```
**NOTE:** Make sure S3 `endpoint` and `region` match. See [AWS documentation on endpoint](https://docs.aws.amazon.com/general/latest/gr/rande.html) **NOTE:** Make sure S3 `endpoint` and `region` match. See [AWS documentation on endpoint](https://docs.aws.amazon.com/general/latest/gr/rande.html)
#### Microsoft Azure Blob Storage
To use Azure Blob Storage as the cluster's filestore. See [Azure Blob Storage Binary Provider](https://www.jfrog.com/confluence/display/RTF/Configuring+the+Filestore#ConfiguringtheFilestore-AzureBlobStorageClusterBinaryProvider)
- Pass Azure Blob Storage parameters to `helm install` and `helm upgrade`
```bash
...
--set artifactory.persistence.type=azure-blob \
--set artifactory.persistence.azureBlob.accountName=${AZURE_ACCOUNT_NAME} \
--set artifactory.persistence.azureBlob.accountKey=${AZURE_ACCOUNT_KEY} \
--set artifactory.persistence.azureBlob.endpoint=${AZURE_ENDPOINT} \
--set artifactory.persistence.azureBlob.containerName=${AZURE_CONTAINER_NAME} \
...
```
### Create a unique Master Key ### Create a unique Master Key
Artifactory HA cluster requires a unique master key. By default the chart has one set in values.yaml (`artifactory.masterKey`). Artifactory HA cluster requires a unique master key. By default the chart has one set in values.yaml (`artifactory.masterKey`).
...@@ -176,7 +241,9 @@ helm install --name artifactory-ha --set artifactory.masterKeySecretName=my-secr ...@@ -176,7 +241,9 @@ helm install --name artifactory-ha --set artifactory.masterKeySecretName=my-secr
### Install Artifactory HA license ### Install Artifactory HA license
For activating Artifactory HA, you must install an appropriate license. There are two ways to manage the license. **Artifactory UI** or a **Kubernetes Secret**. For activating Artifactory HA, you must install an appropriate license. There are two ways to manage the license. **Artifactory UI** or a **Kubernetes Secret**.
The easier and recommended way is the **Artifactory UI**. Using the **Kubernetes Secret** is for advanced users and is better suited for automation. The easier and recommended way is the **Artifactory UI**. Using the **Kubernetes Secret** is for advanced users and is better suited for automation.
**IMPORTANT:** You should use only one of the following methods. Switching between them while a cluster is running might disable your Artifactory HA cluster! **IMPORTANT:** You should use only one of the following methods. Switching between them while a cluster is running might disable your Artifactory HA cluster!
##### Artifactory UI ##### Artifactory UI
...@@ -195,6 +262,60 @@ helm install --name artifactory-ha --set artifactory.license.secret=artifactory- ...@@ -195,6 +262,60 @@ helm install --name artifactory-ha --set artifactory.license.secret=artifactory-
**NOTE:** This method is relevant for initial deployment only! Once Artifactory is deployed, you should not keep passing these parameters as the license is already persisted into Artifactory's storage (they will be ignored). **NOTE:** This method is relevant for initial deployment only! Once Artifactory is deployed, you should not keep passing these parameters as the license is already persisted into Artifactory's storage (they will be ignored).
Updating the license should be done via Artifactory UI or REST API. Updating the license should be done via Artifactory UI or REST API.
##### Create the secret as part of the helm release
values.yaml
```yaml
artifactory:
license:
licenseKey: |-
<LICENSE_KEY1>
<LICENSE_KEY2>
<LICENSE_KEY3>
```
```bash
helm install --name artifactory-ha -f values.yaml jfrog/artifactory-ha
```
**NOTE:** This method is relevant for initial deployment only! Once Artifactory is deployed, you should not keep passing these parameters as the license is already persisted into Artifactory's storage (they will be ignored).
Updating the license should be done via Artifactory UI or REST API.
If you want to keep managing the artifactory license using the same method, you can use the copyOnEveryStartup example shown in the values.yaml file
### Configure NetworkPolicy
NetworkPolicy specifies what ingress and egress is allowed in this namespace. It is encouraged to be more specific whenever possible to increase security of the system.
In the `networkpolicy` section of values.yaml you can specify a list of NetworkPolicy objects.
For podSelector, ingress and egress, if nothing is provided then a default `- {}` is applied which is to allow everything.
A full (but very wide open) example that results in 2 NetworkPolicy objects being created:
```
networkpolicy:
# Allows all ingress and egress to/from artifactory primary and member pods.
- name: artifactory
podSelector:
matchLabels:
app: artifactory-ha
egress:
- {}
ingress:
- {}
# Allows connectivity from artifactory-ha pods to postgresql pods, but no traffic leaving postgresql pod.
- name: postgres
podSelector:
matchLabels:
app: postgresql
ingress:
- from:
- podSelector:
matchLabels:
app: artifactory-ha
```
### Bootstrapping Artifactory ### Bootstrapping Artifactory
**IMPORTANT:** Bootstrapping Artifactory needs license. Pass license as shown in above section. **IMPORTANT:** Bootstrapping Artifactory needs license. Pass license as shown in above section.
...@@ -283,7 +404,7 @@ This can be done with the following parameters ...@@ -283,7 +404,7 @@ This can be done with the following parameters
# Make sure your Artifactory Docker image has the MySQL database driver in it # Make sure your Artifactory Docker image has the MySQL database driver in it
... ...
--set postgresql.enabled=false \ --set postgresql.enabled=false \
--set artifactory.preStartCommand="curl -L -o /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.41.jar https://jcenter.bintray.com/mysql/mysql-connector-java/5.1.41/mysql-connector-java-5.1.41.jar" \ --set artifactory.preStartCommand="wget -O /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.41.jar https://jcenter.bintray.com/mysql/mysql-connector-java/5.1.41/mysql-connector-java-5.1.41.jar" \
--set database.type=mysql \ --set database.type=mysql \
--set database.host=${DB_HOST} \ --set database.host=${DB_HOST} \
--set database.port=${DB_PORT} \ --set database.port=${DB_PORT} \
...@@ -330,8 +451,96 @@ Once created, you pass it to `helm` ...@@ -330,8 +451,96 @@ Once created, you pass it to `helm`
helm install --name artifactory-ha --set imagePullSecrets=regsecret jfrog/artifactory-ha helm install --name artifactory-ha --set imagePullSecrets=regsecret jfrog/artifactory-ha
``` ```
## Configuration ### Logger sidecars
This chart provides the option to add sidecars to tail various logs from Artifactory. See the available values in [values.yaml](values.yaml)
Get list of containers in the pod
```bash
kubectl get pods -n <NAMESPACE> <POD_NAME> -o jsonpath='{.spec.containers[*].name}' | tr ' ' '\n'
```
View specific log
```bash
kubectl logs -n <NAMESPACE> <POD_NAME> -c <LOG_CONTAINER_NAME>
```
### Custom init containers
There are cases where a special, unsupported init processes is needed like checking something on the file system or testing something before spinning up the main container.
For this, there is a section for writing a custom init container in the [values.yaml](values.yaml). By default it's commented out
```
artifactory:
## Add custom init containers
customInitContainers: |
## Init containers template goes here ##
```
### Custom sidecar containers
There are cases where an extra sidecar container is needed. For example monitoring agents or log collection.
For this, there is a section for writing a custom sidecar container in the [values.yaml](values.yaml). By default it's commented out
```
artifactory:
## Add custom sidecar containers
customSidecarContainers: |
## Sidecar containers template goes here ##
```
You can configure the sidecar to run as a custom user if needed by setting the following in the container template
```
# Example of running container as root (id 0)
securityContext:
runAsUser: 0
fsGroup: 0
```
### Custom volumes
If you need to use a custom volume in a custom init or sidecar container, you can use this option.
For this, there is a section for defining custom volumes in the [values.yaml](values.yaml). By default it's commented out
```
artifactory:
## Add custom volumes
customVolumes: |
## Custom volume comes here ##
```
### Add Artifactory User Plugin during installation
If you need to add [Artifactory User Plugin](https://github.com/jfrog/artifactory-user-plugins), you can use this option.
Create a secret with [Artifactory User Plugin](https://github.com/jfrog/artifactory-user-plugins) by following command:
```
# Secret with single user plugin
kubectl create secret generic archive-old-artifacts --from-file=archiveOldArtifacts.groovy --namespace=artifactory-ha
# Secret with single user plugin with configuration file
kubectl create secret generic webhook --from-file=webhook.groovy --from-file=webhook.config.json.sample --namespace=artifactory-ha
```
Add plugin secret names to `plugins.yaml` as following:
```yaml
artifactory:
userPluginSecrets:
- archive-old-artifacts
- webhook
```
You can now pass the created `plugins.yaml` file to helm install command to deploy Artifactory with user plugins as follows:
```
helm install --name artifactory-ha -f plugins.yaml jfrog/artifactory-ha
```
Alternatively, you may be in a situation in which you would like to create a secret in a Helm chart that depends on this chart. In this scenario, the name of the secret is likely dynamically generated via template functions, so passing a statically named secret isn't possible. In this case, the chart supports evaluating strings as templates via the [`tpl`](https://helm.sh/docs/charts_tips_and_tricks/#using-the-tpl-function) function - simply pass the raw string containing the templating language used to name your secret as a value instead by adding the following to your chart's `values.yaml` file:
```yaml
artifactory-ha: # Name of the artifactory-ha dependency
artifactory:
userPluginSecrets:
- '{{ template "my-chart.fullname" . }}'
```
NOTE: By defining userPluginSecrets, this overrides any pre-defined plugins from the container image that are stored in /tmp/plugins. At this time [artifactory-pro:6.9.0](https://bintray.com/jfrog/artifactory-pro) is distributed with `internalUser.groovy` plugin. If you need this plugin in addition to your user plugins, you should include these additional plugins as part of your userPluginSecrets.
## Configuration
The following table lists the configurable parameters of the artifactory chart and their default values. The following table lists the configurable parameters of the artifactory chart and their default values.
| Parameter | Description | Default | | Parameter | Description | Default |
...@@ -341,14 +550,27 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -341,14 +550,27 @@ The following table lists the configurable parameters of the artifactory chart a
| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the fullname template | | `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the fullname template |
| `rbac.create` | Specifies whether RBAC resources should be created | `true` | | `rbac.create` | Specifies whether RBAC resources should be created | `true` |
| `rbac.role.rules` | Rules to create | `[]` | | `rbac.role.rules` | Rules to create | `[]` |
| `logger.image.repository` | repository for logger image | `busybox` |
| `logger.image.tag` | tag for logger image | `1.30` |
| `artifactory.name` | Artifactory name | `artifactory` | | `artifactory.name` | Artifactory name | `artifactory` |
| `artifactory.image.pullPolicy` | Container pull policy | `IfNotPresent` | | `artifactory.image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `artifactory.image.repository` | Container image | `docker.bintray.io/jfrog/artifactory-pro` | | `artifactory.image.repository` | Container image | `docker.bintray.io/jfrog/artifactory-pro` |
| `artifactory.image.version` | Container image tag | `.Chart.AppVersion` | | `artifactory.image.version` | Container image tag | `.Chart.AppVersion` |
| `artifactory.loggers` | Artifactory loggers (see values.yaml for possible values) | `[]` |
| `artifactory.catalinaLoggers` | Artifactory Tomcat loggers (see values.yaml for possible values) | `[]` |
| `artifactory.customInitContainers`| Custom init containers | |
| `artifactory.customSidecarContainers`| Custom sidecar containers | |
| `artifactory.customVolumes` | Custom volumes | |
| `artifactory.customVolumeMounts` | Custom Artifactory volumeMounts | |
| `artifactory.userPluginSecrets` | Array of secret names for Artifactory user plugins | |
| `artifactory.masterKey` | Artifactory Master Key. Can be generated with `openssl rand -hex 32` |`FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF`| | `artifactory.masterKey` | Artifactory Master Key. Can be generated with `openssl rand -hex 32` |`FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF`|
| `artifactory.masterKeySecretName` | Artifactory Master Key secret name | | | `artifactory.masterKeySecretName` | Artifactory Master Key secret name | |
| `artifactory.accessAdmin.password` | Artifactory access-admin password to be set upon startup| |
| `artifactory.accessAdmin.secret` | Artifactory access-admin secret name | |
| `artifactory.accessAdmin.dataKey` | Artifactory access-admin secret data key | |
| `artifactory.preStartCommand` | Command to run before entrypoint starts | | | `artifactory.preStartCommand` | Command to run before entrypoint starts | |
| `artifactory.postStartCommand` | Command to run after container starts | | | `artifactory.postStartCommand` | Command to run after container starts | |
| `artifactory.license.licenseKey` | Artifactory license key. Providing the license key as a parameter will cause a secret containing the license key to be created as part of the release. Use either this setting or the license.secret and license.dataKey. If you use both, the latter will be used. | |
| `artifactory.license.secret` | Artifactory license secret name | | | `artifactory.license.secret` | Artifactory license secret name | |
| `artifactory.license.dataKey`| Artifactory license secret data key | | | `artifactory.license.dataKey`| Artifactory license secret data key | |
| `artifactory.service.name` | Artifactory service name to be set in Nginx configuration | `artifactory` | | `artifactory.service.name` | Artifactory service name to be set in Nginx configuration | `artifactory` |
...@@ -358,19 +580,22 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -358,19 +580,22 @@ The following table lists the configurable parameters of the artifactory chart a
| `artifactory.internalPort` | Artifactory service internal port | `8081` | | `artifactory.internalPort` | Artifactory service internal port | `8081` |
| `artifactory.internalPortReplicator` | Replicator service internal port | `6061` | | `artifactory.internalPortReplicator` | Replicator service internal port | `6061` |
| `artifactory.externalPortReplicator` | Replicator service external port | `6061` | | `artifactory.externalPortReplicator` | Replicator service external port | `6061` |
| `artifactory.extraEnvironmentVariables` | Extra environment variables to pass to Artifactory. See [documentation](https://www.jfrog.com/confluence/display/RTF/Installing+with+Docker#InstallingwithDocker-SupportedEnvironmentVariables) | | | `artifactory.extraEnvironmentVariables` | Extra environment variables to pass to Artifactory. Supports evaluating strings as templates via the [`tpl`](https://helm.sh/docs/charts_tips_and_tricks/#using-the-tpl-function) function. See [documentation](https://www.jfrog.com/confluence/display/RTF/Installing+with+Docker#InstallingwithDocker-SupportedEnvironmentVariables) | |
| `artifactory.livenessProbe.enabled` | Enable liveness probe | `true` | | `artifactory.livenessProbe.enabled` | Enable liveness probe | `true` |
| `artifactory.livenessProbe.path` | liveness probe HTTP Get path | `/artifactory/webapp/#/login` |
| `artifactory.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 180 | | `artifactory.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 180 |
| `artifactory.livenessProbe.periodSeconds` | How often to perform the probe | 10 | | `artifactory.livenessProbe.periodSeconds` | How often to perform the probe | 10 |
| `artifactory.livenessProbe.timeoutSeconds` | When the probe times out | 10 | | `artifactory.livenessProbe.timeoutSeconds` | When the probe times out | 10 |
| `artifactory.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 | | `artifactory.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
| `artifactory.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 | | `artifactory.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 |
| `artifactory.readinessProbe.enabled` | would you like a readinessProbe to be enabled | `true` | | `artifactory.readinessProbe.enabled` | would you like a readinessProbe to be enabled | `true` |
| `artifactory.readinessProbe.path` | readiness probe HTTP Get path | `/artifactory/webapp/#/login` |
| `artifactory.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 60 | | `artifactory.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 60 |
| `artifactory.readinessProbe.periodSeconds` | How often to perform the probe | 10 | | `artifactory.readinessProbe.periodSeconds` | How often to perform the probe | 10 |
| `artifactory.readinessProbe.timeoutSeconds` | When the probe times out | 10 | | `artifactory.readinessProbe.timeoutSeconds` | When the probe times out | 10 |
| `artifactory.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 | | `artifactory.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
| `artifactory.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 | | `artifactory.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 |
| `artifactory.copyOnEveryStartup` | List of files to copy on startup from source (which is absolute) to target (which is relative to ARTIFACTORY_HOME | |
| `artifactory.persistence.mountPath` | Artifactory persistence volume mount path | `"/var/opt/jfrog/artifactory"` | | `artifactory.persistence.mountPath` | Artifactory persistence volume mount path | `"/var/opt/jfrog/artifactory"` |
| `artifactory.persistence.enabled` | Artifactory persistence volume enabled | `true` | | `artifactory.persistence.enabled` | Artifactory persistence volume enabled | `true` |
| `artifactory.persistence.accessMode` | Artifactory persistence volume access mode | `ReadWriteOnce` | | `artifactory.persistence.accessMode` | Artifactory persistence volume access mode | `ReadWriteOnce` |
...@@ -384,10 +609,12 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -384,10 +609,12 @@ The following table lists the configurable parameters of the artifactory chart a
| `artifactory.persistence.nfs.dataDir` | HA data directory | `/var/opt/jfrog/artifactory-ha` | | `artifactory.persistence.nfs.dataDir` | HA data directory | `/var/opt/jfrog/artifactory-ha` |
| `artifactory.persistence.nfs.backupDir` | HA backup directory | `/var/opt/jfrog/artifactory-backup` | | `artifactory.persistence.nfs.backupDir` | HA backup directory | `/var/opt/jfrog/artifactory-backup` |
| `artifactory.persistence.nfs.capacity` | NFS PVC size | `200Gi` | | `artifactory.persistence.nfs.capacity` | NFS PVC size | `200Gi` |
| `artifactory.persistence.eventual.numberOfThreads` | Eventual number of threads | `10` |
| `artifactory.persistence.googleStorage.bucketName` | Google Storage bucket name | `artifactory-ha` | | `artifactory.persistence.googleStorage.bucketName` | Google Storage bucket name | `artifactory-ha` |
| `artifactory.persistence.googleStorage.identity` | Google Storage service account id | | | `artifactory.persistence.googleStorage.identity` | Google Storage service account id | |
| `artifactory.persistence.googleStorage.credential` | Google Storage service account key | | | `artifactory.persistence.googleStorage.credential` | Google Storage service account key | |
| `artifactory.persistence.googleStorage.path` | Google Storage path in bucket | `artifactory-ha/filestore` | | `artifactory.persistence.googleStorage.path` | Google Storage path in bucket | `artifactory-ha/filestore` |
| `artifactory.persistence.googleStorage.bucketExists`| Google Storage bucket exists therefore does not need to be created.| `false` |
| `artifactory.persistence.awsS3.bucketName` | AWS S3 bucket name | `artifactory-ha` | | `artifactory.persistence.awsS3.bucketName` | AWS S3 bucket name | `artifactory-ha` |
| `artifactory.persistence.awsS3.endpoint` | AWS S3 bucket endpoint | See https://docs.aws.amazon.com/general/latest/gr/rande.html | | `artifactory.persistence.awsS3.endpoint` | AWS S3 bucket endpoint | See https://docs.aws.amazon.com/general/latest/gr/rande.html |
| `artifactory.persistence.awsS3.region` | AWS S3 bucket region | | | `artifactory.persistence.awsS3.region` | AWS S3 bucket region | |
...@@ -398,6 +625,15 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -398,6 +625,15 @@ The following table lists the configurable parameters of the artifactory chart a
| `artifactory.persistence.awsS3.path` | AWS S3 path in bucket | `artifactory-ha/filestore` | | `artifactory.persistence.awsS3.path` | AWS S3 path in bucket | `artifactory-ha/filestore` |
| `artifactory.persistence.awsS3.refreshCredentials` | AWS S3 renew credentials on expiration | `true` (When roleName is used, this parameter will be set to true) | | `artifactory.persistence.awsS3.refreshCredentials` | AWS S3 renew credentials on expiration | `true` (When roleName is used, this parameter will be set to true) |
| `artifactory.persistence.awsS3.testConnection` | AWS S3 test connection on start up | `false` | | `artifactory.persistence.awsS3.testConnection` | AWS S3 test connection on start up | `false` |
| `artifactory.persistence.awsS3.s3AwsVersion` | AWS S3 signature version | `AWS4-HMAC-SHA256` |
| `artifactory.persistence.azureBlob.accountName` | Azure Blob Storage account name | `` |
| `artifactory.persistence.azureBlob.accountKey` | Azure Blob Storage account key | `` |
| `artifactory.persistence.azureBlob.endpoint` | Azure Blob Storage endpoint | `` |
| `artifactory.persistence.azureBlob.containerName` | Azure Blob Storage container name | `` |
| `artifactory.persistence.azureBlob.testConnection` | Azure Blob Storage test connection | `false` |
| `artifactory.persistence.fileStorage.existingSharedClaim` | Enable using an existing shared pvc | `false` |
| `artifactory.persistence.fileStorage.dataDir` | HA data directory | `/var/opt/jfrog/artifactory/artifactory-data` |
| `artifactory.persistence.fileStorage.backupDir` | HA backup directory | `/var/opt/jfrog/artifactory-backup` |
| `artifactory.javaOpts.other` | Artifactory additional java options (for all nodes) | | | `artifactory.javaOpts.other` | Artifactory additional java options (for all nodes) | |
| `artifactory.replicator.enabled` | Enable Artifactory Replicator | `false` | | `artifactory.replicator.enabled` | Enable Artifactory Replicator | `false` |
| `artifactory.replicator.publicUrl` | Artifactory Replicator Public URL | | | `artifactory.replicator.publicUrl` | Artifactory Replicator Public URL | |
...@@ -408,6 +644,7 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -408,6 +644,7 @@ The following table lists the configurable parameters of the artifactory chart a
| `artifactory.primary.javaOpts.xms` | Artifactory primary node java Xms size | | | `artifactory.primary.javaOpts.xms` | Artifactory primary node java Xms size | |
| `artifactory.primary.javaOpts.xmx` | Artifactory primary node java Xms size | | | `artifactory.primary.javaOpts.xmx` | Artifactory primary node java Xms size | |
| `artifactory.primary.javaOpts.other` | Artifactory primary node additional java options | | | `artifactory.primary.javaOpts.other` | Artifactory primary node additional java options | |
| `artifactory.primary.persistence.existingClaim` | Whether to use an existing pvc for the primary node | `false` |
| `artifactory.node.replicaCount` | Artifactory member node replica count | `2` | | `artifactory.node.replicaCount` | Artifactory member node replica count | `2` |
| `artifactory.node.minAvailable` | Artifactory member node min available count | `1` | | `artifactory.node.minAvailable` | Artifactory member node min available count | `1` |
| `artifactory.node.resources.requests.memory` | Artifactory member node initial memory request | | | `artifactory.node.resources.requests.memory` | Artifactory member node initial memory request | |
...@@ -417,9 +654,13 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -417,9 +654,13 @@ The following table lists the configurable parameters of the artifactory chart a
| `artifactory.node.javaOpts.xms` | Artifactory member node java Xms size | | | `artifactory.node.javaOpts.xms` | Artifactory member node java Xms size | |
| `artifactory.node.javaOpts.xmx` | Artifactory member node java Xms size | | | `artifactory.node.javaOpts.xmx` | Artifactory member node java Xms size | |
| `artifactory.node.javaOpts.other` | Artifactory member node additional java options | | | `artifactory.node.javaOpts.other` | Artifactory member node additional java options | |
| `artifactory.node.persistence.existingClaim` | Whether to use existing PVCs for the member nodes | `false` |
| `artifactory.terminationGracePeriodSeconds` | Termination grace period (seconds) | `30s` |
| `ingress.enabled` | If true, Artifactory Ingress will be created | `false` | | `ingress.enabled` | If true, Artifactory Ingress will be created | `false` |
| `ingress.annotations` | Artifactory Ingress annotations | `{}` | | `ingress.annotations` | Artifactory Ingress annotations | `{}` |
| `ingress.labels` | Artifactory Ingress labels | `{}` |
| `ingress.hosts` | Artifactory Ingress hostnames | `[]` | | `ingress.hosts` | Artifactory Ingress hostnames | `[]` |
| `ingress.path` | Artifactory Ingress path | `/` |
| `ingress.tls` | Artifactory Ingress TLS configuration (YAML) | `[]` | | `ingress.tls` | Artifactory Ingress TLS configuration (YAML) | `[]` |
| `ingress.defaultBackend.enabled` | If true, the default `backend` will be added using serviceName and servicePort | `true` | | `ingress.defaultBackend.enabled` | If true, the default `backend` will be added using serviceName and servicePort | `true` |
| `ingress.annotations` | Ingress annotations, which are written out if annotations section exists in values. Everything inside of the annotations section will appear verbatim inside the resulting manifest. See `Ingress annotations` section below for examples of how to leverage the annotations, specifically for how to enable docker authentication. | | | `ingress.annotations` | Ingress annotations, which are written out if annotations section exists in values. Everything inside of the annotations section will appear verbatim inside the resulting manifest. See `Ingress annotations` section below for examples of how to leverage the annotations, specifically for how to enable docker authentication. | |
...@@ -427,10 +668,11 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -427,10 +668,11 @@ The following table lists the configurable parameters of the artifactory chart a
| `nginx.name` | Nginx name | `nginx` | | `nginx.name` | Nginx name | `nginx` |
| `nginx.replicaCount` | Nginx replica count | `1` | | `nginx.replicaCount` | Nginx replica count | `1` |
| `nginx.uid` | Nginx User Id | `104` | | `nginx.uid` | Nginx User Id | `104` |
| `nginx.git` | Nginx Group Id | `107` | | `nginx.gid` | Nginx Group Id | `107` |
| `nginx.image.repository` | Container image | `docker.bintray.io/jfrog/nginx-artifactory-pro` | | `nginx.image.repository` | Container image | `docker.bintray.io/jfrog/nginx-artifactory-pro` |
| `nginx.image.version` | Container version | `.Chart.AppVersion` | | `nginx.image.version` | Container version | `.Chart.AppVersion` |
| `nginx.image.pullPolicy` | Container pull policy | `IfNotPresent` | | `nginx.image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `nginx.loggers` | Artifactory loggers (see values.yaml for possible values) | `[]` |
| `nginx.service.type` | Nginx service type | `LoadBalancer` | | `nginx.service.type` | Nginx service type | `LoadBalancer` |
| `nginx.service.loadBalancerSourceRanges`| Nginx service array of IP CIDR ranges to whitelist (only when service type is LoadBalancer) | | | `nginx.service.loadBalancerSourceRanges`| Nginx service array of IP CIDR ranges to whitelist (only when service type is LoadBalancer) | |
| `nginx.service.annotations` | Nginx service annotations | `{}` | | `nginx.service.annotations` | Nginx service annotations | `{}` |
...@@ -443,12 +685,14 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -443,12 +685,14 @@ The following table lists the configurable parameters of the artifactory chart a
| `nginx.internalPortReplicator` | Replicator service internal port | `6061` | | `nginx.internalPortReplicator` | Replicator service internal port | `6061` |
| `nginx.externalPortReplicator` | Replicator service external port | `6061` | | `nginx.externalPortReplicator` | Replicator service external port | `6061` |
| `nginx.livenessProbe.enabled` | would you like a liveness Probe to be enabled | `true` | | `nginx.livenessProbe.enabled` | would you like a liveness Probe to be enabled | `true` |
| `nginx.livenessProbe.path` | liveness probe HTTP Get path | `/artifactory/webapp/#/login` |
| `nginx.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 100 | | `nginx.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 100 |
| `nginx.livenessProbe.periodSeconds` | How often to perform the probe | 10 | | `nginx.livenessProbe.periodSeconds` | How often to perform the probe | 10 |
| `nginx.livenessProbe.timeoutSeconds` | When the probe times out | 10 | | `nginx.livenessProbe.timeoutSeconds` | When the probe times out | 10 |
| `nginx.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 | | `nginx.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
| `nginx.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 | | `nginx.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 |
| `nginx.readinessProbe.enabled` | would you like a readinessProbe to be enabled | `true` | | `nginx.readinessProbe.enabled` | would you like a readinessProbe to be enabled | `true` |
| `nginx.readinessProbe.path` | Readiness probe HTTP Get path | `/artifactory/webapp/#/login` |
| `nginx.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 60 | | `nginx.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 60 |
| `nginx.readinessProbe.periodSeconds` | How often to perform the probe | 10 | | `nginx.readinessProbe.periodSeconds` | How often to perform the probe | 10 |
| `nginx.readinessProbe.timeoutSeconds` | When the probe times out | 10 | | `nginx.readinessProbe.timeoutSeconds` | When the probe times out | 10 |
...@@ -463,6 +707,10 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -463,6 +707,10 @@ The following table lists the configurable parameters of the artifactory chart a
| `nginx.resources.requests.cpu` | Nginx initial cpu request | `100m` | | `nginx.resources.requests.cpu` | Nginx initial cpu request | `100m` |
| `nginx.resources.limits.memory` | Nginx memory limit | `250Mi` | | `nginx.resources.limits.memory` | Nginx memory limit | `250Mi` |
| `nginx.resources.limits.cpu` | Nginx cpu limit | `500m` | | `nginx.resources.limits.cpu` | Nginx cpu limit | `500m` |
| `nginx.persistence.mountPath` | Nginx persistence volume mount path | `"/var/opt/jfrog/nginx"` |
| `nginx.persistence.enabled` | Nginx persistence volume enabled. This is only available when the nginx.replicaCount is set to 1 | `false` |
| `nginx.persistence.accessMode` | Nginx persistence volume access mode | `ReadWriteOnce` |
| `nginx.persistence.size` | Nginx persistence volume size | `5Gi` |
| `postgresql.enabled` | Use enclosed PostgreSQL as database | `true` | | `postgresql.enabled` | Use enclosed PostgreSQL as database | `true` |
| `postgresql.imageTag` | PostgreSQL version | `9.6.11` | | `postgresql.imageTag` | PostgreSQL version | `9.6.11` |
| `postgresql.postgresDatabase` | PostgreSQL database name | `artifactory` | | `postgresql.postgresDatabase` | PostgreSQL database name | `artifactory` |
...@@ -487,6 +735,10 @@ The following table lists the configurable parameters of the artifactory chart a ...@@ -487,6 +735,10 @@ The following table lists the configurable parameters of the artifactory chart a
| `database.secrets.password.key` | External database password `Secret` key | | | `database.secrets.password.key` | External database password `Secret` key | |
| `database.secrets.url.name ` | External database url `Secret` name | | | `database.secrets.url.name ` | External database url `Secret` name | |
| `database.secrets.url.key` | External database url `Secret` key | | | `database.secrets.url.key` | External database url `Secret` key | |
| `networkpolicy.name` | Becomes part of the NetworkPolicy object name | `artifactory` |
| `networkpolicy.podselector` | Contains the YAML that specifies how to match pods. Usually using matchLabels. | |
| `networkpolicy.ingress` | YAML snippet containing to & from rules applied to incoming traffic | `- {}` (open to all inbound traffic) |
| `networkpolicy.egress` | YAML snippet containing to & from rules applied to outgoing traffic | `- {}` (open to all outbound traffic) |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
......
File mode changed from 100644 to 100755
artifactory:
persistence:
enabled: true
postgresql:
postgresPassword: "password"
postgresConfig:
maxConnections: "102"
persistence:
enabled: true
nginx:
enabled: false
service:
## For minikube, set this to NodePort, elsewhere use LoadBalancer
type: NodePort
ingress:
enabled: true
defaultBackend:
enabled: false
hosts:
- artifactory.test.com
annotations:
ingress.kubernetes.io/proxy-body-size: "0"
ingress.kubernetes.io/proxy-read-timeout: "600"
ingress.kubernetes.io/proxy-send-timeout: "600"
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-body-size: "0"
artifactory:
persistence:
enabled: true
postgresql:
postgresPassword: "password"
postgresConfig:
maxConnections: "102"
persistence:
enabled: true
nginx:
enabled: true
service:
## For minikube, set this to NodePort, elsewhere use LoadBalancer
type: NodePort
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
{{- if not (and .Values.artifactory.accessAdmin.secret .Values.artifactory.accessAdmin.dataKey) }}
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:
{{- if .Values.artifactory.accessAdmin.password }}
bootstrap.creds: {{ (printf "access-admin@127.0.0.1=%s" .Values.artifactory.accessAdmin.password) | b64enc }}
{{- else }}
bootstrap.creds: {{ (printf "access-admin@127.0.0.1=%s" (randAlphaNum 10)) | b64enc }}
{{- end }}
{{- end }}
\ No newline at end of file
...@@ -11,6 +11,34 @@ data: ...@@ -11,6 +11,34 @@ data:
binarystore.xml: |- binarystore.xml: |-
{{- if eq .Values.artifactory.persistence.type "file-system" }} {{- if eq .Values.artifactory.persistence.type "file-system" }}
<!-- File system replication --> <!-- File system replication -->
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
<!-- File Storage- Dynamic for Artifactory files, pre-created for DATA and BACKUP -->
<config version="4">
<chain>
<provider id="cache-fs" type="cache-fs"> <!-- This is a cached filestore -->
<provider id="sharding" type="sharding"> <!-- This is a sharding provider -->
{{- range $sharedClaimNumber, $e := until (.Values.artifactory.persistence.fileSystem.existingSharedClaim.numberOfExistingClaims|int) -}}
<sub-provider id="shard{{ $sharedClaimNumber }}" type="state-aware"/>
{{- end }}
</provider>
</provider>
</chain>
// Specify the read and write strategy and redundancy for the sharding binary provider
<provider id="sharding" type="sharding">
<readBehavior>roundRobin</readBehavior>
<writeBehavior>percentageFreeSpace</writeBehavior>
<redundancy>2</redundancy>
</provider>
{{- range $sharedClaimNumber, $e := until (.Values.artifactory.persistence.fileSystem.existingSharedClaim.numberOfExistingClaims|int) -}}
//For each sub-provider (mount), specify the filestore location
<provider id="shard{{ $sharedClaimNumber }}" type="state-aware">
<fileStoreDir>filestore{{ $sharedClaimNumber }}</fileStoreDir>
</provider>
{{- end }}
</config>
{{- else }}
<config version="2"> <config version="2">
<chain> <chain>
<provider id="cache-fs" type="cache-fs"> <provider id="cache-fs" type="cache-fs">
...@@ -42,6 +70,7 @@ data: ...@@ -42,6 +70,7 @@ data:
<property name="header.remote.block" value="true"/> <property name="header.remote.block" value="true"/>
</provider> </provider>
</config> </config>
{{- end }}
{{- end }} {{- end }}
{{- if eq .Values.artifactory.persistence.type "google-storage" }} {{- if eq .Values.artifactory.persistence.type "google-storage" }}
...@@ -91,6 +120,7 @@ data: ...@@ -91,6 +120,7 @@ data:
<identity>{{ .Values.artifactory.persistence.googleStorage.identity }}</identity> <identity>{{ .Values.artifactory.persistence.googleStorage.identity }}</identity>
<credential>{{ .Values.artifactory.persistence.googleStorage.credential }}</credential> <credential>{{ .Values.artifactory.persistence.googleStorage.credential }}</credential>
<path>{{ .Values.artifactory.persistence.googleStorage.path }}</path> <path>{{ .Values.artifactory.persistence.googleStorage.path }}</path>
<bucketExists>{{ .Values.artifactory.persistence.googleStorage.bucketExists }}</bucketExists>
</provider> </provider>
</config> </config>
{{- end }} {{- end }}
...@@ -141,6 +171,7 @@ data: ...@@ -141,6 +171,7 @@ data:
{{- else }} {{- else }}
<refreshCredentials>{{ .Values.artifactory.persistence.awsS3.refreshCredentials }}</refreshCredentials> <refreshCredentials>{{ .Values.artifactory.persistence.awsS3.refreshCredentials }}</refreshCredentials>
{{- end }} {{- end }}
<s3AwsVersion>{{ .Values.artifactory.persistence.awsS3.s3AwsVersion }}</s3AwsVersion>
<testConnection>{{ .Values.artifactory.persistence.awsS3.testConnection }}</testConnection> <testConnection>{{ .Values.artifactory.persistence.awsS3.testConnection }}</testConnection>
<httpsOnly>true</httpsOnly> <httpsOnly>true</httpsOnly>
<region>{{ .Values.artifactory.persistence.awsS3.region }}</region> <region>{{ .Values.artifactory.persistence.awsS3.region }}</region>
...@@ -158,3 +189,47 @@ data: ...@@ -158,3 +189,47 @@ data:
</provider> </provider>
</config> </config>
{{- end }} {{- end }}
{{- if eq .Values.artifactory.persistence.type "azure-blob" }}
<!-- Azure Blob Storage -->
<config version="2">
<chain> <!--template="cluster-azure-blob-storage"-->
<provider id="cache-fs" type="cache-fs">
<provider id="sharding-cluster" type="sharding-cluster">
<sub-provider id="eventual-cluster" type="eventual-cluster">
<provider id="retry-azure-blob-storage" type="retry">
<provider id="azure-blob-storage" type="azure-blob-storage"/>
</provider>
</sub-provider>
<dynamic-provider id="remote" type="remote"/>
</provider>
</provider>
</chain>
<!-- cluster eventual Azure Blob Storage Service default chain -->
<provider id="sharding-cluster" type="sharding-cluster">
<readBehavior>crossNetworkStrategy</readBehavior>
<writeBehavior>crossNetworkStrategy</writeBehavior>
<redundancy>2</redundancy>
<lenientLimit>1</lenientLimit>
<property name="zones" value="local,remote"/>
</provider>
<provider id="remote" type="remote">
<zone>remote</zone>
</provider>
<provider id="eventual-cluster" type="eventual-cluster">
<zone>local</zone>
</provider>
<!--cluster eventual template-->
<provider id="azure-blob-storage" type="azure-blob-storage">
<accountName>{{ .Values.artifactory.persistence.azureBlob.accountName }}</accountName>
<accountKey>{{ .Values.artifactory.persistence.azureBlob.accountKey }}</accountKey>
<endpoint>{{ .Values.artifactory.persistence.azureBlob.endpoint }}</endpoint>
<containerName>{{ .Values.artifactory.persistence.azureBlob.containerName }}</containerName>
<testConnection>{{ .Values.artifactory.persistence.azureBlob.testConnection }}</testConnection>
</provider>
</config>
{{- end }}
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": "JFrogInstaller_Helm_{{ template "artifactory-ha.chart" . }}",
"features": [
{
"featureId": "AppVersion/{{ default .Chart.AppVersion .Values.artifactory.image.version }}"
},
{
"featureId": "Installer/{{ default "helm" .Values.installer.type }}"
},
{
"featureId": "Platform/{{ default "kubernetes" .Values.installer.platform }}"
}
]
}
\ No newline at end of file
{{- 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 }}
\ No newline at end of file
{{- 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 -}}
\ No newline at end of file
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -32,6 +32,7 @@ spec: ...@@ -32,6 +32,7 @@ spec:
{{- end }} {{- end }}
spec: spec:
serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }} serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }}
terminationGracePeriodSeconds: {{ .Values.artifactory.terminationGracePeriodSeconds}}
{{- if .Values.imagePullSecrets }} {{- if .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
- name: {{ .Values.imagePullSecrets }} - name: {{ .Values.imagePullSecrets }}
...@@ -40,6 +41,21 @@ spec: ...@@ -40,6 +41,21 @@ spec:
runAsUser: {{ .Values.artifactory.uid }} runAsUser: {{ .Values.artifactory.uid }}
fsGroup: {{ .Values.artifactory.uid }} fsGroup: {{ .Values.artifactory.uid }}
initContainers: initContainers:
{{- 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 }}
command:
- 'sh'
- '-c'
- >
mkdir {{ .Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir }}
volumeMounts:
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
name: volume
{{- end }}
{{- end }}
- name: "remove-lost-found" - name: "remove-lost-found"
image: "{{ .Values.initContainerImage }}" image: "{{ .Values.initContainerImage }}"
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }} imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
...@@ -70,6 +86,9 @@ spec: ...@@ -70,6 +86,9 @@ spec:
{{- end }} {{- end }}
sleep 2; sleep 2;
done; done;
{{- if .Values.artifactory.customInitContainers }}
{{ tpl .Values.artifactory.customInitContainers . | indent 6 }}
{{- end }}
containers: containers:
- name: {{ .Values.artifactory.name }} - name: {{ .Values.artifactory.name }}
image: '{{ .Values.artifactory.image.repository }}:{{ default .Chart.AppVersion .Values.artifactory.image.version }}' image: '{{ .Values.artifactory.image.repository }}:{{ default .Chart.AppVersion .Values.artifactory.image.version }}'
...@@ -81,10 +100,15 @@ spec: ...@@ -81,10 +100,15 @@ spec:
- '/bin/sh' - '/bin/sh'
- '-c' - '-c'
- > - >
{{- if .Values.artifactory.userPluginSecrets }}
echo "Copying plugins";
cp -Lrf /tmp/plugin/*/* /tmp/plugins;
{{- end }}
echo "Running custom preStartCommand command"; echo "Running custom preStartCommand command";
{{ .Values.artifactory.preStartCommand }}; {{ .Values.artifactory.preStartCommand }};
/entrypoint-artifactory.sh /entrypoint-artifactory.sh
{{- end }} {{- end }}
{{- if .Values.artifactory.postStartCommand }}
lifecycle: lifecycle:
postStart: postStart:
exec: exec:
...@@ -92,11 +116,7 @@ spec: ...@@ -92,11 +116,7 @@ spec:
- '/bin/sh' - '/bin/sh'
- '-c' - '-c'
- > - >
{{- if .Values.artifactory.replicator.enabled }} echo;
mkdir -p /opt/jfrog/artifactory/replicator/etc;
cp -fv /tmp/replicator/replicator.yaml /opt/jfrog/artifactory/replicator/etc/replicator.yaml;
{{- end }}
{{- if .Values.artifactory.postStartCommand }}
{{ .Values.artifactory.postStartCommand }} {{ .Values.artifactory.postStartCommand }}
{{- end }} {{- end }}
env: env:
...@@ -160,18 +180,18 @@ spec: ...@@ -160,18 +180,18 @@ spec:
{{- end }} {{- end }}
- name: EXTRA_JAVA_OPTIONS - name: EXTRA_JAVA_OPTIONS
value: " value: "
{{- if .Values.artifactory.javaOpts.other }}
{{ .Values.artifactory.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.node.javaOpts.other }}
{{ .Values.artifactory.node.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.node.javaOpts.xms }} {{- if .Values.artifactory.node.javaOpts.xms }}
-Xms{{ .Values.artifactory.node.javaOpts.xms }} -Xms{{ .Values.artifactory.node.javaOpts.xms }}
{{- end}} {{- end}}
{{- if .Values.artifactory.node.javaOpts.xmx }} {{- if .Values.artifactory.node.javaOpts.xmx }}
-Xmx{{ .Values.artifactory.node.javaOpts.xmx }} -Xmx{{ .Values.artifactory.node.javaOpts.xmx }}
{{- end}} {{- end}}
{{- if .Values.artifactory.javaOpts.other }}
{{ .Values.artifactory.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.node.javaOpts.other }}
{{ .Values.artifactory.node.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.replicator.enabled }} {{- if .Values.artifactory.replicator.enabled }}
-Dartifactory.releasebundle.feature.enabled=true -Dartifactory.releasebundle.feature.enabled=true
{{- end }} {{- end }}
...@@ -195,6 +215,14 @@ spec: ...@@ -195,6 +215,14 @@ spec:
fieldPath: metadata.name fieldPath: metadata.name
- name: ART_PRIMARY_BASE_URL - name: ART_PRIMARY_BASE_URL
value: 'http://{{ template "artifactory-ha.primary.name" . }}:8081/artifactory' value: 'http://{{ template "artifactory-ha.primary.name" . }}:8081/artifactory'
{{- if eq .Values.artifactory.persistence.type "file-system" }}
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
- name: HA_DATA_DIR
value: "{{ .Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir }}"
- name: HA_BACKUP_DIR
value: "{{ .Values.artifactory.persistence.fileSystem.existingSharedClaim.backupDir }}"
{{- end }}
{{- end }}
{{- if eq .Values.artifactory.persistence.type "nfs" }} {{- if eq .Values.artifactory.persistence.type "nfs" }}
- name: HA_DATA_DIR - name: HA_DATA_DIR
value: "{{ .Values.artifactory.persistence.nfs.dataDir }}" value: "{{ .Values.artifactory.persistence.nfs.dataDir }}"
...@@ -203,13 +231,31 @@ spec: ...@@ -203,13 +231,31 @@ spec:
{{- end }} {{- end }}
{{- range .Values.artifactory.extraEnvironmentVariables }} {{- range .Values.artifactory.extraEnvironmentVariables }}
- name: {{ .name }} - name: {{ .name }}
value: '{{ .value }}' value: '{{ tpl .value $ }}'
{{- end }} {{- end }}
ports: ports:
- containerPort: {{ .Values.artifactory.internalPort }} - containerPort: {{ .Values.artifactory.internalPort }}
volumeMounts: volumeMounts:
{{- if .Values.artifactory.userPluginSecrets }}
- name: tmp-plugins
mountPath: "/tmp/plugins/"
{{- range .Values.artifactory.userPluginSecrets }}
- name: {{ tpl . $ }}
mountPath: "/tmp/plugin/{{ tpl . $ }}"
{{- end }}
{{- end }}
- name: volume - name: volume
mountPath: "{{ .Values.artifactory.persistence.mountPath }}" 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: "{{ $.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" }} {{- if eq .Values.artifactory.persistence.type "nfs" }}
- name: artifactory-ha-data - name: artifactory-ha-data
mountPath: "{{ .Values.artifactory.persistence.nfs.dataDir }}" mountPath: "{{ .Values.artifactory.persistence.nfs.dataDir }}"
...@@ -222,15 +268,18 @@ spec: ...@@ -222,15 +268,18 @@ spec:
{{- end }} {{- end }}
{{- if .Values.artifactory.replicator.enabled }} {{- if .Values.artifactory.replicator.enabled }}
- name: replicator-config - name: replicator-config
mountPath: "/tmp/replicator/replicator.yaml" mountPath: "/replicator_extra_conf/replicator.yaml"
subPath: replicator.yaml subPath: replicator.yaml
{{- end }} {{- end }}
- name: installer-info
mountPath: "/artifactory_extra_conf/info/installer-info.json"
subPath: installer-info.json
resources: resources:
{{ toYaml .Values.artifactory.node.resources | indent 10 }} {{ toYaml .Values.artifactory.node.resources | indent 10 }}
{{- if .Values.artifactory.readinessProbe.enabled }} {{- if .Values.artifactory.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: '/artifactory/webapp/#/login' path: {{ .Values.artifactory.readinessProbe.path }}
port: 8040 port: 8040
initialDelaySeconds: {{ .Values.artifactory.readinessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.artifactory.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.artifactory.readinessProbe.periodSeconds }} periodSeconds: {{ .Values.artifactory.readinessProbe.periodSeconds }}
...@@ -241,7 +290,7 @@ spec: ...@@ -241,7 +290,7 @@ spec:
{{- if .Values.artifactory.livenessProbe.enabled }} {{- if .Values.artifactory.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: '/artifactory/webapp/#/login' path: {{ .Values.artifactory.livenessProbe.path }}
port: 8040 port: 8040
initialDelaySeconds: {{ .Values.artifactory.livenessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.artifactory.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.artifactory.livenessProbe.periodSeconds }} periodSeconds: {{ .Values.artifactory.livenessProbe.periodSeconds }}
...@@ -249,6 +298,42 @@ spec: ...@@ -249,6 +298,42 @@ spec:
failureThreshold: {{ .Values.artifactory.livenessProbe.failureThreshold }} failureThreshold: {{ .Values.artifactory.livenessProbe.failureThreshold }}
successThreshold: {{ .Values.artifactory.livenessProbe.successThreshold }} successThreshold: {{ .Values.artifactory.livenessProbe.successThreshold }}
{{- end }} {{- 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: {{ $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: {{ $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.artifactory.customSidecarContainers }}
{{ tpl .Values.artifactory.customSidecarContainers . | indent 6 }}
{{- end }}
{{- with .Values.artifactory.node.nodeSelector }} {{- with .Values.artifactory.node.nodeSelector }}
nodeSelector: nodeSelector:
{{ toYaml . | indent 8 }} {{ toYaml . | indent 8 }}
...@@ -293,11 +378,40 @@ spec: ...@@ -293,11 +378,40 @@ spec:
- name: binarystore-xml - name: binarystore-xml
configMap: configMap:
name: {{ template "artifactory-ha.fullname" . }}-bs name: {{ template "artifactory-ha.fullname" . }}-bs
- 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.replicator.enabled }} {{- if .Values.artifactory.replicator.enabled }}
- name: replicator-config - name: replicator-config
configMap: configMap:
name: {{ template "artifactory-ha.fullname" . }}-replicator-config name: {{ template "artifactory-ha.fullname" . }}-replicator-config
{{- end }} {{- end }}
{{- if .Values.artifactory.catalinaLoggers }}
- name: catalina-logger
configMap:
name: {{ template "artifactory-ha.fullname" . }}-catalina-logger
{{- 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" }} {{- if eq .Values.artifactory.persistence.type "nfs" }}
- name: artifactory-ha-data - name: artifactory-ha-data
persistentVolumeClaim: persistentVolumeClaim:
...@@ -306,6 +420,9 @@ spec: ...@@ -306,6 +420,9 @@ spec:
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ template "artifactory-ha.fullname" . }}-backup-pvc claimName: {{ template "artifactory-ha.fullname" . }}-backup-pvc
{{- end }} {{- end }}
{{- if .Values.artifactory.customVolumes }}
{{ tpl .Values.artifactory.customVolumes . | indent 6 }}
{{- end }}
{{- if not .Values.artifactory.persistence.enabled }} {{- if not .Values.artifactory.persistence.enabled }}
- name: volume - name: volume
emptyDir: emptyDir:
...@@ -314,12 +431,8 @@ spec: ...@@ -314,12 +431,8 @@ spec:
volumeClaimTemplates: volumeClaimTemplates:
- metadata: - metadata:
name: volume name: volume
{{- if not .Values.artifactory.node.persistence.existingClaim }}
spec: spec:
{{- if .Values.artifactory.node.persistence.existingClaim }}
selector:
matchLabels:
app: artifactory-ha-member
{{- else }}
{{- if .Values.artifactory.persistence.storageClass }} {{- if .Values.artifactory.persistence.storageClass }}
{{- if (eq "-" .Values.artifactory.persistence.storageClass) }} {{- if (eq "-" .Values.artifactory.persistence.storageClass) }}
storageClassName: "" storageClassName: ""
......
...@@ -32,6 +32,7 @@ spec: ...@@ -32,6 +32,7 @@ spec:
{{- end }} {{- end }}
spec: spec:
serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }} serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }}
terminationGracePeriodSeconds: {{ .Values.artifactory.terminationGracePeriodSeconds }}
{{- if .Values.imagePullSecrets }} {{- if .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
- name: {{ .Values.imagePullSecrets }} - name: {{ .Values.imagePullSecrets }}
...@@ -40,6 +41,21 @@ spec: ...@@ -40,6 +41,21 @@ spec:
runAsUser: {{ .Values.artifactory.uid }} runAsUser: {{ .Values.artifactory.uid }}
fsGroup: {{ .Values.artifactory.uid }} fsGroup: {{ .Values.artifactory.uid }}
initContainers: initContainers:
{{- 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 }}
command:
- 'sh'
- '-c'
- >
mkdir {{ .Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir }}
volumeMounts:
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
name: volume
{{- end }}
{{- end }}
- name: "remove-lost-found" - name: "remove-lost-found"
image: "{{ .Values.initContainerImage }}" image: "{{ .Values.initContainerImage }}"
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }} imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
...@@ -70,21 +86,39 @@ spec: ...@@ -70,21 +86,39 @@ spec:
{{- end }} {{- end }}
sleep 2; sleep 2;
done; done;
{{- if .Values.artifactory.customInitContainers }}
{{ tpl .Values.artifactory.customInitContainers . | indent 6 }}
{{- end }}
containers: containers:
- name: {{ .Values.artifactory.name }} - name: {{ .Values.artifactory.name }}
image: '{{ .Values.artifactory.image.repository }}:{{ default .Chart.AppVersion .Values.artifactory.image.version }}' image: '{{ .Values.artifactory.image.repository }}:{{ default .Chart.AppVersion .Values.artifactory.image.version }}'
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }} imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
securityContext: securityContext:
allowPrivilegeEscalation: false allowPrivilegeEscalation: false
{{- if .Values.artifactory.preStartCommand }}
command: command:
- '/bin/sh' - '/bin/sh'
- '-c' - '-c'
- > - >
{{- 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 }}
cp -Lrf {{ .source }} {{ $.Values.artifactory.persistence.mountPath }}/{{ .target }};
{{- end }}
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;
{{- if .Values.artifactory.preStartCommand }}
echo "Running custom preStartCommand command"; echo "Running custom preStartCommand command";
{{ .Values.artifactory.preStartCommand }}; {{ .Values.artifactory.preStartCommand }};
/entrypoint-artifactory.sh
{{- end }} {{- end }}
/entrypoint-artifactory.sh
{{- if .Values.artifactory.postStartCommand }}
lifecycle: lifecycle:
postStart: postStart:
exec: exec:
...@@ -92,14 +126,6 @@ spec: ...@@ -92,14 +126,6 @@ spec:
- '/bin/sh' - '/bin/sh'
- '-c' - '-c'
- > - >
{{- if .Values.artifactory.configMapName }}
cp -Lrf /bootstrap/* /artifactory_extra_conf/;
{{- end }}
{{- if .Values.artifactory.replicator.enabled }}
mkdir -p /opt/jfrog/artifactory/replicator/etc;
cp -fv /tmp/replicator/replicator.yaml /opt/jfrog/artifactory/replicator/etc/replicator.yaml;
{{- end }}
{{- if .Values.artifactory.postStartCommand }}
{{ .Values.artifactory.postStartCommand }} {{ .Values.artifactory.postStartCommand }}
{{- end }} {{- end }}
env: env:
...@@ -163,18 +189,18 @@ spec: ...@@ -163,18 +189,18 @@ spec:
{{- end }} {{- end }}
- name: EXTRA_JAVA_OPTIONS - name: EXTRA_JAVA_OPTIONS
value: " value: "
{{- if .Values.artifactory.javaOpts.other }}
{{ .Values.artifactory.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.primary.javaOpts.other }}
{{ .Values.artifactory.primary.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.primary.javaOpts.xms }} {{- if .Values.artifactory.primary.javaOpts.xms }}
-Xms{{ .Values.artifactory.primary.javaOpts.xms }} -Xms{{ .Values.artifactory.primary.javaOpts.xms }}
{{- end}} {{- end}}
{{- if .Values.artifactory.primary.javaOpts.xmx }} {{- if .Values.artifactory.primary.javaOpts.xmx }}
-Xmx{{ .Values.artifactory.primary.javaOpts.xmx }} -Xmx{{ .Values.artifactory.primary.javaOpts.xmx }}
{{- end}} {{- end}}
{{- if .Values.artifactory.javaOpts.other }}
{{ .Values.artifactory.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.primary.javaOpts.other }}
{{ .Values.artifactory.primary.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.replicator.enabled }} {{- if .Values.artifactory.replicator.enabled }}
-Dartifactory.releasebundle.feature.enabled=true -Dartifactory.releasebundle.feature.enabled=true
{{- end }} {{- end }}
...@@ -196,6 +222,14 @@ spec: ...@@ -196,6 +222,14 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: metadata.name fieldPath: metadata.name
{{- if eq .Values.artifactory.persistence.type "file-system" }}
{{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
- name: HA_DATA_DIR
value: "{{ .Values.artifactory.persistence.fileSystem.existingSharedClaim.dataDir }}"
- name: HA_BACKUP_DIR
value: "{{ .Values.artifactory.persistence.fileSystem.existingSharedClaim.backupDir }}"
{{- end }}
{{- end }}
{{- if eq .Values.artifactory.persistence.type "nfs" }} {{- if eq .Values.artifactory.persistence.type "nfs" }}
- name: HA_DATA_DIR - name: HA_DATA_DIR
value: "{{ .Values.artifactory.persistence.nfs.dataDir }}" value: "{{ .Values.artifactory.persistence.nfs.dataDir }}"
...@@ -204,7 +238,7 @@ spec: ...@@ -204,7 +238,7 @@ spec:
{{- end }} {{- end }}
{{- range .Values.artifactory.extraEnvironmentVariables }} {{- range .Values.artifactory.extraEnvironmentVariables }}
- name: {{ .name }} - name: {{ .name }}
value: '{{ .value }}' value: '{{ tpl .value $ }}'
{{- end }} {{- end }}
ports: ports:
- containerPort: {{ .Values.artifactory.internalPort }} - containerPort: {{ .Values.artifactory.internalPort }}
...@@ -212,11 +246,26 @@ spec: ...@@ -212,11 +246,26 @@ spec:
- containerPort: {{ .Values.artifactory.internalPortReplicator }} - containerPort: {{ .Values.artifactory.internalPortReplicator }}
{{- end }} {{- end }}
volumeMounts: volumeMounts:
{{- if .Values.artifactory.userPluginSecrets }}
- name: tmp-plugins
mountPath: "/tmp/plugins/"
{{- range .Values.artifactory.userPluginSecrets }}
- name: {{ tpl . $ }}
mountPath: "/tmp/plugin/{{ tpl . $ }}"
{{- end }}
{{- end }}
- name: volume - name: volume
mountPath: "{{ .Values.artifactory.persistence.mountPath }}" mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
- name: artifactory-inactiveservercleaner {{- if eq .Values.artifactory.persistence.type "file-system" }}
mountPath: "/tmp/plugins/inactiveServerCleaner.groovy" {{- if .Values.artifactory.persistence.fileSystem.existingSharedClaim.enabled }}
subPath: inactiveServerCleaner.groovy {{- range $sharedClaimNumber, $e := until (.Values.artifactory.persistence.fileSystem.existingSharedClaim.numberOfExistingClaims|int) }}
- name: artifactory-ha-data-{{ $sharedClaimNumber }}
mountPath: "{{ $.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" }} {{- if eq .Values.artifactory.persistence.type "nfs" }}
- name: artifactory-ha-data - name: artifactory-ha-data
mountPath: "{{ .Values.artifactory.persistence.nfs.dataDir }}" mountPath: "{{ .Values.artifactory.persistence.nfs.dataDir }}"
...@@ -231,22 +280,39 @@ spec: ...@@ -231,22 +280,39 @@ spec:
- name: bootstrap-config - name: bootstrap-config
mountPath: "/bootstrap/" mountPath: "/bootstrap/"
{{- end }} {{- end }}
{{- if .Values.artifactory.license.secret }} {{- if or .Values.artifactory.license.secret .Values.artifactory.license.licenseKey }}
- name: artifactory-license - name: artifactory-license
mountPath: "/artifactory_extra_conf/artifactory.cluster.license" mountPath: "/artifactory_extra_conf/artifactory.cluster.license"
{{- if .Values.artifactory.license.secret }}
subPath: {{ .Values.artifactory.license.dataKey }} subPath: {{ .Values.artifactory.license.dataKey }}
{{- else if .Values.artifactory.license.licenseKey }}
subPath: artifactory.lic
{{- end }}
{{- end }}
- 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 }}
{{- if .Values.artifactory.replicator.enabled }} {{- if .Values.artifactory.replicator.enabled }}
- name: replicator-config - name: replicator-config
mountPath: "/tmp/replicator/replicator.yaml" mountPath: "/replicator_extra_conf/replicator.yaml"
subPath: replicator.yaml subPath: replicator.yaml
{{- 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: resources:
{{ toYaml .Values.artifactory.primary.resources | indent 10 }} {{ toYaml .Values.artifactory.primary.resources | indent 10 }}
{{- if .Values.artifactory.readinessProbe.enabled }} {{- if .Values.artifactory.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: '/artifactory/webapp/#/login' path: {{ .Values.artifactory.readinessProbe.path }}
port: 8040 port: 8040
initialDelaySeconds: {{ .Values.artifactory.readinessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.artifactory.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.artifactory.readinessProbe.periodSeconds }} periodSeconds: {{ .Values.artifactory.readinessProbe.periodSeconds }}
...@@ -257,7 +323,7 @@ spec: ...@@ -257,7 +323,7 @@ spec:
{{- if .Values.artifactory.livenessProbe.enabled }} {{- if .Values.artifactory.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: '/artifactory/webapp/#/login' path: {{ .Values.artifactory.livenessProbe.path }}
port: 8040 port: 8040
initialDelaySeconds: {{ .Values.artifactory.livenessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.artifactory.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.artifactory.livenessProbe.periodSeconds }} periodSeconds: {{ .Values.artifactory.livenessProbe.periodSeconds }}
...@@ -265,6 +331,42 @@ spec: ...@@ -265,6 +331,42 @@ spec:
failureThreshold: {{ .Values.artifactory.livenessProbe.failureThreshold }} failureThreshold: {{ .Values.artifactory.livenessProbe.failureThreshold }}
successThreshold: {{ .Values.artifactory.livenessProbe.successThreshold }} successThreshold: {{ .Values.artifactory.livenessProbe.successThreshold }}
{{- end }} {{- 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: {{ $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: {{ $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.artifactory.customSidecarContainers }}
{{ tpl .Values.artifactory.customSidecarContainers . | indent 6 }}
{{- end }}
{{- with .Values.artifactory.primary.nodeSelector }} {{- with .Values.artifactory.primary.nodeSelector }}
nodeSelector: nodeSelector:
{{ toYaml . | indent 8 }} {{ toYaml . | indent 8 }}
...@@ -303,6 +405,18 @@ spec: ...@@ -303,6 +405,18 @@ spec:
- name: binarystore-xml - name: binarystore-xml
configMap: configMap:
name: {{ template "artifactory-ha.fullname" . }}-bs name: {{ template "artifactory-ha.fullname" . }}-bs
- 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.replicator.enabled }} {{- if .Values.artifactory.replicator.enabled }}
- name: replicator-config - name: replicator-config
configMap: configMap:
...@@ -313,13 +427,38 @@ spec: ...@@ -313,13 +427,38 @@ spec:
configMap: configMap:
name: {{ .Values.artifactory.configMapName }} name: {{ .Values.artifactory.configMapName }}
{{- end}} {{- end}}
- name: artifactory-inactiveservercleaner {{- if .Values.artifactory.catalinaLoggers }}
- name: catalina-logger
configMap: configMap:
name: {{ template "artifactory-ha.fullname" . }}-isc name: {{ template "artifactory-ha.fullname" . }}-catalina-logger
{{- if .Values.artifactory.license.secret }} {{- end }}
{{- if or .Values.artifactory.license.secret .Values.artifactory.license.licenseKey }}
- name: artifactory-license - name: artifactory-license
secret: secret:
{{- if .Values.artifactory.license.secret }}
secretName: {{ .Values.artifactory.license.secret }} secretName: {{ .Values.artifactory.license.secret }}
{{- else if .Values.artifactory.license.licenseKey }}
secretName: {{ template "artifactory-ha.fullname" . }}-license
{{- end }}
{{- end }}
- 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 }}
{{- 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 }} {{- end }}
{{- if eq .Values.artifactory.persistence.type "nfs" }} {{- if eq .Values.artifactory.persistence.type "nfs" }}
- name: artifactory-ha-data - name: artifactory-ha-data
...@@ -329,6 +468,9 @@ spec: ...@@ -329,6 +468,9 @@ spec:
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ template "artifactory-ha.fullname" . }}-backup-pvc claimName: {{ template "artifactory-ha.fullname" . }}-backup-pvc
{{- end }} {{- end }}
{{- if .Values.artifactory.customVolumes }}
{{ tpl .Values.artifactory.customVolumes . | indent 6 }}
{{- end }}
{{- if not .Values.artifactory.persistence.enabled }} {{- if not .Values.artifactory.persistence.enabled }}
- name: volume - name: volume
emptyDir: emptyDir:
...@@ -337,12 +479,8 @@ spec: ...@@ -337,12 +479,8 @@ spec:
volumeClaimTemplates: volumeClaimTemplates:
- metadata: - metadata:
name: volume name: volume
{{- if not .Values.artifactory.primary.persistence.existingClaim }}
spec: spec:
{{- if .Values.artifactory.primary.persistence.existingClaim }}
selector:
matchLabels:
app: artifactory-ha-primary
{{- else }}
{{- if .Values.artifactory.persistence.storageClass }} {{- if .Values.artifactory.persistence.storageClass }}
{{- if (eq "-" .Values.artifactory.persistence.storageClass) }} {{- if (eq "-" .Values.artifactory.persistence.storageClass) }}
storageClassName: "" storageClassName: ""
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
{{- 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 }}
...@@ -10,6 +10,9 @@ metadata: ...@@ -10,6 +10,9 @@ metadata:
chart: {{ template "artifactory-ha.chart" . }} chart: {{ template "artifactory-ha.chart" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
{{- if .Values.ingress.labels }}
{{ .Values.ingress.labels | toYaml | trimSuffix "\n"| indent 4 -}}
{{- end}}
{{- if .Values.ingress.annotations }} {{- if .Values.ingress.annotations }}
annotations: annotations:
{{ .Values.ingress.annotations | toYaml | trimSuffix "\n" | indent 4 -}} {{ .Values.ingress.annotations | toYaml | trimSuffix "\n" | indent 4 -}}
...@@ -26,7 +29,7 @@ spec: ...@@ -26,7 +29,7 @@ spec:
- host: {{ $host | quote }} - host: {{ $host | quote }}
http: http:
paths: paths:
- path: / - path: {{ $.Values.ingress.path }}
backend: backend:
serviceName: {{ $serviceName }} serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }} servicePort: {{ $servicePort }}
......
...@@ -31,7 +31,7 @@ spec: ...@@ -31,7 +31,7 @@ spec:
- name: {{ .Values.imagePullSecrets }} - name: {{ .Values.imagePullSecrets }}
{{- end }} {{- end }}
initContainers: initContainers:
{{- if .Values.nginx.persistence.enabled }} {{- if and .Values.nginx.persistence.enabled (eq (int .Values.nginx.replicaCount) 1) }}
- name: "remove-lost-found" - name: "remove-lost-found"
image: "{{ .Values.initContainerImage }}" image: "{{ .Values.initContainerImage }}"
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }} imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
...@@ -66,14 +66,12 @@ spec: ...@@ -66,14 +66,12 @@ spec:
- '/bin/sh' - '/bin/sh'
- '-c' - '-c'
- > - >
{{- if .Values.nginx.customConfigMap }}
cp -Lrf /tmp/nginx.conf /etc/nginx/nginx.conf;
{{- end }}
{{- if .Values.nginx.customArtifactoryConfigMap }} {{- if .Values.nginx.customArtifactoryConfigMap }}
cp -Lrf /tmp/conf.d/artifactory*.conf /etc/nginx/conf.d/artifactory.conf; cp -Lrf /tmp/conf.d/artifactory*.conf /etc/nginx/conf.d/artifactory.conf;
{{- else }} {{- else }}
until [ -f /etc/nginx/conf.d/artifactory.conf ]; do sleep 1 ; done;
if ! grep -q 'upstream' /etc/nginx/conf.d/artifactory.conf; then if ! grep -q 'upstream' /etc/nginx/conf.d/artifactory.conf; then
sed -i -e 's,proxy_pass .*,proxy_pass http://{{ $serviceName }}:{{ $servicePort }}/artifactory/;,g' \ sed -i -e 's,proxy_pass.*http://artifactory.*/artifactory/\(.*\);,proxy_pass http://{{ $serviceName }}:{{ $servicePort }}/artifactory/\1;,g' \
-e 's,server_name .*,server_name ~(?<repo>.+)\\.{{ $serviceName }} {{ $serviceName }};,g' \ -e 's,server_name .*,server_name ~(?<repo>.+)\\.{{ $serviceName }} {{ $serviceName }};,g' \
/etc/nginx/conf.d/artifactory.conf; /etc/nginx/conf.d/artifactory.conf;
fi; fi;
...@@ -85,7 +83,6 @@ spec: ...@@ -85,7 +83,6 @@ spec:
rm -rf /var/opt/jfrog/nginx/ssl/example.*; rm -rf /var/opt/jfrog/nginx/ssl/example.*;
cp -fv /tmp/ssl/* /var/opt/jfrog/nginx/ssl; cp -fv /tmp/ssl/* /var/opt/jfrog/nginx/ssl;
fi; fi;
until [ -f /etc/nginx/conf.d/artifactory.conf ]; do sleep 1; done;
sleep 5; nginx -s reload; touch /var/log/nginx/conf.done sleep 5; nginx -s reload; touch /var/log/nginx/conf.done
env: env:
- name: ART_BASE_URL - name: ART_BASE_URL
...@@ -123,7 +120,8 @@ spec: ...@@ -123,7 +120,8 @@ spec:
{{- end }} {{- end }}
{{- if .Values.nginx.customConfigMap }} {{- if .Values.nginx.customConfigMap }}
- name: nginx-config - name: nginx-config
mountPath: "/tmp/" mountPath: "/etc/nginx/nginx.conf"
subPath: "nginx.conf"
{{- end }} {{- end }}
{{- if .Values.nginx.customArtifactoryConfigMap }} {{- if .Values.nginx.customArtifactoryConfigMap }}
- name: artifactory-nginx-config - name: artifactory-nginx-config
...@@ -134,7 +132,7 @@ spec: ...@@ -134,7 +132,7 @@ spec:
{{- if .Values.nginx.readinessProbe.enabled }} {{- if .Values.nginx.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: '/artifactory/webapp/#/login' path: {{ .Values.nginx.readinessProbe.path }}
port: 80 port: 80
initialDelaySeconds: {{ .Values.nginx.readinessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.nginx.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.nginx.readinessProbe.periodSeconds }} periodSeconds: {{ .Values.nginx.readinessProbe.periodSeconds }}
...@@ -145,7 +143,7 @@ spec: ...@@ -145,7 +143,7 @@ spec:
{{- if .Values.nginx.livenessProbe.enabled }} {{- if .Values.nginx.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: '/artifactory/webapp/#/login' path: {{ .Values.nginx.livenessProbe.path }}
port: 80 port: 80
initialDelaySeconds: {{ .Values.nginx.livenessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.nginx.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.nginx.livenessProbe.periodSeconds }} periodSeconds: {{ .Values.nginx.livenessProbe.periodSeconds }}
...@@ -153,6 +151,22 @@ spec: ...@@ -153,6 +151,22 @@ spec:
failureThreshold: {{ .Values.nginx.livenessProbe.failureThreshold }} failureThreshold: {{ .Values.nginx.livenessProbe.failureThreshold }}
successThreshold: {{ .Values.nginx.livenessProbe.successThreshold }} successThreshold: {{ .Values.nginx.livenessProbe.successThreshold }}
{{- end }} {{- 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: {{ $tag }}
command:
- tail
args:
- "-F"
- "{{ $mountPath }}/logs/{{ . }}"
volumeMounts:
- name: nginx-volume
mountPath: {{ $mountPath }}
{{- end }}
{{- with .Values.nginx.nodeSelector }} {{- with .Values.nginx.nodeSelector }}
nodeSelector: nodeSelector:
{{ toYaml . | indent 8 }} {{ toYaml . | indent 8 }}
...@@ -182,7 +196,7 @@ spec: ...@@ -182,7 +196,7 @@ spec:
name: {{ .Values.nginx.customArtifactoryConfigMap }} name: {{ .Values.nginx.customArtifactoryConfigMap }}
{{- end}} {{- end}}
- name: nginx-volume - name: nginx-volume
{{- if .Values.nginx.persistence.enabled }} {{- if and .Values.nginx.persistence.enabled (eq (int .Values.nginx.replicaCount) 1) }}
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ .Values.nginx.persistence.existingClaim | default (include "artifactory-ha.nginx.fullname" .) }} claimName: {{ .Values.nginx.persistence.existingClaim | default (include "artifactory-ha.nginx.fullname" .) }}
{{- else }} {{- else }}
......
{{- if and .Values.nginx.persistence.enabled (.Values.nginx.enabled ) }} {{- if and .Values.nginx.persistence.enabled (.Values.nginx.enabled) (eq (int .Values.nginx.replicaCount) 1) }}
{{- if (not .Values.nginx.persistence.existingClaim) }} {{- if (not .Values.nginx.persistence.existingClaim) }}
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
......
File mode changed from 100644 to 100755
...@@ -10,7 +10,7 @@ metadata: ...@@ -10,7 +10,7 @@ metadata:
release: {{ .Release.Name }} release: {{ .Release.Name }}
data: data:
replicator.yaml: |- replicator.yaml: |-
externalUrl: {{ .Values.artifactory.replicator.publicUrl }} externalUrl: {{ required "artifactory.replicator.publicUrl is required when artifactory.replicator.enabled is true" .Values.artifactory.replicator.publicUrl }}
internalUrl: http://localhost:6061 internalUrl: http://localhost:6061
listenPort: 6061 listenPort: 6061
{{- end -}} {{- end -}}
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
# Access the values with {{ .Values.key.subkey }} # Access the values with {{ .Values.key.subkey }}
# Common # Common
initContainerImage: "alpine:3.6" initContainerImage: "alpine:3.8"
installer:
type:
platform:
# For supporting pulling from private registries # For supporting pulling from private registries
imagePullSecrets: imagePullSecrets:
...@@ -43,15 +47,40 @@ ingress: ...@@ -43,15 +47,40 @@ ingress:
# Used to create an Ingress record. # Used to create an Ingress record.
hosts: hosts:
# - artifactory.domain.example # - artifactory.domain.example
path: /
annotations: annotations:
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
labels:
# traffic-type: external
# traffic-type: internal
tls: tls:
# Secrets must be manually created in the namespace. # Secrets must be manually created in the namespace.
# - secretName: chart-example-tls # - secretName: chart-example-tls
# hosts: # hosts:
# - artifactory.domain.example # - artifactory.domain.example
networkpolicy:
# Allows all ingress and egress
- name: artifactory
podSelector:
matchLabels:
app: artifactory-ha
egress:
- {}
ingress:
- {}
# Uncomment to allow only artifactory pods to communicate with postgresql (if postgres.enabled is true)
# - name: postgres
# podSelector:
# matchLabels:
# app: postgresql
# ingress:
# - from:
# - podSelector:
# matchLabels:
# app: artifactory-ha
# Database # Database
## Configuration values for the postgresql dependency ## Configuration values for the postgresql dependency
## ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md ## ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md
...@@ -102,6 +131,11 @@ database: ...@@ -102,6 +131,11 @@ database:
# name: "rds-artifactory" # name: "rds-artifactory"
# key: "db-url" # key: "db-url"
logger:
image:
repository: busybox
tag: 1.30
# Artifactory # Artifactory
artifactory: artifactory:
name: artifactory-ha name: artifactory-ha
...@@ -110,6 +144,88 @@ artifactory: ...@@ -110,6 +144,88 @@ artifactory:
# Note that by default we use appVersion to get image tag # Note that by default we use appVersion to get image tag
# version: # version:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Files to copy to ARTIFACTORY_HOME/ on each Artifactory startup
copyOnEveryStartup:
# # absolute path
# - source: /artifactory_extra_conf/binarystore.xml
# # relative to ARTIFACTORY_HOME/
# target: etc/
# # absolute path
# - source: /artifactory_extra_conf/artifactory.lic
# # relative to ARTIFACTORY_HOME/
# target: etc/
# Sidecar containers for tailing Artifactory logs
loggers: []
# - request.log
# - event.log
# - binarystore.log
# - request_trace.log
# - access.log
# - artifactory.log
# - build_info_migration.log
# Sidecar containers for tailing Tomcat (catalina) logs
catalinaLoggers: []
# - catalina.log
# - host-manager.log
# - localhost.log
# - manager.log
## Add custom init containers
customInitContainers: |
# - name: "custom-setup"
# image: "{{ .Values.initContainerImage }}"
# imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
# command:
# - 'sh'
# - '-c'
# - 'touch {{ .Values.artifactory.persistence.mountPath }}/example-custom-setup'
# volumeMounts:
# - mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
# name: volume
## Add custom sidecar containers
# - The provided example uses a custom volume (customVolumes)
# - The provided example shows running container as root (id 0)
customSidecarContainers: |
# - name: "sidecar-list-etc"
# image: "{{ .Values.initContainerImage }}"
# imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
# securityContext:
# runAsUser: 0
# fsGroup: 0
# command:
# - 'sh'
# - '-c'
# - 'sh /scripts/script.sh'
# volumeMounts:
# - mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
# name: volume
# - mountPath: "/scripts/script.sh"
# name: custom-script
# subPath: script.sh
# resources:
# requests:
# memory: "32Mi"
# cpu: "50m"
# limits:
# memory: "128Mi"
# cpu: "100m"
## Add custom volumes
customVolumes: |
# - name: custom-script
# configMap:
# name: custom-script
## Add custom volumesMounts
customVolumeMounts: |
# - name: custom-script
# mountPath: "/scripts/script.sh"
# subPath: script.sh
## Artifactory requires a unique master key ## Artifactory requires a unique master key
## You can generate one with the command: ## You can generate one with the command:
## 'openssl rand -hex 32' ## 'openssl rand -hex 32'
...@@ -119,19 +235,34 @@ artifactory: ...@@ -119,19 +235,34 @@ artifactory:
masterKey: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF masterKey: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
# masterKeySecretName: # masterKeySecretName:
accessAdmin:
password:
secret:
dataKey:
## Artifactory license secret. ## Artifactory license.
## If artifactory.license.secret is passed, it will be mounted as
## ARTIFACTORY_HOME/etc/artifactory.cluster.license and loaded at run time.
## The dataKey should be the name of the secret data key created.
license: license:
## licenseKey is the license key in plain text. Use either this or the license.secret setting
licenseKey:
## If artifactory.license.secret is passed, it will be mounted as
## ARTIFACTORY_HOME/etc/artifactory.lic and loaded at run time.
secret: secret:
## The dataKey should be the name of the secret data key created.
dataKey: dataKey:
## Create configMap with artifactory.config.import.xml and security.import.xml and pass name of configMap in following parameter ## Create configMap with artifactory.config.import.xml and security.import.xml and pass name of configMap in following parameter
configMapName: configMapName:
## List of secrets for Artifactory user plugins.
## One Secret per plugin's files.
userPluginSecrets:
# - archive-old-artifacts
# - build-cleanup
# - webhook
# - '{{ template "my-chart.fullname" . }}'
## Extra pre-start command to install JDBC driver for MySql/MariaDb/Oracle ## Extra pre-start command to install JDBC driver for MySql/MariaDb/Oracle
# preStartCommand: "curl -L -o /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.41.jar https://jcenter.bintray.com/mysql/mysql-connector-java/5.1.41/mysql-connector-java-5.1.41.jar" # preStartCommand: "wget -O /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.41.jar https://jcenter.bintray.com/mysql/mysql-connector-java/5.1.41/mysql-connector-java-5.1.41.jar"
## Extra post-start command to run extra commands after container starts ## Extra post-start command to run extra commands after container starts
# postStartCommand: # postStartCommand:
...@@ -148,6 +279,8 @@ artifactory: ...@@ -148,6 +279,8 @@ artifactory:
# value: "" # value: ""
# - name: SERVER_XML_ACCESS_EXTRA_CONFIG # - name: SERVER_XML_ACCESS_EXTRA_CONFIG
# value: "" # value: ""
# - name: SERVER_XML_EXTRA_CONNECTOR
# value: ""
# - name: DB_POOL_MAX_ACTIVE # - name: DB_POOL_MAX_ACTIVE
# value: "100" # value: "100"
# - name: DB_POOL_MAX_IDLE # - name: DB_POOL_MAX_IDLE
...@@ -159,9 +292,11 @@ artifactory: ...@@ -159,9 +292,11 @@ artifactory:
internalPortReplicator: 6061 internalPortReplicator: 6061
externalPortReplicator: 6061 externalPortReplicator: 6061
uid: 1030 uid: 1030
terminationGracePeriodSeconds: 30
## The following settings are to configure the frequency of the liveness and readiness probes ## The following settings are to configure the frequency of the liveness and readiness probes
livenessProbe: livenessProbe:
enabled: true enabled: true
path: '/artifactory/webapp/#/login'
initialDelaySeconds: 180 initialDelaySeconds: 180
failureThreshold: 10 failureThreshold: 10
timeoutSeconds: 10 timeoutSeconds: 10
...@@ -170,6 +305,7 @@ artifactory: ...@@ -170,6 +305,7 @@ artifactory:
readinessProbe: readinessProbe:
enabled: true enabled: true
path: '/artifactory/webapp/#/login'
initialDelaySeconds: 60 initialDelaySeconds: 60
failureThreshold: 10 failureThreshold: 10
timeoutSeconds: 10 timeoutSeconds: 10
...@@ -183,6 +319,8 @@ artifactory: ...@@ -183,6 +319,8 @@ artifactory:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
size: 200Gi size: 200Gi
maxCacheSize: 50000000000 maxCacheSize: 50000000000
eventual:
numberOfThreads: 10
## artifactory data Persistent Volume Storage Class ## artifactory data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass> ## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning ## If set to "-", storageClassName: "", which disables dynamic provisioning
...@@ -198,8 +336,32 @@ artifactory: ...@@ -198,8 +336,32 @@ artifactory:
## nfs ## nfs
## google-storage ## google-storage
## aws-s3 ## aws-s3
## azure-blob
type: file-system type: file-system
## For artifactory.persistence.type file-system
fileSystem:
## You may also use existing shared claims for the data and backup storage. This allows storage (NAS for example) to be used for Data and Backup dirs which are safe to share across multiple artifactory nodes.
## You may specify numberOfExistingClaims to indicate how many of these existing shared claims to mount. (Default = 1)
## Create PVCs with ReadWriteMany that match the naming convetions:
## {{ template "artifactory-ha.fullname" . }}-data-pvc-<claim-ordinal>
## {{ template "artifactory-ha.fullname" . }}-backup-pvc-<claim-ordinal>
## Example (using numberOfExistingClaims: 2)
## myexample-artifactory-ha-data-pvc-0
## myexample-artifactory-ha-backup-pvc-0
## myexample-artifactory-ha-data-pvc-1
## myexample-artifactory-ha-backup-pvc-1
## Note: While you need two PVC fronting two PVs, multiple PVs can be attached to the same storage in many cases allowing you to share an underlying drive.
## Need to have the following set
existingSharedClaim:
enabled: false
numberOfExistingClaims: 1
## Should be a child directory of /var/opt/jfrog/artifactory (or whereever .Values.artifactory.persistence.mountPath is pointed to )
dataDir: "/var/opt/jfrog/artifactory/artifactory-data"
backupDir: "/var/opt/jfrog/artifactory-backup"
## For artifactory.persistence.type nfs ## For artifactory.persistence.type nfs
## If using NFS as the shared storage, you must have a running NFS server that is accessible by your Kubernetes ## If using NFS as the shared storage, you must have a running NFS server that is accessible by your Kubernetes
## cluster nodes. ## cluster nodes.
...@@ -219,6 +381,7 @@ artifactory: ...@@ -219,6 +381,7 @@ artifactory:
identity: identity:
credential: credential:
path: "artifactory-ha/filestore" path: "artifactory-ha/filestore"
bucketExists: false
## For artifactory.persistence.type aws-s3 ## For artifactory.persistence.type aws-s3
## IMPORTANT: Make sure S3 `endpoint` and `region` match! See https://docs.aws.amazon.com/general/latest/gr/rande.html ## IMPORTANT: Make sure S3 `endpoint` and `region` match! See https://docs.aws.amazon.com/general/latest/gr/rande.html
awsS3: awsS3:
...@@ -232,9 +395,18 @@ artifactory: ...@@ -232,9 +395,18 @@ artifactory:
path: "artifactory-ha/filestore" path: "artifactory-ha/filestore"
refreshCredentials: true refreshCredentials: true
testConnection: false testConnection: false
s3AwsVersion: "AWS4-HMAC-SHA256"
## Additional properties to set on the s3 provider ## Additional properties to set on the s3 provider
properties: {} properties: {}
# httpclient.max-connections: 100 # httpclient.max-connections: 100
## For artifactory.persistence.type azure-blob
azureBlob:
accountName:
accountKey:
endpoint:
containerName:
testConnection: false
service: service:
name: artifactory name: artifactory
type: ClusterIP type: ClusterIP
...@@ -262,7 +434,7 @@ artifactory: ...@@ -262,7 +434,7 @@ artifactory:
name: artifactory-ha-primary name: artifactory-ha-primary
persistence: persistence:
## Set existingClaim to true or false ## Set existingClaim to true or false
## If true, you must prepare a PVC with the name e.g `artifactory-ha-primary` ## If true, you must prepare a PVC with the name e.g `volume-myrelease-artifactory-ha-primary-0`
existingClaim: false existingClaim: false
## Resources for the primary node ## Resources for the primary node
resources: {} resources: {}
...@@ -293,7 +465,7 @@ artifactory: ...@@ -293,7 +465,7 @@ artifactory:
name: artifactory-ha-member name: artifactory-ha-member
persistence: persistence:
## Set existingClaim to true or false ## Set existingClaim to true or false
## If true, you must prepare a PVC with the name e.g `artifactory-ha-member` ## If true, you must prepare a PVC with the name e.g `volume-myrelease-artifactory-ha-member-0`
existingClaim: false existingClaim: false
replicaCount: 2 replicaCount: 2
minAvailable: 1 minAvailable: 1
...@@ -337,6 +509,13 @@ nginx: ...@@ -337,6 +509,13 @@ nginx:
# Note that by default we use appVersion to get image tag # Note that by default we use appVersion to get image tag
# version: # version:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Sidecar containers for tailing Nginx logs
loggers: []
# - access.log
# - error.log
service: service:
## For minikube, set this to NodePort, elsewhere use LoadBalancer ## For minikube, set this to NodePort, elsewhere use LoadBalancer
type: LoadBalancer type: LoadBalancer
...@@ -359,6 +538,7 @@ nginx: ...@@ -359,6 +538,7 @@ nginx:
## The following settings are to configure the frequency of the liveness and readiness probes ## The following settings are to configure the frequency of the liveness and readiness probes
livenessProbe: livenessProbe:
enabled: true enabled: true
path: '/artifactory/webapp/#/login'
initialDelaySeconds: 100 initialDelaySeconds: 100
failureThreshold: 10 failureThreshold: 10
timeoutSeconds: 10 timeoutSeconds: 10
...@@ -367,6 +547,7 @@ nginx: ...@@ -367,6 +547,7 @@ nginx:
readinessProbe: readinessProbe:
enabled: true enabled: true
path: '/artifactory/webapp/#/login'
initialDelaySeconds: 60 initialDelaySeconds: 60
failureThreshold: 10 failureThreshold: 10
timeoutSeconds: 10 timeoutSeconds: 10
......
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
OWNERS
\ No newline at end of file
# JFrog Artifactory-ha Chart Changelog
All changes to this chart will be documented in this file.
## [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
apiVersion: v1
name: artifactory-ha
home: https://www.jfrog.com/artifactory/
version: 0.8.3
appVersion: 6.6.3
description: Universal Repository Manager supporting all major packaging formats,
build tools and CI servers.
keywords:
- artifactory
- jfrog
- devops
sources:
- https://bintray.com/jfrog/product/JFrog-Artifactory-Pro/view
- https://github.com/jfrog/charts
maintainers:
- name: jainishshah17
email: jainishs@jfrog.com
- name: eldada
email: eldada@jfrog.com
- name: rimusz
email: rimasm@jfrog.com
icon: https://raw.githubusercontent.com/jfrog/artifactory-dcos/master/images/jfrog_med.png
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# JFrog Artifactory High Availability Helm Chart
## Prerequisites Details
* Kubernetes 1.8+
* Artifactory HA license
## Chart Details
This chart will do the following:
* Deploy Artifactory highly available cluster. 1 primary node and 2 member nodes.
* Deploy a PostgreSQL database
* Deploy an Nginx server
## Artifactory HA architecture
The Artifactory HA cluster in this chart is made up of
- A single primary node
- Two member nodes, which can be resized at will
Load balancing is done to the member nodes only.
This leaves the primary node free to handle jobs and tasks and not be interrupted by inbound traffic.
> This can be controlled by the parameter `artifactory.service.pool`.
## Installing the Chart
### Add JFrog Helm repository
Before installing JFrog helm charts, you need to add the [JFrog helm repository](https://charts.jfrog.io/) to your helm client
```bash
helm repo add jfrog https://charts.jfrog.io
```
### Install Chart
To install the chart with the release name `artifactory-ha`:
```bash
helm install --name artifactory-ha jfrog/artifactory-ha
```
### Deploying Artifactory with replicator enabled
```bash
## Artifactory replicator is disabled by default. To enable it use the following:
helm install --name artifactory --set artifactory.replicator.enabled=true jfrog/artifactory-ha
```
### Accessing Artifactory
**NOTE:** It might take a few minutes for Artifactory's public IP to become available, and the nodes to complete initial setup.
Follow the instructions outputted by the install command to get the Artifactory IP and URL to access it.
### Updating Artifactory
Once you have a new chart version, you can update your deployment with
```bash
helm upgrade artifactory-ha jfrog/artifactory-ha
```
This will apply any configuration changes on your existing deployment.
### Artifactory memory and CPU resources
The Artifactory HA Helm chart comes with support for configured resource requests and limits to all pods. By default, these settings are commented out.
It is **highly** recommended to set these so you have full control of the allocated resources and limits.
See more information on [setting resources for your Artifactory based on planned usage](https://www.jfrog.com/confluence/display/RTF/System+Requirements#SystemRequirements-RecommendedHardware).
```bash
# Example of setting resource requests and limits to all pods (including passing java memory settings to Artifactory)
helm install --name artifactory-ha \
--set artifactory.primary.resources.requests.cpu="500m" \
--set artifactory.primary.resources.limits.cpu="2" \
--set artifactory.primary.resources.requests.memory="1Gi" \
--set artifactory.primary.resources.limits.memory="4Gi" \
--set artifactory.primary.javaOpts.xms="1g" \
--set artifactory.primary.javaOpts.xmx="4g" \
--set artifactory.node.resources.requests.cpu="500m" \
--set artifactory.node.resources.limits.cpu="2" \
--set artifactory.node.resources.requests.memory="1Gi" \
--set artifactory.node.resources.limits.memory="4Gi" \
--set artifactory.node.javaOpts.xms="1g" \
--set artifactory.node.javaOpts.xmx="4g" \
--set postgresql.resources.requests.cpu="200m" \
--set postgresql.resources.limits.cpu="1" \
--set postgresql.resources.requests.memory="500Mi" \
--set postgresql.resources.limits.memory="1Gi" \
--set nginx.resources.requests.cpu="100m" \
--set nginx.resources.limits.cpu="250m" \
--set nginx.resources.requests.memory="250Mi" \
--set nginx.resources.limits.memory="500Mi" \
jfrog/artifactory-ha
```
> Artifactory java memory parameters can (and should) also be set to match the allocated resources with `artifactory.[primary|node].javaOpts.xms` and `artifactory.[primary|node].javaOpts.xmx`.
Get more details on configuring Artifactory in the [official documentation](https://www.jfrog.com/confluence/).
### Artifactory storage
Artifactory HA support a wide range of storage back ends. You can see more details on [Artifactory HA storage options](https://www.jfrog.com/confluence/display/RTF/HA+Installation+and+Setup#HAInstallationandSetup-SettingUpYourStorageConfiguration)
In this chart, you set the type of storage you want with `artifactory.persistence.type` and pass the required configuration settings.
The default storage in this chart is the `file-system` replication, where the data is replicated to all nodes.
> **IMPORTANT:** All storage configurations (except NFS) come with a default `artifactory.persistence.redundancy` parameter.
This is used to set how many replicas of a binary should be stored in the cluster's nodes.
Once this value is set on initial deployment, you can not update it using helm.
It is recommended to set this to a number greater than half of your cluster's size, and never scale your cluster down to a size smaller than this number.
#### NFS
To use an NFS server as your cluster's storage, you need to
- Setup an NFS server. Get its IP as `NFS_IP`
- Create a `data` and `backup` directories on the NFS exported directory with write permissions to all
- Pass NFS parameters to `helm install` and `helm upgrade`
```bash
...
--set artifactory.persistence.type=nfs \
--set artifactory.persistence.nfs.ip=${NFS_IP} \
...
```
#### Google Storage
To use a Google Storage bucket as the cluster's filestore
- Pass Google Storage parameters to `helm install` and `helm upgrade`
```bash
...
--set artifactory.persistence.type=google-storage \
--set artifactory.persistence.googleStorage.identity=${GCP_ID} \
--set artifactory.persistence.googleStorage.credential=${GCP_KEY} \
...
```
#### AWS S3
To use an AWS S3 bucket as the cluster's filestore
- Pass AWS S3 parameters to `helm install` and `helm upgrade`
```bash
...
# With explicit credentials:
--set artifactory.persistence.type=aws-s3 \
--set artifactory.persistence.awsS3.endpoint=${AWS_S3_ENDPOINT} \
--set artifactory.persistence.awsS3.region=${AWS_REGION} \
--set artifactory.persistence.awsS3.identity=${AWS_ACCESS_KEY_ID} \
--set artifactory.persistence.awsS3.credential=${AWS_SECRET_ACCESS_KEY} \
...
...
# With using existing IAM role
--set artifactory.persistence.type=aws-s3 \
--set artifactory.persistence.awsS3.endpoint=${AWS_S3_ENDPOINT} \
--set artifactory.persistence.awsS3.region=${AWS_REGION} \
--set artifactory.persistence.awsS3.roleName=${AWS_ROLE_NAME} \
...
```
**NOTE:** Make sure S3 `endpoint` and `region` match. See [AWS documentation on endpoint](https://docs.aws.amazon.com/general/latest/gr/rande.html)
### Create a unique Master Key
Artifactory HA cluster requires a unique master key. By default the chart has one set in values.yaml (`artifactory.masterKey`).
**This key is for demo purpose and should not be used in a production environment!**
You should generate a unique one and pass it to the template at install/upgrade time.
```bash
# Create a key
export MASTER_KEY=$(openssl rand -hex 32)
echo ${MASTER_KEY}
# Pass the created master key to helm
helm install --name artifactory-ha --set artifactory.masterKey=${MASTER_KEY} jfrog/artifactory-ha
```
Alternatively, you can create a secret containing the master key manually and pass it to the template at install/upgrade time.
```bash
# Create a key
export MASTER_KEY=$(openssl rand -hex 32)
echo ${MASTER_KEY}
# Create a secret containing the key. The key in the secret must be named master-key
kubectl create secret generic my-secret --from-literal=master-key=${MASTER_KEY}
# Pass the created secret to helm
helm install --name artifactory-ha --set artifactory.masterKeySecretName=my-secret jfrog/artifactory-ha
```
**NOTE:** In either case, make sure to pass the same master key on all future calls to `helm install` and `helm upgrade`! In the first case, this means always passing `--set artifactory.masterKey=${MASTER_KEY}`. In the second, this means always passing `--set artifactory.masterKeySecretName=my-secret` and ensuring the contents of the secret remain unchanged.
### Install Artifactory HA license
For activating Artifactory HA, you must install an appropriate license. There are two ways to manage the license. **Artifactory UI** or a **Kubernetes Secret**.
The easier and recommended way is the **Artifactory UI**. Using the **Kubernetes Secret** is for advanced users and is better suited for automation.
**IMPORTANT:** You should use only one of the following methods. Switching between them while a cluster is running might disable your Artifactory HA cluster!
##### Artifactory UI
Once primary cluster is running, open Artifactory UI and insert the license(s) in the UI. See [HA installation and setup](https://www.jfrog.com/confluence/display/RTF/HA+Installation+and+Setup) for more details
##### Kubernetes Secret
You can deploy the Artifactory license(s) as a [Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/secret/).
Prepare a text file with the license(s) written in it. If writing multiple licenses (must be in the same file), it's important to put **two new lines between each license block**!
```bash
# Create the Kubernetes secret (assuming the local license file is 'art.lic')
kubectl create secret generic artifactory-cluster-license --from-file=./art.lic
# Pass the license to helm
helm install --name artifactory-ha --set artifactory.license.secret=artifactory-cluster-license,artifactory.license.dataKey=art.lic jfrog/artifactory-ha
```
**NOTE:** This method is relevant for initial deployment only! Once Artifactory is deployed, you should not keep passing these parameters as the license is already persisted into Artifactory's storage (they will be ignored).
Updating the license should be done via Artifactory UI or REST API.
### Bootstrapping Artifactory
**IMPORTANT:** Bootstrapping Artifactory needs license. Pass license as shown in above section.
* User guide to [bootstrap Artifactory Global Configuration](https://www.jfrog.com/confluence/display/RTF/Configuration+Files#ConfigurationFiles-BootstrappingtheGlobalConfiguration)
* User guide to [bootstrap Artifactory Security Configuration](https://www.jfrog.com/confluence/display/RTF/Configuration+Files#ConfigurationFiles-BootstrappingtheSecurityConfiguration)
Create `bootstrap-config.yaml` with artifactory.config.import.xml and security.import.xml as shown below:
```
apiVersion: v1
kind: ConfigMap
metadata:
name: my-release-bootstrap-config
data:
artifactory.config.import.xml: |
<config contents>
security.import.xml: |
<config contents>
```
Create configMap in Kubernetes:
```bash
kubectl apply -f bootstrap-config.yaml
```
#### Pass the configMap to helm
```bash
helm install --name artifactory-ha --set artifactory.license.secret=artifactory-cluster-license,artifactory.license.dataKey=art.lic,artifactory.configMapName=my-release-bootstrap-config jfrog/artifactory-ha
```
### Use custom nginx.conf with Nginx
Steps to create configMap with nginx.conf
* Create `nginx.conf` file.
```bash
kubectl create configmap nginx-config --from-file=nginx.conf
```
* Pass configMap to helm install
```bash
helm install --name artifactory-ha --set nginx.customConfigMap=nginx-config jfrog/artifactory-ha
```
### Scaling your Artifactory cluster
A key feature in Artifactory HA is the ability to set an initial cluster size with `--set artifactory.node.replicaCount=${CLUSTER_SIZE}` and if needed, resize it.
##### Before scaling
**IMPORTANT:** When scaling, you need to explicitly pass the database password if it's an auto generated one (this is the default with the enclosed PostgreSQL helm chart).
Get the current database password
```bash
export DB_PASSWORD=$(kubectl get $(kubectl get secret -o name | grep postgresql) -o jsonpath="{.data.postgres-password}" | base64 --decode)
```
Use `--set postgresql.postgresPassword=${DB_PASSWORD}` with every scale action to prevent a miss configured cluster!
##### Scale up
Let's assume you have a cluster with **2** member nodes, and you want to scale up to **3** member nodes (a total of 4 nodes).
```bash
# Scale to 4 nodes (1 primary and 3 member nodes)
helm upgrade --install artifactory-ha --set artifactory.node.replicaCount=3 --set postgresql.postgresPassword=${DB_PASSWORD} jfrog/artifactory-ha
```
##### Scale down
Let's assume you have a cluster with **3** member nodes, and you want to scale down to **2** member node.
```bash
# Scale down to 2 member nodes
helm upgrade --install artifactory-ha --set artifactory.node.replicaCount=2 --set postgresql.postgresPassword=${DB_PASSWORD} jfrog/artifactory-ha
```
- **NOTE:** Since Artifactory is running as a Kubernetes Stateful Set, the removal of the node will **not** remove the persistent volume. You need to explicitly remove it
```bash
# List PVCs
kubectl get pvc
# Remove the PVC with highest ordinal!
# In this example, the highest node ordinal was 2, so need to remove its storage.
kubectl delete pvc volume-artifactory-node-2
```
### Use an external Database
There are cases where you will want to use a different database and not the enclosed **PostgreSQL**.
See more details on [configuring the database](https://www.jfrog.com/confluence/display/RTF/Configuring+the+Database)
> The official Artifactory Docker images include the PostgreSQL database driver.
> For other database types, you will have to add the relevant database driver to Artifactory's tomcat/lib
This can be done with the following parameters
```bash
# Make sure your Artifactory Docker image has the MySQL database driver in it
...
--set postgresql.enabled=false \
--set artifactory.preStartCommand="curl -L -o /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.41.jar https://jcenter.bintray.com/mysql/mysql-connector-java/5.1.41/mysql-connector-java-5.1.41.jar" \
--set database.type=mysql \
--set database.host=${DB_HOST} \
--set database.port=${DB_PORT} \
--set database.user=${DB_USER} \
--set database.password=${DB_PASSWORD} \
...
```
**NOTE:** You must set `postgresql.enabled=false` in order for the chart to use the `database.*` parameters. Without it, they will be ignored!
If you store your database credentials in a pre-existing Kubernetes `Secret`, you can specify them via `database.secrets` instead of `database.user` and `database.password`:
```bash
# Create a secret containing the database credentials
kubectl create secret generic my-secret --from-literal=user=${DB_USER} --from-literal=password=${DB_PASSWORD}
...
--set postgresql.enabled=false \
--set database.secrets.user.name=my-secret \
--set database.secrets.user.key=user \
--set database.secrets.password.name=my-secret \
--set database.secrets.password.key=password \
...
```
### Deleting Artifactory
To delete the Artifactory HA cluster
```bash
helm delete --purge artifactory-ha
```
This will completely delete your Artifactory HA cluster.
**NOTE:** Since Artifactory is running as Kubernetes Stateful Sets, the removal of the helm release will **not** remove the persistent volumes. You need to explicitly remove them
```bash
kubectl delete pvc -l release=artifactory-ha
```
See more details in the official [Kubernetes Stateful Set removal page](https://kubernetes.io/docs/tasks/run-application/delete-stateful-set/)
### Custom Docker registry for your images
If you need to pull your Docker images from a private registry (for example, when you have a custom image with a MySQL database driver), you need to create a
[Kubernetes Docker registry secret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) and pass it to helm
```bash
# Create a Docker registry secret called 'regsecret'
kubectl create secret docker-registry regsecret --docker-server=${DOCKER_REGISTRY} --docker-username=${DOCKER_USER} --docker-password=${DOCKER_PASS} --docker-email=${DOCKER_EMAIL}
```
Once created, you pass it to `helm`
```bash
helm install --name artifactory-ha --set imagePullSecrets=regsecret jfrog/artifactory-ha
```
## Configuration
The following table lists the configurable parameters of the artifactory chart and their default values.
| Parameter | Description | Default |
|------------------------------|-----------------------------------|-------------------------------------------------------|
| `imagePullSecrets` | Docker registry pull secret | |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the fullname template |
| `rbac.create` | Specifies whether RBAC resources should be created | `true` |
| `rbac.role.rules` | Rules to create | `[]` |
| `artifactory.name` | Artifactory name | `artifactory` |
| `artifactory.image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `artifactory.image.repository` | Container image | `docker.bintray.io/jfrog/artifactory-pro` |
| `artifactory.image.version` | Container image tag | `.Chart.AppVersion` |
| `artifactory.masterKey` | Artifactory Master Key. Can be generated with `openssl rand -hex 32` |`FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF`|
| `artifactory.masterKeySecretName` | Artifactory Master Key secret name | |
| `artifactory.preStartCommand` | Command to run before entrypoint starts | |
| `artifactory.postStartCommand` | Command to run after container starts | |
| `artifactory.license.secret` | Artifactory license secret name | |
| `artifactory.license.dataKey`| Artifactory license secret data key | |
| `artifactory.service.name` | Artifactory service name to be set in Nginx configuration | `artifactory` |
| `artifactory.service.type` | Artifactory service type | `ClusterIP` |
| `artifactory.service.pool` | Artifactory instances to be in the load balancing pool. `members` or `all` | `members` |
| `artifactory.externalPort` | Artifactory service external port | `8081` |
| `artifactory.internalPort` | Artifactory service internal port | `8081` |
| `artifactory.internalPortReplicator` | Replicator service internal port | `6061` |
| `artifactory.externalPortReplicator` | Replicator service external port | `6061` |
| `artifactory.extraEnvironmentVariables` | Extra environment variables to pass to Artifactory. See [documentation](https://www.jfrog.com/confluence/display/RTF/Installing+with+Docker#InstallingwithDocker-SupportedEnvironmentVariables) | |
| `artifactory.livenessProbe.enabled` | Enable liveness probe | `true` |
| `artifactory.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 180 |
| `artifactory.livenessProbe.periodSeconds` | How often to perform the probe | 10 |
| `artifactory.livenessProbe.timeoutSeconds` | When the probe times out | 10 |
| `artifactory.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
| `artifactory.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 |
| `artifactory.readinessProbe.enabled` | would you like a readinessProbe to be enabled | `true` |
| `artifactory.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 60 |
| `artifactory.readinessProbe.periodSeconds` | How often to perform the probe | 10 |
| `artifactory.readinessProbe.timeoutSeconds` | When the probe times out | 10 |
| `artifactory.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
| `artifactory.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 |
| `artifactory.persistence.mountPath` | Artifactory persistence volume mount path | `"/var/opt/jfrog/artifactory"` |
| `artifactory.persistence.enabled` | Artifactory persistence volume enabled | `true` |
| `artifactory.persistence.accessMode` | Artifactory persistence volume access mode | `ReadWriteOnce` |
| `artifactory.persistence.size` | Artifactory persistence or local volume size | `200Gi` |
| `artifactory.persistence.maxCacheSize` | Artifactory cache-fs provider maxCacheSize in bytes | `50000000000` |
| `artifactory.persistence.type` | Artifactory HA storage type | `file-system` |
| `artifactory.persistence.redundancy` | Artifactory HA storage redundancy | `3` |
| `artifactory.persistence.nfs.ip` | NFS server IP | |
| `artifactory.persistence.nfs.haDataMount` | NFS data directory | `/data` |
| `artifactory.persistence.nfs.haBackupMount` | NFS backup directory | `/backup` |
| `artifactory.persistence.nfs.dataDir` | HA data directory | `/var/opt/jfrog/artifactory-ha` |
| `artifactory.persistence.nfs.backupDir` | HA backup directory | `/var/opt/jfrog/artifactory-backup` |
| `artifactory.persistence.nfs.capacity` | NFS PVC size | `200Gi` |
| `artifactory.persistence.googleStorage.bucketName` | Google Storage bucket name | `artifactory-ha` |
| `artifactory.persistence.googleStorage.identity` | Google Storage service account id | |
| `artifactory.persistence.googleStorage.credential` | Google Storage service account key | |
| `artifactory.persistence.googleStorage.path` | Google Storage path in bucket | `artifactory-ha/filestore` |
| `artifactory.persistence.awsS3.bucketName` | AWS S3 bucket name | `artifactory-ha` |
| `artifactory.persistence.awsS3.endpoint` | AWS S3 bucket endpoint | See https://docs.aws.amazon.com/general/latest/gr/rande.html |
| `artifactory.persistence.awsS3.region` | AWS S3 bucket region | |
| `artifactory.persistence.awsS3.roleName` | AWS S3 IAM role name | |
| `artifactory.persistence.awsS3.identity` | AWS S3 AWS_ACCESS_KEY_ID | |
| `artifactory.persistence.awsS3.credential` | AWS S3 AWS_SECRET_ACCESS_KEY | |
| `artifactory.persistence.awsS3.properties` | AWS S3 additional properties | |
| `artifactory.persistence.awsS3.path` | AWS S3 path in bucket | `artifactory-ha/filestore` |
| `artifactory.persistence.awsS3.refreshCredentials` | AWS S3 renew credentials on expiration | `true` (When roleName is used, this parameter will be set to true) |
| `artifactory.persistence.awsS3.testConnection` | AWS S3 test connection on start up | `false` |
| `artifactory.javaOpts.other` | Artifactory additional java options (for all nodes) | |
| `artifactory.replicator.enabled` | Enable Artifactory Replicator | `false` |
| `artifactory.replicator.publicUrl` | Artifactory Replicator Public URL | |
| `artifactory.primary.resources.requests.memory` | Artifactory primary node initial memory request | |
| `artifactory.primary.resources.requests.cpu` | Artifactory primary node initial cpu request | |
| `artifactory.primary.resources.limits.memory` | Artifactory primary node memory limit | |
| `artifactory.primary.resources.limits.cpu` | Artifactory primary node cpu limit | |
| `artifactory.primary.javaOpts.xms` | Artifactory primary node java Xms size | |
| `artifactory.primary.javaOpts.xmx` | Artifactory primary node java Xms size | |
| `artifactory.primary.javaOpts.other` | Artifactory primary node additional java options | |
| `artifactory.node.replicaCount` | Artifactory member node replica count | `2` |
| `artifactory.node.minAvailable` | Artifactory member node min available count | `1` |
| `artifactory.node.resources.requests.memory` | Artifactory member node initial memory request | |
| `artifactory.node.resources.requests.cpu` | Artifactory member node initial cpu request | |
| `artifactory.node.resources.limits.memory` | Artifactory member node memory limit | |
| `artifactory.node.resources.limits.cpu` | Artifactory member node cpu limit | |
| `artifactory.node.javaOpts.xms` | Artifactory member node java Xms size | |
| `artifactory.node.javaOpts.xmx` | Artifactory member node java Xms size | |
| `artifactory.node.javaOpts.other` | Artifactory member node additional java options | |
| `ingress.enabled` | If true, Artifactory Ingress will be created | `false` |
| `ingress.annotations` | Artifactory Ingress annotations | `{}` |
| `ingress.hosts` | Artifactory Ingress hostnames | `[]` |
| `ingress.tls` | Artifactory Ingress TLS configuration (YAML) | `[]` |
| `ingress.defaultBackend.enabled` | If true, the default `backend` will be added using serviceName and servicePort | `true` |
| `ingress.annotations` | Ingress annotations, which are written out if annotations section exists in values. Everything inside of the annotations section will appear verbatim inside the resulting manifest. See `Ingress annotations` section below for examples of how to leverage the annotations, specifically for how to enable docker authentication. | |
| `nginx.enabled` | Deploy nginx server | `true` |
| `nginx.name` | Nginx name | `nginx` |
| `nginx.replicaCount` | Nginx replica count | `1` |
| `nginx.uid` | Nginx User Id | `104` |
| `nginx.git` | Nginx Group Id | `107` |
| `nginx.image.repository` | Container image | `docker.bintray.io/jfrog/nginx-artifactory-pro` |
| `nginx.image.version` | Container version | `.Chart.AppVersion` |
| `nginx.image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `nginx.service.type` | Nginx service type | `LoadBalancer` |
| `nginx.service.loadBalancerSourceRanges`| Nginx service array of IP CIDR ranges to whitelist (only when service type is LoadBalancer) | |
| `nginx.service.annotations` | Nginx service annotations | `{}` |
| `nginx.service.externalTrafficPolicy`| Nginx service desires to route external traffic to node-local or cluster-wide endpoints. | `Cluster` |
| `nginx.loadBalancerIP`| Provide Static IP to configure with Nginx | |
| `nginx.externalPortHttp` | Nginx service external port | `80` |
| `nginx.internalPortHttp` | Nginx service internal port | `80` |
| `nginx.externalPortHttps` | Nginx service external port | `443` |
| `nginx.internalPortHttps` | Nginx service internal port | `443` |
| `nginx.internalPortReplicator` | Replicator service internal port | `6061` |
| `nginx.externalPortReplicator` | Replicator service external port | `6061` |
| `nginx.livenessProbe.enabled` | would you like a liveness Probe to be enabled | `true` |
| `nginx.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 100 |
| `nginx.livenessProbe.periodSeconds` | How often to perform the probe | 10 |
| `nginx.livenessProbe.timeoutSeconds` | When the probe times out | 10 |
| `nginx.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
| `nginx.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 |
| `nginx.readinessProbe.enabled` | would you like a readinessProbe to be enabled | `true` |
| `nginx.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 60 |
| `nginx.readinessProbe.periodSeconds` | How often to perform the probe | 10 |
| `nginx.readinessProbe.timeoutSeconds` | When the probe times out | 10 |
| `nginx.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
| `nginx.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 10 |
| `nginx.tlsSecretName` | SSL secret that will be used by the Nginx pod | |
| `nginx.env.ssl` | Nginx Environment enable ssl | `true` |
| `nginx.env.skipAutoConfigUpdate` | Nginx Environment to disable auto configuration update | `false` |
| `nginx.customConfigMap` | Nginx CustomeConfigMap name for `nginx.conf` | ` ` |
| `nginx.customArtifactoryConfigMap`| Nginx CustomeConfigMap name for `artifactory-ha.conf` | ` ` |
| `nginx.resources.requests.memory` | Nginx initial memory request | `250Mi` |
| `nginx.resources.requests.cpu` | Nginx initial cpu request | `100m` |
| `nginx.resources.limits.memory` | Nginx memory limit | `250Mi` |
| `nginx.resources.limits.cpu` | Nginx cpu limit | `500m` |
| `postgresql.enabled` | Use enclosed PostgreSQL as database | `true` |
| `postgresql.imageTag` | PostgreSQL version | `9.6.11` |
| `postgresql.postgresDatabase` | PostgreSQL database name | `artifactory` |
| `postgresql.postgresUser` | PostgreSQL database user | `artifactory` |
| `postgresql.postgresPassword` | PostgreSQL database password | |
| `postgresql.persistence.enabled` | PostgreSQL use persistent storage | `true` |
| `postgresql.persistence.size` | PostgreSQL persistent storage size | `50Gi` |
| `postgresql.service.port` | PostgreSQL database port | `5432` |
| `postgresql.resources.requests.memory` | PostgreSQL initial memory request | |
| `postgresql.resources.requests.cpu` | PostgreSQL initial cpu request | |
| `postgresql.resources.limits.memory` | PostgreSQL memory limit | |
| `postgresql.resources.limits.cpu` | PostgreSQL cpu limit | |
| `database.type` | External database type (`postgresql`, `mysql`, `oracle` or `mssql`) | |
| `database.host` | External database hostname | |
| `database.port` | External database port | |
| `database.url` | External database connection URL | |
| `database.user` | External database username | |
| `database.password` | External database password | |
| `database.secrets.user.name` | External database username `Secret` name | |
| `database.secrets.user.key` | External database username `Secret` key | |
| `database.secrets.password.name` | External database password `Secret` name | |
| `database.secrets.password.key` | External database password `Secret` key | |
| `database.secrets.url.name ` | External database url `Secret` name | |
| `database.secrets.url.key` | External database url `Secret` key | |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
### Ingress and TLS
To get Helm to create an ingress object with a hostname, add these two lines to your Helm command:
```
helm install --name artifactory-ha \
--set ingress.enabled=true \
--set ingress.hosts[0]="artifactory.company.com" \
--set artifactory.service.type=NodePort \
--set nginx.enabled=false \
jfrog/artifactory-ha
```
If your cluster allows automatic creation/retrieval of TLS certificates (e.g. [cert-manager](https://github.com/jetstack/cert-manager)), please refer to the documentation for that mechanism.
To manually configure TLS, first create/retrieve a key & certificate pair for the address(es) you wish to protect. Then create a TLS secret in the namespace:
```console
kubectl create secret tls artifactory-tls --cert=path/to/tls.cert --key=path/to/tls.key
```
Include the secret's name, along with the desired hostnames, in the Artifactory Ingress TLS section of your custom `values.yaml` file:
```
ingress:
## If true, Artifactory Ingress will be created
##
enabled: true
## Artifactory Ingress hostnames
## Must be provided if Ingress is enabled
##
hosts:
- artifactory.domain.com
annotations:
kubernetes.io/tls-acme: "true"
## Artifactory Ingress TLS configuration
## Secrets must be manually created in the namespace
##
tls:
- secretName: artifactory-tls
hosts:
- artifactory.domain.com
```
### Ingress annotations
This example specifically enables Artifactory to work as a Docker Registry using the Repository Path method. See [Artifactory as Docker Registry](https://www.jfrog.com/confluence/display/RTF/Getting+Started+with+Artifactory+as+a+Docker+Registry) documentation for more information about this setup.
```
ingress:
enabled: true
defaultBackend:
enabled: false
hosts:
- myhost.example.com
annotations:
ingress.kubernetes.io/force-ssl-redirect: "true"
ingress.kubernetes.io/proxy-body-size: "0"
ingress.kubernetes.io/proxy-read-timeout: "600"
ingress.kubernetes.io/proxy-send-timeout: "600"
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/configuration-snippet: |
rewrite ^/(v2)/token /artifactory/api/docker/null/v2/token;
rewrite ^/(v2)/([^\/]*)/(.*) /artifactory/api/docker/$2/$1/$3;
nginx.ingress.kubernetes.io/proxy-body-size: "0"
tls:
- hosts:
- "myhost.example.com"
```
## Useful links
- https://www.jfrog.com/confluence/display/EP/Getting+Started
- https://www.jfrog.com/confluence/display/RTF/Installing+Artifactory
- https://www.jfrog.com/confluence/
# 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.
* Auto update reverse proxy configuration by pulling configuration generated by Reverse Proxy Configuration Generator from Artifactory using [REST API](https://www.jfrog.com/confluence/display/RTF/Configuring+a+Reverse+Proxy#ConfiguringaReverseProxy-RESTAPI)
* Persist configuration and SSL certificate in `/var/opt/jfrog/nginx` directory
#### Steps to use Reverse Proxy Configuration Generator to configuration for reverse proxy in nginx (Artifactory Pro/Enterprise).
* Deploy Artifactory using helm chart with Nginx enabled.
* Go to Artifactory Admin -> HTTP Settings.
Example values:
```
Docker Access Method: SubDomain
Server Provider: Nginx
Internal Hostname: $ARTIFACTORY_SERVICE_NAME (Get Artifactory Service Name by running `kubectl get svc` command)
Public Server Name: $DOMAIN_NAME
SSL Key Path: /var/opt/jfrog/nginx/ssl/tls.key (If SSL Cert is provided via Secret)
SSL Certificate Path: /var/opt/jfrog/nginx/ssl/tls.crt (If SSL Cert is provided via Secret)
```
* Provide appropriate values and save configuration.
* Once configuration is saved Nginx will automatically fetch reverse proxy configuration snippet from Artifactory and apply it immediately.
#### Steps to use static configuration for reverse proxy in nginx.
1. Create `artifactory-ha.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-ha.conf`
```bash
## add HA entries when ha is configure
upstream artifactory {
server artifactory-ha-artifactory-ha-primary:8081;
server artifactory-ha:8081;
}
## 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 ;
server_name ~(?<repo>.+)\.jfrog.team jfrog.team;
if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;
}
## Application specific logs
## access_log /var/log/nginx/jfrog.team-access.log timing;
## error_log /var/log/nginx/jfrog.team-error.log;
rewrite ^/$ /artifactory/webapp/ redirect;
rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect;
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/$repo/$1/$2;
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/$1;
}
proxy_pass http://artifactory/artifactory/;
proxy_next_upstream http_503 non_idempotent;
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. Create configMap of `artifactory-ha.conf` created with step above.
```bash
kubectl create configmap art-nginx-conf --from-file=artifactory-ha.conf
```
3. Deploy Artifactory using helm chart with auto configuration update disabled in nginx.
You can achieve it by setting value to `true` for `nginx.env.skipAutoConfigUpdate` and providing name of configMap created above to `nginx.customArtifactoryConfigMap` in [values.yaml](values.yaml)
Which sets Environment Variable `SKIP_AUTO_UPDATE_CONFIG=true` in Nginx container.
Following is command to set values at runtime:
```bash
helm install --name artifactory-ha --set nginx.env.skipAutoConfigUpdate=true,nginx.customArtifactoryConfigMap=art-nginx-conf jfrog/artifactory-ha
```
\ No newline at end of file
# JFrog Artifactory High Availability Helm Chart
Universal Repository Manager supporting all major packaging formats, build tools and CI servers.
## Chart Details
This chart will do the following:
* Deploy Artifactory highly available cluster. 1 primary node and 2 member nodes.
* Deploy a PostgreSQL database
* Deploy an Nginx server(optional)
## Useful links
Blog: [Herd Trust Into Your Rancher Labs Multi-Cloud Strategy with Artifactory](https://jfrog.com/blog/herd-trust-into-your-rancher-labs-multi-cloud-strategy-with-artifactory/)
## Activate Your Artifactory Instance
Don't have a license? Please send an email to [rancher-jfrog-licenses@jfrog.com](mailto:rancher-jfrog-licenses@jfrog.com) to get it.
categories:
- repository
labels:
io.rancher.certified: partner
questions:
- variable: defaultImage
default: "true"
description: "Use default Docker image"
label: Use Default Image
type: boolean
show_subquestion_if: false
group: "Container Images"
subquestions:
- variable: initContainerImage
default: "alpine:3.6"
description: "Init image name"
type: string
label: Init image name
- variable: artifactory.image.repository
default: "docker.bintray.io/jfrog/artifactory-pro"
description: "Artifactory image name"
type: string
label: Artifactory Image Name
- variable: artifactory.image.version
default: "6.6.3"
description: "Artifactory image tag"
type: string
label: Artifactory Image Tag
- variable: nginx.image.repository
default: "docker.bintray.io/jfrog/nginx-artifactory-pro"
description: "Nginx image name"
type: string
label: Nginx Image Name
- variable: nginx.image.version
default: "6.6.3"
description: "Nginx image tag"
type: string
label: Nginx Image Tag
- variable: imagePullSecrets
description: "Image Pull Secret"
type: string
label: Image Pull Secret
# Services and LoadBalancing Settings
- variable: ingress.enabled
default: true
description: "Expose app using Layer 7 Load Balancer - ingress"
type: boolean
label: Expose app using Layer 7 Load Balancer
show_subquestion_if: true
group: "Services and Load Balancing"
required: true
subquestions:
- variable: ingress.hosts[0]
default: "xip.io"
description: "Hostname to your artifactory installation"
type: hostname
required: true
label: Hostname
# Nginx Settings
- variable: nginx.enabled
default: false
description: "Enable nginx server"
type: boolean
label: Enable Nginx Server
group: "Services and Load Balancing"
required: true
show_if: "ingress.enabled=false"
- variable: nginx.service.type
default: "LoadBalancer"
description: "Nginx service type"
type: enum
required: true
label: Nginx Service Type
show_if: "nginx.enabled=true&&ingress.enabled=false"
group: "Services and Load Balancing"
options:
- "ClusterIP"
- "NodePort"
- "LoadBalancer"
- variable: nginx.service.loadBalancerIP
default: ""
description: "Provide Static IP to configure with Nginx"
type: string
label: Config Nginx LoadBalancer IP
show_if: "nginx.enabled=true&&nginx.service.type=LoadBalancer&&ingress.enabled=false"
group: "Services and Load Balancing"
- variable: nginx.tlsSecretName
default: ""
description: "Provide SSL Secret name to configure with Nginx"
type: string
label: Config Nginx SSL Secret
show_if: "nginx.enabled=true&&ingress.enabled=false"
group: "Services and Load Balancing"
- variable: nginx.customArtifactoryConfigMap
default: ""
description: "Provide configMap name to configure Nginx with custom `artifactory.conf`"
type: string
label: ConfigMap for Nginx Artifactory Config
show_if: "nginx.enabled=true&&ingress.enabled=false"
group: "Services and Load Balancing"
- variable: nginx.env.skipAutoConfigUpdate
default: "false"
description: "Skip Nginx Auto Configuration Update"
type: string
label: Skip Nginx Auto Configuration Update
show_if: "nginx.enabled=true&&ingress.enabled=false"
group: "Services and Load Balancing"
- variable: nginx.persistence.enabled
default: false
description: "enable persistence storage for nginx server"
type: boolean
label: Enable Persistent Storage for Nginx Service
group: "Services and Load Balancing"
show_if: "nginx.enabled=true&&ingress.enabled=false"
- variable: nginx.persistence.size
default: 5Gi
description: "Nginx persistent volume size"
type: string
label: Nginx Persistent Volume Size
group: "Services and Load Balancing"
show_if: "nginx.enabled=true&&nginx.persistence.enabled=true&&ingress.enabled=false"
- variable: nginx.persistence.storageClass
default: ""
description: "If undefined or null, uses the default StorageClass. Default to null"
type: storageclass
label: Default StorageClass for Nginx
show_if: "nginx.enabled=true&&nginx.persistence.enabled=true&&ingress.enabled=false"
group: "Services and Load Balancing"
- variable: nginx.resources.requests.cpu
default: "200m"
description: "Nginx initial cpu request"
type: string
label: Nginx Initial CPU Request
show_if: "nginx.enabled=true&&ingress.enabled=false"
group: "Services and Load Balancing"
- variable: nginx.resources.requests.memory
default: "500Mi"
description: "Nginx initial memory request"
type: string
label: Nginx Initial Memory Request
show_if: "nginx.enabled=true&&ingress.enabled=false"
group: "Services and Load Balancing"
- variable: nginx.resources.limits.cpu
default: "1"
description: "Nginx cpu limit"
type: string
label: Nginx CPU Limit
show_if: "nginx.enabled=true&&ingress.enabled=false"
group: "Services and Load Balancing"
- variable: nginx.resources.limits.memory
default: "1Gi"
description: "Nginx memory limit"
type: string
label: Nginx Memory Limit
show_if: "nginx.enabled=true&&ingress.enabled=false"
group: "Services and Load Balancing"
# Artifactory Storage Settings
- variable: artifactory.persistence.enabled
default: true
description: "enable persistence storage for Artifactory"
type: boolean
label: Enable Persistent Storage for Artifactory
group: "Artifactory Storage"
required: true
show_subquestion_if: true
subquestions:
- variable: artifactory.persistence.size
default: "50Gi"
description: "Artifactory persistent volume size"
type: string
label: Artifactory Persistent Volume Size
required: true
- variable: artifactory.persistence.type
default: "file-system"
description: "Artifactory persistent volume size"
type: enum
label: Artifactory Persistent Storage Type
required: true
options:
- "file-system"
- "nfs"
- "google-storage"
- "aws-s3"
#Storage Type Settings
- variable: artifactory.persistence.nfs.ip
default: ""
type: string
group: "Artifactory Storage"
label: NFS Server IP
description: "NFS server IP"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=nfs"
- variable: artifactory.persistence.nfs.haDataMount
default: "/data"
type: string
label: NFS Data Directory
description: "NFS data directory"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=nfs"
- variable: artifactory.persistence.nfs.haBackupMount
default: "/backup"
type: string
label: NFS Backup Directory
description: "NFS backup directory"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=nfs"
- variable: artifactory.persistence.nfs.dataDir
default: "/var/opt/jfrog/artifactory-ha"
type: string
label: HA Data Directory
description: "HA data directory"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=nfs"
- variable: artifactory.persistence.nfs.backupDir
default: "/var/opt/jfrog/artifactory-backup"
type: string
label: HA Backup Directory
description: "HA backup directory "
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=nfs"
- variable: artifactory.persistence.nfs.capacity
default: "200Gi"
type: string
label: NFS PVC Size
description: "NFS PVC size "
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=nfs"
#Google storage settings
- variable: artifactory.persistence.googleStorage.bucketName
default: "artifactory-ha-gcp"
type: string
label: Google Storage Bucket Name
description: "Google storage bucket name"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=google-storage"
- variable: artifactory.persistence.googleStorage.identity
default: ""
type: string
label: Google Storage Service Account ID
description: "Google Storage service account id"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=google-storage"
- variable: artifactory.persistence.googleStorage.credential
default: ""
type: string
label: Google Storage Service Account Key
description: "Google Storage service account key"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=google-storage"
- variable: artifactory.persistence.googleStorage.path
default: "artifactory-ha/filestore"
type: string
label: Google Storage Path In Bucket
description: "Google Storage path in bucket"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=google-storage"
# awsS3 storage settings
- variable: artifactory.persistence.awsS3.bucketName
default: "artifactory-ha-aws"
type: string
label: AWS S3 Bucket Name
description: "AWS S3 bucket name"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=aws-s3"
- variable: artifactory.persistence.awsS3.region
default: ""
type: string
label: AWS S3 Bucket Region
description: "AWS S3 bucket region"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=aws-s3"
- variable: artifactory.persistence.awsS3.identity
default: ""
type: string
label: AWS S3 AWS_ACCESS_KEY_ID
description: "AWS S3 AWS_ACCESS_KEY_ID"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=aws-s3"
- variable: artifactory.persistence.awsS3.credential
default: ""
type: string
label: AWS S3 AWS_SECRET_ACCESS_KEY
description: "AWS S3 AWS_SECRET_ACCESS_KEY"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=aws-s3"
- variable: artifactory.persistence.awsS3.path
default: "artifactory-ha/filestore"
type: string
label: AWS S3 Path In Bucket
description: "AWS S3 path in bucket"
group: "Artifactory Storage"
show_if: "artifactory.persistence.enabled=true&&artifactory.persistence.type=aws-s3"
# Database Settings
- variable: postgresql.enabled
default: true
description: "Enable PostgreSQL"
type: boolean
required: true
label: Enable PostgreSQL
group: "Database Settings"
show_subquestion_if: "true"
subquestions:
- variable: postgresql.persistence.enabled
default: false
description: "enable persistence storage for PostgreSQL"
type: boolean
label: Enable Persistent Storage for PostgreSQL
- variable: postgresql.persistence.size
default: 20Gi
description: "PostgreSQL persistent volume size"
type: string
label: PostgreSQL Persistent Volume Size
show_if: "postgresql.enabled=true&&postgresql.persistence.enabled=true"
- variable: postgresql.persistence.storageClass
default: ""
description: "If undefined or null, uses the default StorageClass. Default to null"
type: storageclass
label: Default StorageClass for PostgreSQL
show_if: "postgresql.enabled=true&&postgresql.persistence.enabled=true"
- variable: postgresql.resources.requests.cpu
default: "200m"
description: "PostgreSQL initial cpu request"
type: string
label: PostgreSQL Initial CPU Request
show_if: "postgresql.enabled=true"
- variable: postgresql.resources.requests.memory
default: "500Mi"
description: "PostgreSQL initial memory request"
type: string
label: PostgreSQL Initial Memory Request
show_if: "postgresql.enabled=true"
- variable: postgresql.resources.limits.cpu
default: "1"
description: "PostgreSQL cpu limit"
type: string
label: PostgreSQL CPU Limit
show_if: "postgresql.enabled=true"
- variable: postgresql.resources.limits.memory
default: "1Gi"
description: "PostgreSQL memory limit"
type: string
label: PostgreSQL Memory Limit
show_if: "postgresql.enabled=true"
- variable: database.type
default: "postgresql"
description: "xternal database type (postgresql, mysql, oracle or mssql)"
type: enum
required: true
label: External Database Type
group: "Database Settings"
show_if: "postgresql.enabled=false"
options:
- "postgresql"
- "mysql"
- "oracle"
- "mssql"
- variable: database.url
default: ""
description: "External database URL. If you set the url, leave host and port empty"
type: string
label: External Database URL
group: "Database Settings"
show_if: "postgresql.enabled=false"
- variable: database.host
default: ""
description: "External database hostname"
type: string
label: External Database Hostname
group: "Database Settings"
show_if: "postgresql.enabled=false"
- variable: database.port
default: ""
description: "External database port"
type: string
label: External Database Port
group: "Database Settings"
show_if: "postgresql.enabled=false"
- variable: database.user
default: ""
description: "External database username"
type: string
label: External Database Username
group: "Database Settings"
show_if: "postgresql.enabled=false"
- variable: database.password
default: ""
description: "External database password"
type: string
label: External Database Password
group: "Database Settings"
show_if: "postgresql.enabled=false"
# Advance Settings
- variable: advancedOptions
default: false
description: "Show advanced configurations"
label: Show Advanced Configurations
type: boolean
show_subquestion_if: true
group: "Advanced Options"
subquestions:
- variable: artifactory.masterKey
default: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
description: "Artifactory master key"
type: string
label: Artifactory master key
- variable: artifactory.primary.resources.requests.cpu
default: "500m"
description: "Artifactory primary node initial cpu request"
type: string
label: Artifactory Primary Node Initial CPU Request
- variable: artifactory.primary.resources.requests.memory
default: "1Gi"
description: "Artifactory primary node initial memory request"
type: string
label: Artifactory Primary Node Initial Memory Request
- variable: artifactory.primary.javaOpts.xms
default: "1g"
description: "Artifactory primary node java Xms size"
type: string
label: Artifactory Primary Node Java Xms Size
- variable: artifactory.primary.resources.limits.cpu
default: "2"
description: "Artifactory primary node cpu limit"
type: string
label: Artifactory Primary Node CPU Limit
- variable: artifactory.primary.resources.limits.memory
default: "4Gi"
description: "Artifactory primary node memory limit"
type: string
label: Artifactory Primary Node Memory Limit
- variable: artifactory.primary.javaOpts.xmx
default: "4g"
description: "Artifactory primary node java Xmx size"
type: string
label: Artifactory Primary Node Java Xmx Size
- variable: artifactory.node.resources.requests.cpu
default: "500m"
description: "Artifactory member node initial cpu request"
type: string
label: Artifactory Member Node Initial CPU Request
- variable: artifactory.node.resources.requests.memory
default: "2Gi"
description: "Artifactory member node initial memory request"
type: string
label: Artifactory Member Node Initial Memory Request
- variable: artifactory.node.javaOpts.xms
default: "1g"
description: "Artifactory member node java Xms size"
type: string
label: Artifactory Member Node Java Xms Size
- variable: artifactory.node.resources.limits.cpu
default: "2"
description: "Artifactory member node cpu limit"
type: string
label: Artifactory Member Node CPU Limit
- variable: artifactory.node.resources.limits.memory
default: "4Gi"
description: "Artifactory member node memory limit"
type: string
label: Artifactory Member Node Memory Limit
- variable: artifactory.node.javaOpts.xmx
default: "4g"
description: "Artifactory member node java Xmx size"
type: string
label: Artifactory Member Node Java Xmx Size
dependencies:
- name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com/
version: 0.9.5
digest: sha256:7e07fb616d953e518e3373e2c5183290b4b6e94292a233528c0d52ffd42afc77
generated: 2018-10-28T06:26:39.466565306+02:00
dependencies:
- name: postgresql
version: 0.9.5
repository: https://kubernetes-charts.storage.googleapis.com/
condition: postgresql.enabled
Congratulations. You have just deployed JFrog Artifactory HA!
{{- if (not .Values.artifactory.masterKeySecretName) and 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 .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.postgres-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 }}
{{/* 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" -}}
{{- $name := .Release.Name | trunc 29 -}}
{{- printf "%s-%s-primary" $name .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
The member node name
*/}}
{{- define "artifactory-ha.node.name" -}}
{{- $name := .Release.Name | trunc 29 -}}
{{- printf "%s-%s-member" $name .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- 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 -}}
\ No newline at end of file
kind: ConfigMap
apiVersion: v1
metadata:
name: {{ template "artifactory-ha.fullname" . }}-bs
labels:
app: {{ template "artifactory-ha.name" . }}
chart: {{ template "artifactory-ha.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
binarystore.xml: |-
{{- if eq .Values.artifactory.persistence.type "file-system" }}
<!-- File system replication -->
<config version="2">
<chain>
<provider id="cache-fs" type="cache-fs">
<provider id="sharding-cluster" type="sharding-cluster">
<readBehavior>crossNetworkStrategy</readBehavior>
<writeBehavior>crossNetworkStrategy</writeBehavior>
<redundancy>{{ .Values.artifactory.persistence.redundancy }}</redundancy>
<lenientLimit>2</lenientLimit>
<minSpareUploaderExecutor>2</minSpareUploaderExecutor>
<sub-provider id="state-aware" type="state-aware"/>
<dynamic-provider id="remote" type="remote"/>
<property name="zones" value="local,remote"/>
</provider>
</provider>
</chain>
<!-- Shards add local file-system provider configuration -->
<provider id="state-aware" type="state-aware">
<fileStoreDir>shard-fs-1</fileStoreDir>
<zone>local</zone>
</provider>
<!-- Shards dynamic remote provider configuration -->
<provider id="remote" type="remote">
<checkPeriod>30</checkPeriod>
<serviceId>tester-remote1</serviceId>
<timeout>10000</timeout>
<zone>remote</zone>
<property name="header.remote.block" value="true"/>
</provider>
</config>
{{- end }}
{{- if eq .Values.artifactory.persistence.type "google-storage" }}
<!-- Google storage -->
<config version="2">
<chain>
<provider id="sharding-cluster" type="sharding-cluster">
<readBehavior>crossNetworkStrategy</readBehavior>
<writeBehavior>crossNetworkStrategy</writeBehavior>
<redundancy>{{ .Values.artifactory.persistence.redundancy }}</redundancy>
<minSpareUploaderExecutor>2</minSpareUploaderExecutor>
<sub-provider id="eventual-cluster" type="eventual-cluster">
<provider id="retry" type="retry">
<provider id="google-storage" type="google-storage"/>
</provider>
</sub-provider>
<dynamic-provider id="remote" type="remote"/>
<property name="zones" value="local,remote"/>
</provider>
</chain>
<!-- Set max cache-fs size -->
<provider id="cache-fs" type="cache-fs">
<maxCacheSize>{{ .Values.artifactory.persistence.maxCacheSize }}</maxCacheSize>
</provider>
<provider id="eventual-cluster" type="eventual-cluster">
<zone>local</zone>
</provider>
<provider id="remote" type="remote">
<checkPeriod>30</checkPeriod>
<timeout>10000</timeout>
<zone>remote</zone>
</provider>
<provider id="file-system" type="file-system">
<fileStoreDir>{{ .Values.artifactory.persistence.mountPath }}/data/filestore</fileStoreDir>
<tempDir>/tmp</tempDir>
</provider>
<provider id="google-storage" type="google-storage">
<providerId>google-cloud-storage</providerId>
<endpoint>commondatastorage.googleapis.com</endpoint>
<httpsOnly>false</httpsOnly>
<bucketName>{{ .Values.artifactory.persistence.googleStorage.bucketName }}</bucketName>
<identity>{{ .Values.artifactory.persistence.googleStorage.identity }}</identity>
<credential>{{ .Values.artifactory.persistence.googleStorage.credential }}</credential>
<path>{{ .Values.artifactory.persistence.googleStorage.path }}</path>
</provider>
</config>
{{- end }}
{{- if eq .Values.artifactory.persistence.type "aws-s3" }}
<!-- AWS S3 -->
<config version="2">
<chain> <!--template="cluster-s3"-->
<provider id="cache-fs" type="cache-fs">
<provider id="sharding-cluster" type="sharding-cluster">
<sub-provider id="eventual-cluster" type="eventual-cluster">
<provider id="retry-s3" type="retry">
<provider id="s3" type="s3"/>
</provider>
</sub-provider>
<dynamic-provider id="remote" type="remote"/>
</provider>
</provider>
</chain>
<!-- Set max cache-fs size -->
<provider id="cache-fs" type="cache-fs">
<maxCacheSize>{{ .Values.artifactory.persistence.maxCacheSize }}</maxCacheSize>
</provider>
<provider id="eventual-cluster" type="eventual-cluster">
<zone>local</zone>
</provider>
<provider id="remote" type="remote">
<checkPeriod>30</checkPeriod>
<timeout>10000</timeout>
<zone>remote</zone>
</provider>
<provider id="sharding-cluster" type="sharding-cluster">
<readBehavior>crossNetworkStrategy</readBehavior>
<writeBehavior>crossNetworkStrategy</writeBehavior>
<redundancy>{{ .Values.artifactory.persistence.redundancy }}</redundancy>
<property name="zones" value="local,remote"/>
</provider>
<provider id="s3" type="s3">
<endpoint>{{ .Values.artifactory.persistence.awsS3.endpoint }}</endpoint>
{{- if .Values.artifactory.persistence.awsS3.roleName }}
<roleName>{{ .Values.artifactory.persistence.awsS3.roleName }}</roleName>
<refreshCredentials>true</refreshCredentials>
{{- else }}
<refreshCredentials>{{ .Values.artifactory.persistence.awsS3.refreshCredentials }}</refreshCredentials>
{{- end }}
<testConnection>{{ .Values.artifactory.persistence.awsS3.testConnection }}</testConnection>
<httpsOnly>true</httpsOnly>
<region>{{ .Values.artifactory.persistence.awsS3.region }}</region>
<bucketName>{{ .Values.artifactory.persistence.awsS3.bucketName }}</bucketName>
{{- if .Values.artifactory.persistence.awsS3.identity }}
<identity>{{ .Values.artifactory.persistence.awsS3.identity }}</identity>
{{- end }}
{{- if .Values.artifactory.persistence.awsS3.credential }}
<credential>{{ .Values.artifactory.persistence.awsS3.credential }}</credential>
{{- end }}
<path>{{ .Values.artifactory.persistence.awsS3.path }}</path>
{{- range $key, $value := .Values.artifactory.persistence.awsS3.properties }}
<property name="{{ $key }}" value="{{ $value }}"/>
{{- end }}
</provider>
</config>
{{- end }}
{{- 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:
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:
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 }}
\ No newline at end of file
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 }}
apiVersion: apps/v1beta2
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 }}
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" . }}
role: {{ template "artifactory-ha.node.name" . }}
component: {{ .Values.artifactory.name }}
release: {{ .Release.Name }}
annotations:
checksum/binarystore: {{ include (print $.Template.BasePath "/artifactory-binarystore.yaml") . | sha256sum }}
{{- range $key, $value := .Values.artifactory.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.imagePullSecrets }}
{{- end }}
securityContext:
runAsUser: {{ .Values.artifactory.uid }}
fsGroup: {{ .Values.artifactory.uid }}
initContainers:
- name: "remove-lost-found"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
command:
- 'sh'
- '-c'
- >
if [ -d {{ .Values.artifactory.persistence.mountPath }}/lost+found ]; then
rm -rfv {{ .Values.artifactory.persistence.mountPath }}/lost+found
fi
volumeMounts:
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
name: volume
- name: "wait-for-db"
image: "{{ .Values.initContainerImage }}"
command:
- 'sh'
- '-c'
- >
{{- if .Values.postgresql.enabled }}
until nc -z -w 2 {{ .Release.Name }}-postgresql {{ .Values.postgresql.service.port }} && echo database ok; do
{{- else }}
{{- if and .Values.database.host .Values.database.port }}
until nc -z -w 2 {{ .Values.database.host }} {{ .Values.database.port }} && echo database ok; do
{{- else }}
until true; do
{{- end }}
{{- end }}
sleep 2;
done;
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
{{- if .Values.artifactory.preStartCommand }}
command:
- '/bin/sh'
- '-c'
- >
echo "Running custom preStartCommand command";
{{ .Values.artifactory.preStartCommand }};
/entrypoint-artifactory.sh
{{- end }}
lifecycle:
postStart:
exec:
command:
- '/bin/sh'
- '-c'
- >
{{- if .Values.artifactory.replicator.enabled }}
mkdir -p /opt/jfrog/artifactory/replicator/etc;
cp -fv /tmp/replicator/replicator.yaml /opt/jfrog/artifactory/replicator/etc/replicator.yaml;
{{- end }}
{{- if .Values.artifactory.postStartCommand }}
{{ .Values.artifactory.postStartCommand }}
{{- end }}
env:
{{- if .Values.postgresql.enabled }}
- name: DB_TYPE
value: 'postgresql'
- name: DB_HOST
value: '{{ .Release.Name }}-postgresql'
- name: DB_PORT
value: '{{ .Values.postgresql.service.port }}'
- name: DB_USER
value: '{{ .Values.postgresql.postgresUser }}'
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-postgresql
key: postgres-password
{{- else }}
- name: DB_TYPE
value: '{{ required "Must set database.type when not using the PostgreSQL sub-chart (postgresql.enabled=false) " .Values.database.type }}'
{{- if or .Values.database.url .Values.database.secrets.url }}
- name: DB_URL
{{- if .Values.database.url }}
value: '{{.Values.database.url }}'
{{- else }}
valueFrom:
secretKeyRef:
name: {{ .Values.database.secrets.url.name }}
key: {{ .Values.database.secrets.url.key }}
{{- end }}
{{- else }}
- name: DB_HOST
value: '{{ .Values.database.host }}'
- name: DB_PORT
value: '{{ .Values.database.port }}'
{{- end }}
{{- if .Values.database.secrets.user }}
- name: DB_USER
valueFrom:
secretKeyRef:
name: {{ .Values.database.secrets.user.name }}
key: {{ .Values.database.secrets.user.key }}
{{- end }}
{{- if .Values.database.secrets.password }}
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.database.secrets.password.name }}
key: {{ .Values.database.secrets.password.key }}
{{- else }}
{{- if and .Values.database.type .Values.database.user }}
- name: DB_USER
value: '{{ .Values.database.user }}'
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "artifactory-ha.fullname" . }}
key: db-password
{{- end }}
{{- end }}
{{- end }}
- name: EXTRA_JAVA_OPTIONS
value: "
{{- if .Values.artifactory.javaOpts.other }}
{{ .Values.artifactory.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.node.javaOpts.other }}
{{ .Values.artifactory.node.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.node.javaOpts.xms }}
-Xms{{ .Values.artifactory.node.javaOpts.xms }}
{{- end}}
{{- if .Values.artifactory.node.javaOpts.xmx }}
-Xmx{{ .Values.artifactory.node.javaOpts.xmx }}
{{- end}}
{{- if .Values.artifactory.replicator.enabled }}
-Dartifactory.releasebundle.feature.enabled=true
{{- end }}
"
{{- if .Values.artifactory.replicator.enabled }}
- name: START_LOCAL_REPLICATOR
value: "true"
{{- end }}
- name: ARTIFACTORY_MASTER_KEY
valueFrom:
secretKeyRef:
name: "{{ .Values.artifactory.masterKeySecretName | default (include "artifactory-ha.fullname" .) }}"
key: master-key
- name: HA_IS_PRIMARY
value: "false"
- name: HA_MEMBERSHIP_PORT
value: "{{ .Values.artifactory.membershipPort }}"
- name: HA_NODE_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: ART_PRIMARY_BASE_URL
value: 'http://{{ template "artifactory-ha.primary.name" . }}:8081/artifactory'
{{- if eq .Values.artifactory.persistence.type "nfs" }}
- name: HA_DATA_DIR
value: "{{ .Values.artifactory.persistence.nfs.dataDir }}"
- name: HA_BACKUP_DIR
value: "{{ .Values.artifactory.persistence.nfs.backupDir }}"
{{- end }}
{{- range .Values.artifactory.extraEnvironmentVariables }}
- name: {{ .name }}
value: '{{ .value }}'
{{- end }}
ports:
- containerPort: {{ .Values.artifactory.internalPort }}
volumeMounts:
- name: volume
mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
{{- 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 }}
- name: binarystore-xml
mountPath: "/artifactory_extra_conf/binarystore.xml"
subPath: binarystore.xml
{{- end }}
{{- if .Values.artifactory.replicator.enabled }}
- name: replicator-config
mountPath: "/tmp/replicator/replicator.yaml"
subPath: replicator.yaml
{{- end }}
resources:
{{ toYaml .Values.artifactory.node.resources | indent 10 }}
{{- if .Values.artifactory.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: '/artifactory/webapp/#/login'
port: 8040
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: '/artifactory/webapp/#/login'
port: 8040
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 }}
{{- 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:
- name: binarystore-xml
configMap:
name: {{ template "artifactory-ha.fullname" . }}-bs
{{- if .Values.artifactory.replicator.enabled }}
- name: replicator-config
configMap:
name: {{ template "artifactory-ha.fullname" . }}-replicator-config
{{- 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 }}
{{- if not .Values.artifactory.persistence.enabled }}
- name: volume
emptyDir:
sizeLimit: {{ .Values.artifactory.persistence.size }}
{{- else }}
volumeClaimTemplates:
- metadata:
name: volume
spec:
{{- if .Values.artifactory.node.persistence.existingClaim }}
selector:
matchLabels:
app: artifactory-ha-member
{{- else }}
{{- if .Values.artifactory.persistence.storageClass }}
{{- if (eq "-" .Values.artifactory.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.artifactory.persistence.storageClass }}"
{{- end }}
{{- end }}
accessModes: [ "{{ .Values.artifactory.persistence.accessMode }}" ]
resources:
requests:
storage: {{ .Values.artifactory.persistence.size }}
{{- end }}
{{- end }}
apiVersion: apps/v1beta2
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 }}
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" . }}
role: {{ template "artifactory-ha.primary.name" . }}
component: {{ .Values.artifactory.name }}
release: {{ .Release.Name }}
annotations:
checksum/binarystore: {{ include (print $.Template.BasePath "/artifactory-binarystore.yaml") . | sha256sum }}
{{- range $key, $value := .Values.artifactory.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.imagePullSecrets }}
{{- end }}
securityContext:
runAsUser: {{ .Values.artifactory.uid }}
fsGroup: {{ .Values.artifactory.uid }}
initContainers:
- name: "remove-lost-found"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
command:
- 'sh'
- '-c'
- >
if [ -d {{ .Values.artifactory.persistence.mountPath }}/lost+found ]; then
rm -rfv {{ .Values.artifactory.persistence.mountPath }}/lost+found
fi
volumeMounts:
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
name: volume
- name: "wait-for-db"
image: "{{ .Values.initContainerImage }}"
command:
- 'sh'
- '-c'
- >
{{- if .Values.postgresql.enabled }}
until nc -z -w 2 {{ .Release.Name }}-postgresql {{ .Values.postgresql.service.port }} && echo database ok; do
{{- else }}
{{- if and .Values.database.host .Values.database.port }}
until nc -z -w 2 {{ .Values.database.host }} {{ .Values.database.port }} && echo database ok; do
{{- else }}
until true; do
{{- end }}
{{- end }}
sleep 2;
done;
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
{{- if .Values.artifactory.preStartCommand }}
command:
- '/bin/sh'
- '-c'
- >
echo "Running custom preStartCommand command";
{{ .Values.artifactory.preStartCommand }};
/entrypoint-artifactory.sh
{{- end }}
lifecycle:
postStart:
exec:
command:
- '/bin/sh'
- '-c'
- >
{{- if .Values.artifactory.configMapName }}
cp -Lrf /bootstrap/* /artifactory_extra_conf/;
{{- end }}
{{- if .Values.artifactory.replicator.enabled }}
mkdir -p /opt/jfrog/artifactory/replicator/etc;
cp -fv /tmp/replicator/replicator.yaml /opt/jfrog/artifactory/replicator/etc/replicator.yaml;
{{- end }}
{{- if .Values.artifactory.postStartCommand }}
{{ .Values.artifactory.postStartCommand }}
{{- end }}
env:
{{- if .Values.postgresql.enabled }}
- name: DB_TYPE
value: 'postgresql'
- name: DB_HOST
value: '{{ .Release.Name }}-postgresql'
- name: DB_PORT
value: '{{ .Values.postgresql.service.port }}'
- name: DB_USER
value: '{{ .Values.postgresql.postgresUser }}'
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-postgresql
key: postgres-password
{{- else }}
- name: DB_TYPE
value: '{{ required "Must set database.type when not using the PostgreSQL sub-chart (postgresql.enabled=false) " .Values.database.type }}'
{{- if or .Values.database.url .Values.database.secrets.url }}
- name: DB_URL
{{- if .Values.database.url }}
value: '{{.Values.database.url }}'
{{- else }}
valueFrom:
secretKeyRef:
name: {{ .Values.database.secrets.url.name }}
key: {{ .Values.database.secrets.url.key }}
{{- end }}
{{- else }}
- name: DB_HOST
value: '{{ .Values.database.host }}'
- name: DB_PORT
value: '{{ .Values.database.port }}'
{{- end }}
{{- if .Values.database.secrets.user }}
- name: DB_USER
valueFrom:
secretKeyRef:
name: {{ .Values.database.secrets.user.name }}
key: {{ .Values.database.secrets.user.key }}
{{- end }}
{{- if .Values.database.secrets.password }}
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.database.secrets.password.name }}
key: {{ .Values.database.secrets.password.key }}
{{- else }}
{{- if and .Values.database.type .Values.database.user }}
- name: DB_USER
value: '{{ .Values.database.user }}'
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "artifactory-ha.fullname" . }}
key: db-password
{{- end }}
{{- end }}
{{- end }}
- name: EXTRA_JAVA_OPTIONS
value: "
{{- if .Values.artifactory.javaOpts.other }}
{{ .Values.artifactory.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.primary.javaOpts.other }}
{{ .Values.artifactory.primary.javaOpts.other }}
{{- end}}
{{- if .Values.artifactory.primary.javaOpts.xms }}
-Xms{{ .Values.artifactory.primary.javaOpts.xms }}
{{- end}}
{{- if .Values.artifactory.primary.javaOpts.xmx }}
-Xmx{{ .Values.artifactory.primary.javaOpts.xmx }}
{{- end}}
{{- if .Values.artifactory.replicator.enabled }}
-Dartifactory.releasebundle.feature.enabled=true
{{- end }}
"
{{- if .Values.artifactory.replicator.enabled }}
- name: START_LOCAL_REPLICATOR
value: "true"
{{- end }}
- name: ARTIFACTORY_MASTER_KEY
valueFrom:
secretKeyRef:
name: "{{ .Values.artifactory.masterKeySecretName | default (include "artifactory-ha.fullname" .) }}"
key: master-key
- name: HA_IS_PRIMARY
value: "true"
- name: HA_MEMBERSHIP_PORT
value: "{{ .Values.artifactory.membershipPort }}"
- name: HA_NODE_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
{{- if eq .Values.artifactory.persistence.type "nfs" }}
- name: HA_DATA_DIR
value: "{{ .Values.artifactory.persistence.nfs.dataDir }}"
- name: HA_BACKUP_DIR
value: "{{ .Values.artifactory.persistence.nfs.backupDir }}"
{{- end }}
{{- range .Values.artifactory.extraEnvironmentVariables }}
- name: {{ .name }}
value: '{{ .value }}'
{{- end }}
ports:
- containerPort: {{ .Values.artifactory.internalPort }}
{{- if .Values.artifactory.replicator.enabled }}
- containerPort: {{ .Values.artifactory.internalPortReplicator }}
{{- end }}
volumeMounts:
- name: volume
mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
- name: artifactory-inactiveservercleaner
mountPath: "/tmp/plugins/inactiveServerCleaner.groovy"
subPath: inactiveServerCleaner.groovy
{{- 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 }}
- name: binarystore-xml
mountPath: "/artifactory_extra_conf/binarystore.xml"
subPath: binarystore.xml
{{- end }}
{{- if .Values.artifactory.configMapName }}
- name: bootstrap-config
mountPath: "/bootstrap/"
{{- end }}
{{- if .Values.artifactory.license.secret }}
- name: artifactory-license
mountPath: "/artifactory_extra_conf/artifactory.cluster.license"
subPath: {{ .Values.artifactory.license.dataKey }}
{{- end }}
{{- if .Values.artifactory.replicator.enabled }}
- name: replicator-config
mountPath: "/tmp/replicator/replicator.yaml"
subPath: replicator.yaml
{{- end }}
resources:
{{ toYaml .Values.artifactory.primary.resources | indent 10 }}
{{- if .Values.artifactory.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: '/artifactory/webapp/#/login'
port: 8040
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: '/artifactory/webapp/#/login'
port: 8040
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 }}
{{- 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:
- name: binarystore-xml
configMap:
name: {{ template "artifactory-ha.fullname" . }}-bs
{{- if .Values.artifactory.replicator.enabled }}
- name: replicator-config
configMap:
name: {{ template "artifactory-ha.fullname" . }}-replicator-config
{{- end }}
{{- if .Values.artifactory.configMapName }}
- name: bootstrap-config
configMap:
name: {{ .Values.artifactory.configMapName }}
{{- end}}
- name: artifactory-inactiveservercleaner
configMap:
name: {{ template "artifactory-ha.fullname" . }}-isc
{{- if .Values.artifactory.license.secret }}
- name: artifactory-license
secret:
secretName: {{ .Values.artifactory.license.secret }}
{{- 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 }}
{{- if not .Values.artifactory.persistence.enabled }}
- name: volume
emptyDir:
sizeLimit: {{ .Values.artifactory.persistence.size }}
{{- else }}
volumeClaimTemplates:
- metadata:
name: volume
spec:
{{- if .Values.artifactory.primary.persistence.existingClaim }}
selector:
matchLabels:
app: artifactory-ha-primary
{{- else }}
{{- if .Values.artifactory.persistence.storageClass }}
{{- if (eq "-" .Values.artifactory.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.artifactory.persistence.storageClass }}"
{{- end }}
{{- end }}
accessModes: [ "{{ .Values.artifactory.persistence.accessMode }}" ]
resources:
requests:
storage: {{ .Values.artifactory.persistence.size }}
{{- end }}
{{- end }}
{{- 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 }}
{{- 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 }}
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 }}
# 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 }}
spec:
type: {{ .Values.artifactory.service.type }}
ports:
- port: {{ .Values.artifactory.externalPort }}
targetPort: {{ .Values.artifactory.internalPort }}
protocol: TCP
name: http
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 }}
ports:
- port: {{ .Values.artifactory.externalPort }}
targetPort: {{ .Values.artifactory.internalPort }}
protocol: TCP
name: http
{{- if .Values.artifactory.replicator.enabled }}
- port: {{ .Values.artifactory.externalPortReplicator }}
targetPort: {{ .Values.artifactory.internalPortReplicator }}
protocol: TCP
name: replicator
{{- end}}
selector:
role: {{ template "artifactory-ha.primary.name" . }}
app: {{ template "artifactory-ha.name" . }}
component: "{{ .Values.artifactory.name }}"
release: {{ .Release.Name }}
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
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.serviceAccountName" . }}
{{- end }}
{{- if .Values.ingress.enabled -}}
{{- $serviceName := include "artifactory-ha.fullname" . -}}
{{- $servicePort := .Values.artifactory.externalPort -}}
apiVersion: extensions/v1beta1
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.annotations }}
annotations:
{{ .Values.ingress.annotations | toYaml | trimSuffix "\n" | indent 4 -}}
{{- end }}
spec:
{{- if .Values.ingress.defaultBackend.enabled }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end -}}
{{- if .Values.ingress.hosts }}
rules:
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host | quote }}
http:
paths:
- path: /
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end -}}
{{- end -}}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
{{- if .Values.nginx.enabled -}}
{{- $serviceName := include "artifactory-ha.fullname" . -}}
{{- $servicePort := .Values.artifactory.externalPort -}}
apiVersion: apps/v1beta2
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 }}
spec:
replicas: {{ .Values.nginx.replicaCount }}
selector:
matchLabels:
app: {{ template "artifactory-ha.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.nginx.name }}
template:
metadata:
labels:
app: {{ template "artifactory-ha.name" . }}
component: {{ .Values.nginx.name }}
release: {{ .Release.Name }}
spec:
serviceAccountName: {{ template "artifactory-ha.serviceAccountName" . }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.imagePullSecrets }}
{{- end }}
initContainers:
{{- if .Values.nginx.persistence.enabled }}
- name: "remove-lost-found"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
command:
- '/bin/sh'
- '-c'
- 'rm -rfv {{ .Values.nginx.persistence.mountPath }}/lost+found'
volumeMounts:
- mountPath: {{ .Values.nginx.persistence.mountPath | quote }}
name: nginx-volume
{{- end }}
- name: "wait-for-artifactory"
image: "{{ .Values.initContainerImage }}"
command:
- 'sh'
- '-c'
- >
until nc -z -w 2 {{ $serviceName }} {{ $servicePort }} && echo artifactory ok; do
sleep 2;
done;
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 }}
lifecycle:
postStart:
exec:
command:
- '/bin/sh'
- '-c'
- >
{{- if .Values.nginx.customConfigMap }}
cp -Lrf /tmp/nginx.conf /etc/nginx/nginx.conf;
{{- end }}
{{- if .Values.nginx.customArtifactoryConfigMap }}
cp -Lrf /tmp/conf.d/artifactory*.conf /etc/nginx/conf.d/artifactory.conf;
{{- else }}
if ! grep -q 'upstream' /etc/nginx/conf.d/artifactory.conf; then
sed -i -e 's,proxy_pass .*,proxy_pass http://{{ $serviceName }}:{{ $servicePort }}/artifactory/;,g' \
-e 's,server_name .*,server_name ~(?<repo>.+)\\.{{ $serviceName }} {{ $serviceName }};,g' \
/etc/nginx/conf.d/artifactory.conf;
fi;
{{- end }}
if [ -f /tmp/replicator-nginx.conf ]; then
cp -fv /tmp/replicator-nginx.conf /etc/nginx/conf.d/replicator-nginx.conf;
fi;
if [ -f /tmp/ssl/*.crt ]; then
rm -rf /var/opt/jfrog/nginx/ssl/example.*;
cp -fv /tmp/ssl/* /var/opt/jfrog/nginx/ssl;
fi;
until [ -f /etc/nginx/conf.d/artifactory.conf ]; do sleep 1; done;
sleep 5; nginx -s reload; touch /var/log/nginx/conf.done
env:
- name: ART_BASE_URL
{{- if .Values.nginx.env.artUrl }}
value: {{ .Values.nginx.env.artUrl }}
{{- else }}
value: 'http://{{ $serviceName }}:{{ $servicePort }}/artifactory'
{{- end }}
- name: SSL
value: "{{ .Values.nginx.env.ssl }}"
{{- if .Values.nginx.customArtifactoryConfigMap }}
- name: SKIP_AUTO_UPDATE_CONFIG
value: "true"
{{- else }}
- name: SKIP_AUTO_UPDATE_CONFIG
value: "{{ .Values.nginx.env.skipAutoConfigUpdate }}"
{{- end }}
ports:
- containerPort: {{ .Values.nginx.internalPortHttp }}
- containerPort: {{ .Values.nginx.internalPortHttps }}
{{- if .Values.artifactory.replicator.enabled }}
- containerPort: {{ .Values.nginx.internalPortReplicator }}
{{- end }}
volumeMounts:
- name: nginx-volume
mountPath: {{ .Values.nginx.persistence.mountPath | quote }}
{{- if .Values.artifactory.replicator.enabled }}
- name: replicator-nginx-config
mountPath: "/tmp/replicator-nginx.conf"
subPath: replicator-nginx.conf
{{- end }}
{{- if .Values.nginx.tlsSecretName }}
- name: ssl-secret-volume
mountPath: "/tmp/ssl"
{{- end }}
{{- if .Values.nginx.customConfigMap }}
- name: nginx-config
mountPath: "/tmp/"
{{- end }}
{{- if .Values.nginx.customArtifactoryConfigMap }}
- name: artifactory-nginx-config
mountPath: "/tmp/conf.d"
{{- end }}
resources:
{{ toYaml .Values.nginx.resources | indent 10 }}
{{- if .Values.nginx.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: '/artifactory/webapp/#/login'
port: 80
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: '/artifactory/webapp/#/login'
port: 80
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 }}
{{- 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:
{{- if .Values.artifactory.replicator.enabled }}
- name: replicator-nginx-config
configMap:
name: {{ template "artifactory-ha.fullname" . }}-replicator-nginx-config
{{- end}}
{{- if .Values.nginx.customConfigMap }}
- name: nginx-config
configMap:
name: {{ .Values.nginx.customConfigMap }}
{{- end }}
{{- if .Values.nginx.customArtifactoryConfigMap }}
- name: artifactory-nginx-config
configMap:
name: {{ .Values.nginx.customArtifactoryConfigMap }}
{{- end}}
- name: nginx-volume
{{- if .Values.nginx.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.nginx.persistence.existingClaim | default (include "artifactory-ha.nginx.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end -}}
{{- if .Values.nginx.tlsSecretName }}
- name: ssl-secret-volume
secret:
secretName: {{ .Values.nginx.tlsSecretName }}
{{- end }}
{{- end }}
{{- if and .Values.nginx.persistence.enabled (.Values.nginx.enabled ) }}
{{- 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 }}
{{- if .Values.artifactory.replicator.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory-ha.fullname" . }}-replicator-nginx-config
labels:
app: {{ template "artifactory-ha.name" . }}
chart: {{ template "artifactory-ha.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
replicator-nginx.conf: |
## Artifactory replicator
server {
listen {{ .Values.nginx.externalPortReplicator }};
server_name {{ include "artifactory-ha.fullname" . }};
client_max_body_size 0;
location / {
proxy_read_timeout 900;
proxy_pass_header Server;
proxy_pass http://{{ include "artifactory-ha.primary.name" . }}:{{ .Values.nginx.internalPortReplicator }};
proxy_http_version 1.1;
}
}
{{- end -}}
\ No newline at end of file
{{- 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.annotations }}
annotations:
{{ toYaml .Values.nginx.service.annotations | indent 4 }}
{{- end }}
spec:
type: {{ .Values.nginx.service.type }}
{{- 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:
{{- if .Values.artifactory.replicator.enabled }}
- port: {{ .Values.nginx.externalPortReplicator }}
targetPort: {{ .Values.nginx.internalPortReplicator }}
protocol: TCP
name: replicator
{{- end }}
- port: {{ .Values.nginx.externalPortHttp }}
targetPort: {{ .Values.nginx.internalPortHttp }}
protocol: TCP
name: http
- port: {{ .Values.nginx.externalPortHttps }}
targetPort: {{ .Values.nginx.internalPortHttps }}
protocol: TCP
name: https
selector:
app: {{ template "artifactory-ha.name" . }}
component: {{ .Values.nginx.name }}
release: {{ .Release.Name }}
{{- end }}
{{- if .Values.artifactory.replicator.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory-ha.fullname" . }}-replicator-config
labels:
app: {{ template "artifactory-ha.name" . }}
chart: {{ template "artifactory-ha.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
replicator.yaml: |-
externalUrl: {{ .Values.artifactory.replicator.publicUrl }}
internalUrl: http://localhost:6061
listenPort: 6061
{{- end -}}
# Default values for artifactory-ha.
# This is a YAML-formatted file.
# Beware when changing values here. You should know what you are doing!
# Access the values with {{ .Values.key.subkey }}
# Common
initContainerImage: "alpine:3.6"
# For supporting pulling from private registries
imagePullSecrets:
## Role Based Access Control
## Ref: https://kubernetes.io/docs/admin/authorization/rbac/
rbac:
create: true
role:
## Rules to create. It follows the role specification
rules:
- apiGroups:
- ''
resources:
- services
- endpoints
- pods
verbs:
- get
- watch
- list
## Service Account
## Ref: https://kubernetes.io/docs/admin/service-accounts-admin/
##
serviceAccount:
create: true
## The name of the ServiceAccount to use.
## If not set and create is true, a name is generated using the fullname template
name:
ingress:
enabled: false
defaultBackend:
enabled: true
# Used to create an Ingress record.
hosts:
# - artifactory.domain.example
annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
tls:
# Secrets must be manually created in the namespace.
# - secretName: chart-example-tls
# hosts:
# - artifactory.domain.example
# Database
## Configuration values for the postgresql dependency
## ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md
##
postgresql:
enabled: true
imageTag: "9.6.11"
postgresDatabase: "artifactory"
postgresUser: "artifactory"
postgresPassword:
postgresConfig:
maxConnections: "1500"
service:
port: 5432
persistence:
enabled: true
size: 50Gi
resources: {}
# requests:
# memory: "512Mi"
# cpu: "100m"
# limits:
# memory: "1Gi"
# cpu: "500m"
## If NOT using the PostgreSQL in this chart (postgresql.enabled=false),
## you MUST specify custom database details here or Artifactory will NOT start
database:
type:
host:
port:
## If you set the url, leave host and port empty
url:
## If you would like this chart to create the secret containing the db
## password, use these values
user:
password:
## If you have existing Kubernetes secrets containing db credentials, use
## these values
secrets: {}
# user:
# name: "rds-artifactory"
# key: "db-user"
# password:
# name: "rds-artifactory"
# key: "db-password"
# url:
# name: "rds-artifactory"
# key: "db-url"
# Artifactory
artifactory:
name: artifactory-ha
image:
repository: "docker.bintray.io/jfrog/artifactory-pro"
# Note that by default we use appVersion to get image tag
# version:
pullPolicy: IfNotPresent
## Artifactory requires a unique master key
## You can generate one with the command:
## 'openssl rand -hex 32'
## Pass it to helm with '--set artifactory.masterKey=${MASTER_KEY}'
## Alternatively, you can use a pre-existing secret with a key called master-key by specifying masterKeySecretName
## IMPORTANT: You should NOT use the example masterKey for a production deployment!
masterKey: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
# masterKeySecretName:
## Artifactory license secret.
## If artifactory.license.secret is passed, it will be mounted as
## ARTIFACTORY_HOME/etc/artifactory.cluster.license and loaded at run time.
## The dataKey should be the name of the secret data key created.
license:
secret:
dataKey:
## Create configMap with artifactory.config.import.xml and security.import.xml and pass name of configMap in following parameter
configMapName:
## Extra pre-start command to install JDBC driver for MySql/MariaDb/Oracle
# preStartCommand: "curl -L -o /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.41.jar https://jcenter.bintray.com/mysql/mysql-connector-java/5.1.41/mysql-connector-java-5.1.41.jar"
## Extra post-start command to run extra commands after container starts
# postStartCommand:
## Extra environment variables that can be used to tune Artifactory to your needs.
## Uncomment and set value as needed
extraEnvironmentVariables:
# - name: SERVER_XML_ARTIFACTORY_PORT
# value: "8081"
# - name: SERVER_XML_ARTIFACTORY_MAX_THREADS
# value: "200"
# - name: SERVER_XML_ACCESS_MAX_THREADS
# value: "50"
# - name: SERVER_XML_ARTIFACTORY_EXTRA_CONFIG
# value: ""
# - name: SERVER_XML_ACCESS_EXTRA_CONFIG
# value: ""
# - name: DB_POOL_MAX_ACTIVE
# value: "100"
# - name: DB_POOL_MAX_IDLE
# value: "10"
membershipPort: 10017
externalPort: 8081
internalPort: 8081
internalPortReplicator: 6061
externalPortReplicator: 6061
uid: 1030
## The following settings are to configure the frequency of the liveness and readiness probes
livenessProbe:
enabled: true
initialDelaySeconds: 180
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 1
persistence:
enabled: true
local: false
redundancy: 3
mountPath: "/var/opt/jfrog/artifactory"
accessMode: ReadWriteOnce
size: 200Gi
maxCacheSize: 50000000000
## artifactory data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
## Set the persistence storage type. This will apply the matching binarystore.xml to Artifactory config
## Supported types are:
## file-system (default)
## nfs
## google-storage
## aws-s3
type: file-system
## For artifactory.persistence.type nfs
## If using NFS as the shared storage, you must have a running NFS server that is accessible by your Kubernetes
## cluster nodes.
## Need to have the following set
nfs:
# Must pass actual IP of NFS server with '--set For artifactory.persistence.nfs.ip=${NFS_IP}'
ip:
haDataMount: "/data"
haBackupMount: "/backup"
dataDir: "/var/opt/jfrog/artifactory-ha"
backupDir: "/var/opt/jfrog/artifactory-backup"
capacity: 200Gi
## For artifactory.persistence.type google-storage
googleStorage:
# Set a unique bucket name
bucketName: "artifactory-ha-gcp"
identity:
credential:
path: "artifactory-ha/filestore"
## For artifactory.persistence.type aws-s3
## IMPORTANT: Make sure S3 `endpoint` and `region` match! See https://docs.aws.amazon.com/general/latest/gr/rande.html
awsS3:
# Set a unique bucket name
bucketName: "artifactory-ha-aws"
endpoint:
region:
roleName:
identity:
credential:
path: "artifactory-ha/filestore"
refreshCredentials: true
testConnection: false
## Additional properties to set on the s3 provider
properties: {}
# httpclient.max-connections: 100
service:
name: artifactory
type: ClusterIP
## Which nodes in the cluster should be in the external load balancer pool (have external traffic routed to them)
## Supported pool values
## members
## all
pool: members
## The following Java options are passed to the java process running Artifactory.
## This will be passed to all cluster members. Primary and member nodes.
javaOpts: {}
# other: ""
## Artifactory Replicator is available only for Enterprise Plus
replicator:
enabled: false
publicUrl:
annotations: {}
## Type specific configurations.
## There is a difference between the primary and the member nodes.
## Customising their resources and java parameters is done here.
primary:
name: artifactory-ha-primary
persistence:
## Set existingClaim to true or false
## If true, you must prepare a PVC with the name e.g `artifactory-ha-primary`
existingClaim: false
## Resources for the primary node
resources: {}
# requests:
# memory: "1Gi"
# cpu: "500m"
# limits:
# memory: "2Gi"
# cpu: "1"
## The following Java options are passed to the java process running Artifactory primary node.
## You should set them according to the resources set above
javaOpts: {}
# xms: "1g"
# xmx: "2g"
# other: ""
nodeSelector: {}
tolerations: []
affinity: {}
## Only used if "affinity" is empty
podAntiAffinity:
## Valid values are "soft" or "hard"; any other value indicates no anti-affinity
type: ""
topologyKey: "kubernetes.io/hostname"
node:
name: artifactory-ha-member
persistence:
## Set existingClaim to true or false
## If true, you must prepare a PVC with the name e.g `artifactory-ha-member`
existingClaim: false
replicaCount: 2
minAvailable: 1
## Resources for the member nodes
resources: {}
# requests:
# memory: "1Gi"
# cpu: "500m"
# limits:
# memory: "2Gi"
# cpu: "1"
## The following Java options are passed to the java process running Artifactory member nodes.
## You should set them according to the resources set above
javaOpts: {}
# xms: "1g"
# xmx: "2g"
# other: ""
nodeSelector: {}
tolerations: []
## Complete specification of the "affinity" of the member nodes; if this is non-empty,
## "podAntiAffinity" values are not used.
affinity: {}
## Only used if "affinity" is empty
podAntiAffinity:
## Valid values are "soft" or "hard"; any other value indicates no anti-affinity
type: ""
topologyKey: "kubernetes.io/hostname"
# Nginx
nginx:
enabled: true
name: nginx
replicaCount: 1
uid: 104
gid: 107
image:
repository: "docker.bintray.io/jfrog/nginx-artifactory-pro"
# Note that by default we use appVersion to get image tag
# version:
pullPolicy: IfNotPresent
service:
## For minikube, set this to NodePort, elsewhere use LoadBalancer
type: LoadBalancer
## For supporting whitelist on the Nginx LoadBalancer service
## Set this to a list of IP CIDR ranges
## Example: loadBalancerSourceRanges: ['10.10.10.5/32', '10.11.10.5/32']
## or pass from helm command line
## Example: helm install ... --set nginx.service.loadBalancerSourceRanges='{10.10.10.5/32,10.11.10.5/32}'
loadBalancerSourceRanges: []
## Provide static ip address
loadBalancerIP:
## There are two available options: “Cluster” (default) and “Local”.
externalTrafficPolicy: Cluster
externalPortHttp: 80
internalPortHttp: 80
externalPortHttps: 443
internalPortHttps: 443
internalPortReplicator: 6061
externalPortReplicator: 6061
## The following settings are to configure the frequency of the liveness and readiness probes
livenessProbe:
enabled: true
initialDelaySeconds: 100
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 1
## The SSL secret that will be used by the Nginx pod
# tlsSecretName: chart-example-tls
env:
ssl: true
# artUrl: "http://artifactory:8081/artifactory"
skipAutoConfigUpdate: false
## Custom ConfigMap for nginx.conf
customConfigMap:
## Custom ConfigMap for artifactory.conf
customArtifactoryConfigMap:
persistence:
mountPath: "/var/opt/jfrog/nginx"
enabled: false
## A manually managed Persistent Volume and Claim
## Requires persistence.enabled: true
## If defined, PVC must be created manually before volume will be bound
# existingClaim:
accessMode: ReadWriteOnce
size: 5Gi
## nginx data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
resources: {}
# requests:
# memory: "250Mi"
# cpu: "100m"
# limits:
# memory: "250Mi"
# cpu: "500m"
nodeSelector: {}
tolerations: []
affinity: {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment