added repo

This commit is contained in:
Your Name
2026-08-26 03:39:42 +05:30
parent 45c25a95af
commit b8575bb8b9
6889 changed files with 1217125 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
OWNERS
File diff suppressed because it is too large Load Diff
+6
View File
@@ -0,0 +1,6 @@
dependencies:
- name: postgresql
repository: https://charts.jfrog.io/
version: 10.3.18
digest: sha256:404ce007353baaf92a6c5f24b249d5b336c232e5fd2c29f8a0e4d0095a09fd53
generated: "2022-03-08T08:53:16.293311+05:30"
+24
View File
@@ -0,0 +1,24 @@
apiVersion: v2
appVersion: 7.71.5
dependencies:
- condition: postgresql.enabled
name: postgresql
repository: https://charts.jfrog.io/
version: 10.3.18
description: Universal Repository Manager supporting all major packaging formats,
build tools and CI servers.
home: https://www.jfrog.com/artifactory/
icon: https://raw.githubusercontent.com/jfrog/charts/master/stable/artifactory/logo/artifactory-logo.png
keywords:
- artifactory
- jfrog
- devops
kubeVersion: '>= 1.14.0-0'
maintainers:
- email: installers@jfrog.com
name: Chart Maintainers at JFrog
name: artifactory
sources:
- https://github.com/jfrog/charts
type: application
version: 107.71.5
+201
View File
@@ -0,0 +1,201 @@
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.
+52
View File
@@ -0,0 +1,52 @@
# JFrog Artifactory Helm Chart
**IMPORTANT!** Our Helm Chart docs have moved to our main documentation site. Below you will find the basic instructions for installing, uninstalling, and deleting Artifactory. For all other information, refer to [Installing Artifactory](https://www.jfrog.com/confluence/display/JFROG/Installing+Artifactory#InstallingArtifactory-HelmInstallation).
## Prerequisites
* Kubernetes 1.14+
* Artifactory Pro trial license [get one from here](https://www.jfrog.com/artifactory/free-trial/)
## Chart Details
This chart will do the following:
* Deploy Artifactory-Pro/Artifactory-Edge (or OSS/CE if custom image is set)
* Deploy a PostgreSQL database using the stable/postgresql chart (can be changed) **NOTE:** For production grade installations it is recommended to use an external PostgreSQL.
* Deploy an optional Nginx server
* Optionally expose Artifactory with Ingress [Ingress documentation](https://kubernetes.io/docs/concepts/services-networking/ingress/)
## 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
helm repo update
```
### Install Chart
To install the chart with the release name `artifactory`:
```bash
helm upgrade --install artifactory --namespace artifactory jfrog/artifactory
```
## Uninstalling Artifactory
Uninstall is supported only on Helm v3 and on.
Uninstall Artifactory using the following command.
```bash
helm uninstall artifactory && sleep 90 && kubectl delete pvc -l app=artifactory
```
## Deleting Artifactory
**IMPORTANT:** Deleting Artifactory will also delete your data volumes and you will lose all of your data. You must back up all this information before deletion. You do not need to uninstall Artifactory before deleting it.
To delete Artifactory use the following command.
```bash
helm delete artifactory --namespace artifactory
```
@@ -0,0 +1,24 @@
databaseUpgradeReady: true
# To Fix ct tool --reuse-values - PASSWORDS ERROR: you must provide your current passwords when upgrade the release
postgresql:
postgresqlPassword: password
persistence:
enabled: false
artifactory:
persistence:
enabled: false
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "4g"
access:
accessConfig:
security:
tls: true
resetAccessCAKeys: true
@@ -0,0 +1,21 @@
# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml.
databaseUpgradeReady: true
# To Fix ct tool --reuse-values - PASSWORDS ERROR: you must provide your current passwords when upgrade the release
postgresql:
postgresqlPassword: password
persistence:
enabled: false
artifactory:
persistence:
enabled: false
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "4g"
@@ -0,0 +1,18 @@
databaseUpgradeReady: true
postgresql:
enabled: false
artifactory:
fsGroupChangePolicy: "OnRootMismatch"
persistence:
enabled: false
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "4g"
+247
View File
@@ -0,0 +1,247 @@
databaseUpgradeReady: true
# To Fix ct tool --reuse-values - PASSWORDS ERROR: you must provide your current passwords when upgrade the release
postgresql:
postgresqlPassword: password
persistence:
enabled: false
artifactory:
persistence:
enabled: false
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "4g"
customInitContainersBegin: |
- name: "custom-init-begin-local"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
command:
- 'sh'
- '-c'
- echo "running in local"
volumeMounts:
- mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
name: artifactory-volume
customInitContainers: |
- name: "custom-init-local"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
command:
- 'sh'
- '-c'
- echo "running in local"
volumeMounts:
- mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
name: artifactory-volume
# Add custom volumes
customVolumes: |
- name: custom-script-local
emptyDir:
sizeLimit: 100Mi
# Add custom volumesMounts
customVolumeMounts: |
- name: custom-script-local
mountPath: "/scriptslocal"
# Add custom sidecar containers
customSidecarContainers: |
- name: "sidecar-list-local"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- NET_RAW
command: ["sh","-c","echo 'Sidecar is running in local' >> /scriptslocal/sidecarlocal.txt; cat /scriptslocal/sidecarlocal.txt; while true; do sleep 30; done"]
volumeMounts:
- mountPath: "/scriptslocal"
name: custom-script-local
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
global:
masterKey: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
joinKey: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
customInitContainersBegin: |
- name: "custom-init-begin-global"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
command:
- 'sh'
- '-c'
- echo "running in global"
volumeMounts:
- mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
name: artifactory-volume
customInitContainers: |
- name: "custom-init-global"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
command:
- 'sh'
- '-c'
- echo "running in global"
volumeMounts:
- mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
name: artifactory-volume
# Add custom volumes
customVolumes: |
- name: custom-script-global
emptyDir:
sizeLimit: 100Mi
# Add custom volumesMounts
customVolumeMounts: |
- name: custom-script-global
mountPath: "/scripts"
# Add custom sidecar containers
customSidecarContainers: |
- name: "sidecar-list-global"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- NET_RAW
command: ["sh","-c","echo 'Sidecar is running in global' >> /scripts/sidecarglobal.txt; cat /scripts/sidecarglobal.txt; while true; do sleep 30; done"]
volumeMounts:
- mountPath: "/scripts"
name: custom-script-global
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
nginx:
customInitContainers: |
- name: "custom-init-begin-nginx"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
command:
- 'sh'
- '-c'
- echo "running in nginx"
volumeMounts:
- mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
name: custom-script-local
customSidecarContainers: |
- name: "sidecar-list-nginx"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- NET_RAW
command: ["sh","-c","echo 'Sidecar is running in local' >> /scriptslocal/sidecarlocal.txt; cat /scriptslocal/sidecarlocal.txt; while true; do sleep 30; done"]
volumeMounts:
- mountPath: "/scriptslocal"
name: custom-script-local
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
# Add custom volumes
customVolumes: |
- name: custom-script-local
emptyDir:
sizeLimit: 100Mi
artifactoryConf: |
{{- if .Values.nginx.https.enabled }}
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_certificate {{ .Values.nginx.persistence.mountPath }}/ssl/tls.crt;
ssl_certificate_key {{ .Values.nginx.persistence.mountPath }}/ssl/tls.key;
ssl_session_cache shared:SSL:1m;
ssl_prefer_server_ciphers on;
{{- end }}
## server configuration
server {
listen 8088;
{{- if .Values.nginx.internalPortHttps }}
listen {{ .Values.nginx.internalPortHttps }} ssl;
{{- else -}}
{{- if .Values.nginx.https.enabled }}
listen {{ .Values.nginx.https.internalPort }} ssl;
{{- end }}
{{- end }}
{{- if .Values.nginx.internalPortHttp }}
listen {{ .Values.nginx.internalPortHttp }};
{{- else -}}
{{- if .Values.nginx.http.enabled }}
listen {{ .Values.nginx.http.internalPort }};
{{- end }}
{{- end }}
server_name ~(?<repo>.+)\.{{ include "artifactory.fullname" . }} {{ include "artifactory.fullname" . }}
{{- range .Values.ingress.hosts -}}
{{- if contains "." . -}}
{{ "" | indent 0 }} ~(?<repo>.+)\.{{ . }}
{{- end -}}
{{- end -}};
if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;
}
## Application specific logs
## access_log /var/log/nginx/artifactory-access.log timing;
## error_log /var/log/nginx/artifactory-error.log;
rewrite ^/artifactory/?$ / redirect;
if ( $repo != "" ) {
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/$repo/$1/$2 break;
}
chunked_transfer_encoding on;
client_max_body_size 0;
location / {
proxy_read_timeout 900;
proxy_pass_header Server;
proxy_cookie_path ~*^/.* /;
proxy_pass {{ include "artifactory.scheme" . }}://{{ include "artifactory.fullname" . }}:{{ .Values.artifactory.externalPort }}/;
{{- if .Values.nginx.service.ssloffload}}
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host;
{{- else }}
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
proxy_set_header X-Forwarded-Port $server_port;
{{- end }}
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;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
location /artifactory/ {
if ( $request_uri ~ ^/artifactory/(.*)$ ) {
proxy_pass {{ include "artifactory.scheme" . }}://{{ include "artifactory.fullname" . }}:{{ .Values.artifactory.externalArtifactoryPort }}/artifactory/$1;
}
proxy_pass {{ include "artifactory.scheme" . }}://{{ include "artifactory.fullname" . }}:{{ .Values.artifactory.externalArtifactoryPort }}/artifactory/;
}
}
}
## A list of custom ports to expose on the NGINX pod. Follows the conventional Kubernetes yaml syntax for container ports.
customPorts:
- containerPort: 8088
name: http2
service:
## A list of custom ports to expose through the Ingress controller service. Follows the conventional Kubernetes yaml syntax for service ports.
customPorts:
- port: 8088
targetPort: 8088
protocol: TCP
name: http2
+90
View File
@@ -0,0 +1,90 @@
# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml.
databaseUpgradeReady: true
# To Fix ct tool --reuse-values - PASSWORDS ERROR: you must provide your current passwords when upgrade the release
postgresql:
postgresqlPassword: password
persistence:
enabled: false
artifactory:
persistence:
enabled: false
database:
maxOpenConnections: 150
tomcat:
connector:
maxThreads: 300
resources:
requests:
memory: "6Gi"
cpu: "2"
limits:
memory: "10Gi"
cpu: "8"
javaOpts:
xms: "8g"
xmx: "10g"
access:
database:
maxOpenConnections: 150
tomcat:
connector:
maxThreads: 100
router:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
frontend:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
metadata:
database:
maxOpenConnections: 150
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
event:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
jfconnect:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
integration:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
observability:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
@@ -0,0 +1,90 @@
# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml.
databaseUpgradeReady: true
# To Fix ct tool --reuse-values - PASSWORDS ERROR: you must provide your current passwords when upgrade the release
postgresql:
postgresqlPassword: password
persistence:
enabled: false
artifactory:
persistence:
enabled: false
database:
maxOpenConnections: 100
tomcat:
connector:
maxThreads: 200
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "8Gi"
cpu: "6"
javaOpts:
xms: "6g"
xmx: "8g"
access:
database:
maxOpenConnections: 100
tomcat:
connector:
maxThreads: 50
router:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
frontend:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
metadata:
database:
maxOpenConnections: 100
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
event:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
jfconnect:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
integration:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
observability:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
@@ -0,0 +1,21 @@
databaseUpgradeReady: true
# To Fix ct tool --reuse-values - PASSWORDS ERROR: you must provide your current passwords when upgrade the release
postgresql:
postgresqlPassword: password
persistence:
enabled: false
artifactory:
migration:
enabled: false
persistence:
enabled: false
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "4g"
@@ -0,0 +1,42 @@
# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml.
databaseUpgradeReady: true
# To Fix ct tool --reuse-values - PASSWORDS ERROR: you must provide your current passwords when upgrade the release
postgresql:
postgresqlPassword: password
persistence:
enabled: false
artifactory:
persistence:
enabled: false
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "4g"
nginx:
customVolumes: |
- name: scripts
configMap:
name: {{ template "artifactory.fullname" . }}-nginx-scripts
defaultMode: 0550
customVolumeMounts: |
- name: scripts
mountPath: /var/opt/jfrog/nginx/scripts/
customCommand:
- /bin/sh
- -c
- |
# watch for configmap changes
/sbin/inotifyd /var/opt/jfrog/nginx/scripts/configreloader.sh {{ .Values.nginx.persistence.mountPath -}}/conf.d:n &
{{ if .Values.nginx.https.enabled -}}
# watch for tls secret changes
/sbin/inotifyd /var/opt/jfrog/nginx/scripts/configreloader.sh {{ .Values.nginx.persistence.mountPath -}}/ssl:n &
{{ end -}}
nginx -g 'daemon off;'
@@ -0,0 +1,113 @@
databaseUpgradeReady: true
artifactory:
joinKey: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
masterKey: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
persistence:
enabled: false
replicator:
enabled: true
ingress:
name:
hosts: []
className: "testclass1"
trackerIngress:
enabled: true
className: "testclass2"
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "4g"
access:
accessConfig:
security:
tls: true
resetAccessCAKeys: true
postgresql:
postgresqlPassword: password
postgresqlExtendedConf:
maxConnections: 102
persistence:
enabled: false
rbac:
create: true
serviceAccount:
create: true
automountServiceAccountToken: true
ingress:
enabled: true
className: "testclass"
hosts:
- demonow.xyz
nginx:
enabled: false
jfconnect:
enabled: true
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
mc:
enabled: true
splitServicesToContainers: true
router:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
frontend:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
metadata:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
event:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
integration:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
observability:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
+184
View File
@@ -0,0 +1,184 @@
databaseUpgradeReady: true
artifactory:
replicaCount: 1
joinKey: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
masterKey: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
persistence:
enabled: false
replicator:
enabled: true
ingress:
name:
hosts: []
className: "testclass1"
trackerIngress:
enabled: true
className: "testclass2"
# Add lifecycle hooks for replicator container
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the replicator postStart handler >> /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo Hello from the replicator postStart handler >> /tmp/message"]
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "4g"
# Add lifecycle hooks for artifactory container
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the artifactory postStart handler >> /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo Hello from the artifactory postStart handler >> /tmp/message"]
postgresql:
postgresqlPassword: password
postgresqlExtendedConf:
maxConnections: 100
persistence:
enabled: false
rbac:
create: true
serviceAccount:
create: true
automountServiceAccountToken: true
ingress:
enabled: true
className: "testclass"
hosts:
- demonow.xyz
nginx:
enabled: false
jfconnect:
enabled: true
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
# Add lifecycle hooks for jfconect container
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the jfconnect postStart handler >> /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo Hello from the jfconnect postStart handler >> /tmp/message"]
mc:
enabled: true
splitServicesToContainers: true
router:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
# Add lifecycle hooks for router container
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the router postStart handler >> /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo Hello from the router postStart handler >> /tmp/message"]
frontend:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
# Add lifecycle hooks for frontend container
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the frontend postStart handler >> /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo Hello from the frontend postStart handler >> /tmp/message"]
metadata:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the metadata postStart handler >> /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo Hello from the metadata postStart handler >> /tmp/message"]
event:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the event postStart handler >> /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo Hello from the event postStart handler >> /tmp/message"]
integration:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the integration postStart handler >> /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo Hello from the integration postStart handler >> /tmp/message"]
observability:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the observability postStart handler >> /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo Hello from the observability postStart handler >> /tmp/message"]
+90
View File
@@ -0,0 +1,90 @@
# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml.
databaseUpgradeReady: true
# To Fix ct tool --reuse-values - PASSWORDS ERROR: you must provide your current passwords when upgrade the release
postgresql:
postgresqlPassword: password
persistence:
enabled: false
artifactory:
persistence:
enabled: false
database:
maxOpenConnections: 80
tomcat:
connector:
maxThreads: 200
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "6g"
access:
database:
maxOpenConnections: 80
tomcat:
connector:
maxThreads: 50
router:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
frontend:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
metadata:
database:
maxOpenConnections: 80
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
event:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
jfconnect:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
integration:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
observability:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
+94
View File
@@ -0,0 +1,94 @@
databaseUpgradeReady: true
artifactory:
replicaCount: 3
joinKey: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
masterKey: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
unifiedSecretInstallation: false
openMetrics:
enabled: true
persistence:
enabled: false
replicator:
name: replicator
enabled: true
ingress:
name:
hosts: []
className: "testclass1"
trackerIngress:
enabled: true
className: "testclass2"
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "4g"
statefulset:
annotations:
artifactory: test
postgresql:
postgresqlPassword: password
postgresqlExtendedConf:
maxConnections: 100
persistence:
enabled: false
rbac:
create: true
serviceAccount:
create: true
automountServiceAccountToken: true
ingress:
enabled: true
className: "testclass"
hosts:
- demonow.xyz
nginx:
enabled: false
jfconnect:
enabled: false
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 3
targetCPUUtilizationPercentage: 70
## filebeat sidecar
filebeat:
enabled: true
filebeatYml: |
logging.level: info
path.data: {{ .Values.artifactory.persistence.mountPath }}/log/filebeat
name: artifactory-filebeat
queue.spool:
file:
permissions: 0760
filebeat.inputs:
- type: log
enabled: true
close_eof: ${CLOSE:false}
paths:
- {{ .Values.artifactory.persistence.mountPath }}/log/*.log
fields:
service: "jfrt"
log_type: "artifactory"
output.file:
path: "/tmp/filebeat"
filename: filebeat
readinessProbe:
exec:
command:
- sh
- -c
- |
#!/usr/bin/env bash -e
curl --fail 127.0.0.1:5066
+360
View File
@@ -0,0 +1,360 @@
{{- if eq .Values.artifactory.persistence.type "nfs" -}}
<config version="2">
{{- if (.Values.artifactory.persistence.maxCacheSize) }}
<chain> <!--template="file-system"-->
<provider id="cache-fs" type="cache-fs">
<provider id="file-system" type="file-system"/>
</provider>
</chain>
{{- else }}
<chain> <!--template="file-system"-->
<provider id="file-system" type="file-system"/>
</chain>
{{- end }}
{{- if .Values.artifactory.persistence.maxCacheSize }}
<provider id="cache-fs" type="cache-fs">
<maxCacheSize>{{ .Values.artifactory.persistence.maxCacheSize | int64 }}</maxCacheSize>
<cacheProviderDir>{{ .Values.artifactory.persistence.cacheProviderDir }}</cacheProviderDir>
</provider>
{{- end }}
<provider id="file-system" type="file-system">
<fileStoreDir>{{ .Values.artifactory.persistence.nfs.dataDir }}/filestore</fileStoreDir>
</provider>
</config>
{{- end }}
{{- if eq .Values.artifactory.persistence.type "file-system" -}}
<!-- File system filestore -->
<config version="v1">
<chain> <!--template="file-system"-->
{{- if .Values.artifactory.persistence.fileSystem.cache.enabled }}
<provider id="cache-fs" type="cache-fs">
{{- end }}
<provider id="file-system" type="file-system"/>
{{- if .Values.artifactory.persistence.fileSystem.cache.enabled }}
</provider>
{{- end }}
</chain>
{{- if .Values.artifactory.persistence.fileSystem.cache.enabled }}
<provider id="cache-fs" type="cache-fs">
<maxCacheSize>{{ .Values.artifactory.persistence.maxCacheSize | int64 }}</maxCacheSize>
<cacheProviderDir>{{ .Values.artifactory.persistence.cacheProviderDir }}</cacheProviderDir>
</provider>
{{- end }}
</config>
{{- end }}
{{- if eq .Values.artifactory.persistence.type "cluster-file-system" -}}
<!-- Cluster File system filestore -->
<config version="2">
<chain> <!--template="cluster-file-system"-->
<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>{{ .Values.artifactory.persistence.lenientLimit }}</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>
<provider id="cache-fs" type="cache-fs">
<maxCacheSize>{{ .Values.artifactory.persistence.maxCacheSize | int64 }}</maxCacheSize>
<cacheProviderDir>{{ .Values.artifactory.persistence.cacheProviderDir }}</cacheProviderDir>
</provider>
<!-- 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 or (eq .Values.artifactory.persistence.type "google-storage") (eq .Values.artifactory.persistence.type "google-storage-v2") (eq .Values.artifactory.persistence.type "cluster-google-storage-v2") (eq .Values.artifactory.persistence.type "google-storage-v2-direct") }}
<!-- Google storage -->
<config version="2">
{{- if or (eq .Values.artifactory.persistence.type "google-storage") (eq .Values.artifactory.persistence.type "google-storage-v2") }}
<chain> <!--template="google-storage-v2"-->
<provider id="cache-fs" type="cache-fs">
<provider id="eventual" type="eventual">
<provider id="retry" type="retry">
<provider id="google-storage-v2" type="google-storage-v2"/>
</provider>
</provider>
</provider>
</chain>
{{- else if eq .Values.artifactory.persistence.type "cluster-google-storage-v2" }}
<chain> <!--template="cluster-google-storage-v2"-->
<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>{{ .Values.artifactory.persistence.lenientLimit }}</lenientLimit>
<minSpareUploaderExecutor>2</minSpareUploaderExecutor>
<sub-provider id="eventual-cluster" type="eventual-cluster">
<provider id="retry" type="retry">
<provider id="google-storage-v2" type="google-storage-v2"/>
</provider>
</sub-provider>
<dynamic-provider id="remote" type="remote"/>
<property name="zones" value="local,remote"/>
</provider>
</provider>
</chain>
{{- else if eq .Values.artifactory.persistence.type "google-storage-v2-direct" }}
<chain> <!--template="google-storage-v2-direct"-->
<provider id="cache-fs" type="cache-fs">
<provider id="google-storage-v2" type="google-storage-v2"/>
</provider>
</chain>
{{- end }}
<!-- Set max cache-fs size -->
<provider id="cache-fs" type="cache-fs">
<maxCacheSize>{{ .Values.artifactory.persistence.maxCacheSize | int64 }}</maxCacheSize>
<cacheProviderDir>{{ .Values.artifactory.persistence.cacheProviderDir }}</cacheProviderDir>
</provider>
{{- if eq .Values.artifactory.persistence.type "cluster-google-storage-v2" }}
<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>
{{- end }}
<provider id="google-storage-v2" type="google-storage-v2">
{{- if .Values.artifactory.persistence.googleStorage.useInstanceCredentials }}
<useInstanceCredentials>true</useInstanceCredentials>
{{- else }}
<useInstanceCredentials>false</useInstanceCredentials>
{{- end }}
<enableSignedUrlRedirect>{{ .Values.artifactory.persistence.googleStorage.enableSignedUrlRedirect }}</enableSignedUrlRedirect>
<providerId>google-cloud-storage</providerId>
<endpoint>{{ .Values.artifactory.persistence.googleStorage.endpoint }}</endpoint>
<httpsOnly>{{ .Values.artifactory.persistence.googleStorage.httpsOnly }}</httpsOnly>
<bucketName>{{ .Values.artifactory.persistence.googleStorage.bucketName }}</bucketName>
<path>{{ .Values.artifactory.persistence.googleStorage.path }}</path>
<bucketExists>{{ .Values.artifactory.persistence.googleStorage.bucketExists }}</bucketExists>
</provider>
</config>
{{- end }}
{{- if or (eq .Values.artifactory.persistence.type "aws-s3-v3") (eq .Values.artifactory.persistence.type "s3-storage-v3-direct") (eq .Values.artifactory.persistence.type "cluster-s3-storage-v3") (eq .Values.artifactory.persistence.type "s3-storage-v3-archive") }}
<!-- AWS S3 V3 -->
<config version="2">
{{- if eq .Values.artifactory.persistence.type "aws-s3-v3" }}
<chain> <!--template="s3-storage-v3"-->
<provider id="cache-fs" type="cache-fs">
<provider id="eventual" type="eventual">
<provider id="retry" type="retry">
<provider id="s3-storage-v3" type="s3-storage-v3"/>
</provider>
</provider>
</provider>
</chain>
{{- else if eq .Values.artifactory.persistence.type "s3-storage-v3-direct" }}
<chain> <!--template="s3-storage-v3-direct"-->
<provider id="cache-fs" type="cache-fs">
<provider id="s3-storage-v3" type="s3-storage-v3"/>
</provider>
</chain>
{{- else if eq .Values.artifactory.persistence.type "cluster-s3-storage-v3" }}
<chain> <!--template="cluster-s3-storage-v3"-->
<provider id="cache-fs" type="cache-fs">
<provider id="sharding-cluster-eventual-s3" type="sharding-cluster">
<sub-provider id="eventual-cluster-s3" type="eventual-cluster">
<provider id="retry-s3" type="retry">
<provider id="s3-storage-v3" type="s3-storage-v3"/>
</provider>
</sub-provider>
<dynamic-provider id="remote-s3" type="remote"/>
</provider>
</provider>
</chain>
{{- else if eq .Values.artifactory.persistence.type "s3-storage-v3-archive" }}
<!-- s3-storage-v3 default chain based on AWS S3 client for archive purposes-->
<chain> <!--template="s3-storage-v3-archive"-->
<provider id="s3-storage-v3-archive" type="s3-storage-v3-archive">
<provider id="s3-storage-v3" type="s3-storage-v3"/>
</provider>
</chain>
{{- end }}
{{- if or (eq .Values.artifactory.persistence.type "aws-s3-v3") (eq .Values.artifactory.persistence.type "s3-storage-v3-direct") (eq .Values.artifactory.persistence.type "cluster-s3-storage-v3") }}
<!-- Set max cache-fs size -->
<provider id="cache-fs" type="cache-fs">
<maxCacheSize>{{ .Values.artifactory.persistence.maxCacheSize | int64}}</maxCacheSize>
<cacheProviderDir>{{ .Values.artifactory.persistence.cacheProviderDir }}</cacheProviderDir>
</provider>
{{- end }}
{{- if eq .Values.artifactory.persistence.type "cluster-s3-storage-v3" }}
<provider id="sharding-cluster-eventual-s3" type="sharding-cluster">
<readBehavior>crossNetworkStrategy</readBehavior>
<writeBehavior>crossNetworkStrategy</writeBehavior>
<redundancy>{{ .Values.artifactory.persistence.redundancy }}</redundancy>
<lenientLimit>{{ .Values.artifactory.persistence.lenientLimit }}</lenientLimit>
<property name="zones" value="local,remote"/>
</provider>
<provider id="remote-s3" type="remote">
<zone>remote</zone>
</provider>
<provider id="eventual-cluster-s3" type="eventual-cluster">
<zone>local</zone>
</provider>
{{- end }}
{{- with .Values.artifactory.persistence.awsS3V3 }}
<provider id="s3-storage-v3" type="s3-storage-v3">
<testConnection>{{ .testConnection }}</testConnection>
{{- if .identity }}
<identity>{{ .identity }}</identity>
{{- end }}
{{- if .credential }}
<credential>{{ .credential }}</credential>
{{- end }}
<region>{{ .region }}</region>
<bucketName>{{ .bucketName }}</bucketName>
<path>{{ .path }}</path>
<endpoint>{{ .endpoint }}</endpoint>
{{- with .port }}
<port>{{ . }}</port>
{{- end }}
{{- with .useHttp }}
<useHttp>{{ . }}</useHttp>
{{- end }}
{{- with .maxConnections }}
<maxConnections>{{ . }}</maxConnections>
{{- end }}
{{- with .kmsServerSideEncryptionKeyId }}
<kmsServerSideEncryptionKeyId>{{ . }}</kmsServerSideEncryptionKeyId>
{{- end }}
{{- with .kmsKeyRegion }}
<kmsKeyRegion>{{ . }}</kmsKeyRegion>
{{- end }}
{{- with .kmsCryptoMode }}
<kmsCryptoMode>{{ . }}</kmsCryptoMode>
{{- end }}
{{- if .useInstanceCredentials }}
<useInstanceCredentials>true</useInstanceCredentials>
{{- else }}
<useInstanceCredentials>false</useInstanceCredentials>
{{- end }}
<usePresigning>{{ .usePresigning }}</usePresigning>
<signatureExpirySeconds>{{ .signatureExpirySeconds }}</signatureExpirySeconds>
<signedUrlExpirySeconds>{{ .signedUrlExpirySeconds }}</signedUrlExpirySeconds>
{{- with .cloudFrontDomainName }}
<cloudFrontDomainName>{{ . }}</cloudFrontDomainName>
{{- end }}
{{- with .cloudFrontKeyPairId }}
<cloudFrontKeyPairId>{{ . }}</cloudFrontKeyPairId>
{{- end }}
{{- with .cloudFrontPrivateKey }}
<cloudFrontPrivateKey>{{ . }}</cloudFrontPrivateKey>
{{- end }}
{{- with .enableSignedUrlRedirect }}
<enableSignedUrlRedirect>{{ . }}</enableSignedUrlRedirect>
{{- end }}
{{- with .enablePathStyleAccess }}
<enablePathStyleAccess>{{ . }}</enablePathStyleAccess>
{{- end }}
{{- with .multiPartLimit }}
<multiPartLimit>{{ . | int64 }}</multiPartLimit>
{{- end }}
{{- with .multipartElementSize }}
<multipartElementSize>{{ . | int64 }}</multipartElementSize>
{{- end }}
</provider>
{{- end }}
</config>
{{- end }}
{{- if or (eq .Values.artifactory.persistence.type "azure-blob") (eq .Values.artifactory.persistence.type "azure-blob-storage-direct") (eq .Values.artifactory.persistence.type "cluster-azure-blob-storage") }}
<!-- Azure Blob Storage -->
<config version="2">
{{- if or (eq .Values.artifactory.persistence.type "azure-blob") }}
<chain> <!--template="azure-blob-storage"-->
<provider id="cache-fs" type="cache-fs">
<provider id="eventual" type="eventual">
<provider id="retry-azure-blob-storage" type="retry">
<provider id="azure-blob-storage" type="azure-blob-storage"/>
</provider>
</provider>
</provider>
</chain>
{{- else if eq .Values.artifactory.persistence.type "azure-blob-storage-direct" }}
<chain> <!--template="azure-blob-storage-direct"-->
<provider id="cache-fs" type="cache-fs">
<provider id="azure-blob-storage" type="azure-blob-storage"/>
</provider>
</chain>
{{- else if eq .Values.artifactory.persistence.type "cluster-azure-blob-storage" }}
<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>
{{- end }}
<!-- Set max cache-fs size -->
<provider id="cache-fs" type="cache-fs">
<maxCacheSize>{{ .Values.artifactory.persistence.maxCacheSize | int64 }}</maxCacheSize>
<cacheProviderDir>{{ .Values.artifactory.persistence.cacheProviderDir }}</cacheProviderDir>
</provider>
{{- if eq .Values.artifactory.persistence.type "cluster-azure-blob-storage" }}
<!-- cluster eventual Azure Blob Storage Service default chain -->
<provider id="sharding-cluster" type="sharding-cluster">
<readBehavior>crossNetworkStrategy</readBehavior>
<writeBehavior>crossNetworkStrategy</writeBehavior>
<redundancy>{{ .Values.artifactory.persistence.redundancy }}</redundancy>
<lenientLimit>{{ .Values.artifactory.persistence.lenientLimit }}</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>
{{- end }}
<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>
<multiPartLimit>{{ .Values.artifactory.persistence.azureBlob.multiPartLimit | int64 }}</multiPartLimit>
<multipartElementSize>{{ .Values.artifactory.persistence.azureBlob.multipartElementSize | int64 }}</multipartElementSize>
<testConnection>{{ .Values.artifactory.persistence.azureBlob.testConnection }}</testConnection>
</provider>
</config>
{{- end }}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,32 @@
migration:
product: ARTIFACTORY
oldDataDir: /var/opt/jfrog/artifactory
moveDirectories:
map:
# Note : $JF_ROOT_DATA_DIR will be prepended to the sourceDirectoryPath value only if relative path and $JF_ROOT_DATA_DIR/var will be prepended to the targetDirectoryPath value
# map should be in format example: targetDirectoryPath=sourceDirectoryPath
backup/access=access/backup
etc/access=access/etc
data/access=access/data
work/access=access/tmp
log/archived/access=access/logs
log/archived/artifactory=logs
etc/replicator=replicator/etc
backup/replicator=replicator/backup
data/replicator=replicator/data
log/archived/replicator=replicator/logs
linkFiles:
map:
# Note : $JF_ROOT_DATA_DIR will be prepended to the sourceDirectoryPath value only if relative path and $JF_ROOT_DATA_DIR will be prepended to the targetDirectoryPath value
# map should be in format example: targetDirectoryPath=sourceDirectoryPath
etc/artifactory=etc
backup/artifactory=backup
data/artifactory=data
support/artifactory=support
cleanUpOldDataDir:
# Note $JF_ROOT_DATA_DIR will be prepended to the map entry
map:
access
replicator
metadata
logs
@@ -0,0 +1,44 @@
#!/bin/bash
statusCheck(){
local retries=0
# Max Timeout in seconds default ~3600
local maxTimeOutInSeconds=$1
MaxRetries=$(( maxTimeOutInSeconds/10 ))
# Wait for DB to start
sleep 30
until [ "`curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8082/router/api/v1/system/health`" == "200" ];
do
echo Waiting for Artifactory to start --- sleeping for 10 seconds
if [[ ${retries} -eq ${MaxRetries} ]]
then
echo Failed to start.
exit 1
fi
retries=$(( retries+1 ))
sleep 10
done
sleep 20
echo "Artifactory started successfully...in Init Container"
echo "Stopping artifactory in Init Container..."
${scriptsPath}/artifactory.sh stop
echo "Exiting Init Container..."
}
scriptsPath="/opt/jfrog/artifactory/app/bin"
maxTimeOut=$2
bash ${scriptsPath}/migrate.sh $1
status=$?
if [[ ${status} -eq 1 && -f /tmp/error ]]; then
echo "Migration is not supported ...Exiting Init Container"
exit 1
elif [[ ${status} -eq 0 ]]; then
echo "Waiting for Artifactory to start in Init Container"
/entrypoint-artifactory.sh &
statusCheck ${maxTimeOut}
else
echo "Migration not necessary...Exiting Init Container"
exit 0
fi
Binary file not shown.
+92
View File
@@ -0,0 +1,92 @@
Congratulations. You have just deployed JFrog Artifactory!
{{- if .Values.artifactory.masterKey }}
{{- if and (not .Values.artifactory.masterKeySecretName) (eq .Values.artifactory.masterKey "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") }}
***************************************** WARNING ******************************************
* Your Artifactory master key is still set to the provided example: *
* artifactory.masterKey=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF *
* *
* You should change this to your own generated key: *
* $ export MASTER_KEY=$(openssl rand -hex 32) *
* $ echo ${MASTER_KEY} *
* *
* Pass the created master key to helm with '--set artifactory.masterKey=${MASTER_KEY}' *
* *
* Alternatively, you can use a pre-existing secret with a key called master-key with *
* '--set artifactory.masterKeySecretName=${SECRET_NAME}' *
********************************************************************************************
{{- end }}
{{- end }}
{{- if .Values.artifactory.joinKey }}
{{- if eq .Values.artifactory.joinKey "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE" }}
***************************************** WARNING ******************************************
* Your Artifactory join key is still set to the provided example: *
* artifactory.joinKey=EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE *
* *
* You should change this to your own generated key: *
* $ export JOIN_KEY=$(openssl rand -hex 32) *
* $ echo ${JOIN_KEY} *
* *
* Pass the created master key to helm with '--set artifactory.joinKey=${JOIN_KEY}' *
* *
********************************************************************************************
{{- end }}
{{- end }}
{{- if and (or (or (or (or (or ( or ( or ( or (or (or ( or (or .Values.artifactory.masterKeySecretName .Values.global.masterKeySecretName) .Values.systemYamlOverride.existingSecret) (or .Values.artifactory.customCertificates.enabled .Values.global.customCertificates.enabled)) .Values.aws.licenseConfigSecretName) .Values.artifactory.persistence.customBinarystoreXmlSecret) .Values.access.customCertificatesSecretName) .Values.systemYamlOverride.existingSecret) .Values.artifactory.license.secret) .Values.artifactory.userPluginSecrets) (and .Values.artifactory.admin.secret .Values.artifactory.admin.dataKey)) (and .Values.artifactory.persistence.googleStorage.gcpServiceAccount.enabled .Values.artifactory.persistence.googleStorage.gcpServiceAccount.customSecretName)) (or .Values.artifactory.joinKeySecretName .Values.global.joinKeySecretName)) .Values.artifactory.unifiedSecretInstallation }}
****************************************** WARNING **************************************************************************************************
* The unifiedSecretInstallation flag is currently enabled, which creates the unified secret. The existing secrets will continue as separate secrets.*
* Update the values.yaml with the existing secrets to add them to the unified secret. *
*****************************************************************************************************************************************************
{{- end }}
1. Get the Artifactory URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http://{{ . }}
{{- end }}
{{- else if contains "NodePort" .Values.nginx.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "artifactory.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 IP to be available.
You can watch the status of the service by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "artifactory.nginx.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "artifactory.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}")
echo http://127.0.0.1:{{ .Values.nginx.externalPortHttp }}
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ .Values.nginx.externalPortHttp }}:{{ .Values.nginx.internalPortHttp }}
{{- end }}
2. Open Artifactory in your browser
Default credential for Artifactory:
user: admin
password: password
{{ if .Values.artifactory.javaOpts.jmx.enabled }}
JMX configuration:
{{- if not (contains "LoadBalancer" .Values.artifactory.service.type) }}
If you want to access JMX from you computer with jconsole, you should set ".Values.artifactory.service.type=LoadBalancer" !!!
{{ end }}
1. Get the Artifactory service IP:
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "artifactory.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
2. Map the service name to the service IP in /etc/hosts:
sudo sh -c "echo \"${SERVICE_IP} {{ template "artifactory.fullname" . }}\" >> /etc/hosts"
3. Launch jconsole:
jconsole {{ template "artifactory.fullname" . }}:{{ .Values.artifactory.javaOpts.jmx.port }}
{{- end }}
+489
View File
@@ -0,0 +1,489 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "artifactory.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Expand the name nginx service.
*/}}
{{- define "artifactory.nginx.name" -}}
{{- default .Chart.Name .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).
*/}}
{{- define "artifactory.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 replicator 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.replicator.fullname" -}}
{{- if .Values.artifactory.replicator.ingress.name -}}
{{- .Values.artifactory.replicator.ingress.name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-replication" .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/*
Create a default fully qualified replicator tracker ingress 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.replicator.tracker.fullname" -}}
{{- if .Values.artifactory.replicator.trackerIngress.name -}}
{{- .Values.artifactory.replicator.trackerIngress.name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-replication-tracker" .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/*
Create a default fully qualified nginx name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "artifactory.nginx.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s-%s" .Release.Name $name .Values.nginx.name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "artifactory.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "artifactory.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.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Generate SSL certificates
*/}}
{{- define "artifactory.gen-certs" -}}
{{- $altNames := list ( printf "%s.%s" (include "artifactory.fullname" .) .Release.Namespace ) ( printf "%s.%s.svc" (include "artifactory.fullname" .) .Release.Namespace ) -}}
{{- $ca := genCA "artifactory-ca" 365 -}}
{{- $cert := genSignedCert ( include "artifactory.fullname" . ) nil $altNames 365 $ca -}}
tls.crt: {{ $cert.Cert | b64enc }}
tls.key: {{ $cert.Key | b64enc }}
{{- end -}}
{{/*
Scheme (http/https) based on Access or Router TLS enabled/disabled
*/}}
{{- define "artifactory.scheme" -}}
{{- if or .Values.access.accessConfig.security.tls .Values.router.tlsEnabled -}}
{{- printf "%s" "https" -}}
{{- else -}}
{{- printf "%s" "http" -}}
{{- end -}}
{{- end -}}
{{/*
Resolve joinKey value
*/}}
{{- define "artifactory.joinKey" -}}
{{- if .Values.global.joinKey -}}
{{- .Values.global.joinKey -}}
{{- else if .Values.artifactory.joinKey -}}
{{- .Values.artifactory.joinKey -}}
{{- end -}}
{{- end -}}
{{/*
Resolve jfConnectToken value
*/}}
{{- define "artifactory.jfConnectToken" -}}
{{- .Values.artifactory.jfConnectToken -}}
{{- end -}}
{{/*
Resolve masterKey value
*/}}
{{- define "artifactory.masterKey" -}}
{{- if .Values.global.masterKey -}}
{{- .Values.global.masterKey -}}
{{- else if .Values.artifactory.masterKey -}}
{{- .Values.artifactory.masterKey -}}
{{- end -}}
{{- end -}}
{{/*
Resolve joinKeySecretName value
*/}}
{{- define "artifactory.joinKeySecretName" -}}
{{- if .Values.global.joinKeySecretName -}}
{{- .Values.global.joinKeySecretName -}}
{{- else if .Values.artifactory.joinKeySecretName -}}
{{- .Values.artifactory.joinKeySecretName -}}
{{- else -}}
{{ include "artifactory.fullname" . }}
{{- end -}}
{{- end -}}
{{/*
Resolve jfConnectTokenSecretName value
*/}}
{{- define "artifactory.jfConnectTokenSecretName" -}}
{{- if .Values.artifactory.jfConnectTokenSecretName -}}
{{- .Values.artifactory.jfConnectTokenSecretName -}}
{{- else -}}
{{ include "artifactory.fullname" . }}
{{- end -}}
{{- end -}}
{{/*
Resolve masterKeySecretName value
*/}}
{{- define "artifactory.masterKeySecretName" -}}
{{- if .Values.global.masterKeySecretName -}}
{{- .Values.global.masterKeySecretName -}}
{{- else if .Values.artifactory.masterKeySecretName -}}
{{- .Values.artifactory.masterKeySecretName -}}
{{- else -}}
{{ include "artifactory.fullname" . }}
{{- end -}}
{{- end -}}
{{/*
Resolve imagePullSecrets value
*/}}
{{- define "artifactory.imagePullSecrets" -}}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- else if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- end -}}
{{/*
Resolve customInitContainersBegin value
*/}}
{{- define "artifactory.customInitContainersBegin" -}}
{{- if .Values.global.customInitContainersBegin -}}
{{- .Values.global.customInitContainersBegin -}}
{{- end -}}
{{- if .Values.artifactory.customInitContainersBegin -}}
{{- .Values.artifactory.customInitContainersBegin -}}
{{- end -}}
{{- end -}}
{{/*
Resolve customInitContainers value
*/}}
{{- define "artifactory.customInitContainers" -}}
{{- if .Values.global.customInitContainers -}}
{{- .Values.global.customInitContainers -}}
{{- end -}}
{{- if .Values.artifactory.customInitContainers -}}
{{- .Values.artifactory.customInitContainers -}}
{{- end -}}
{{- end -}}
{{/*
Resolve customVolumes value
*/}}
{{- define "artifactory.customVolumes" -}}
{{- if .Values.global.customVolumes -}}
{{- .Values.global.customVolumes -}}
{{- end -}}
{{- if .Values.artifactory.customVolumes -}}
{{- .Values.artifactory.customVolumes -}}
{{- end -}}
{{- end -}}
{{/*
Resolve customVolumeMounts value
*/}}
{{- define "artifactory.customVolumeMounts" -}}
{{- if .Values.global.customVolumeMounts -}}
{{- .Values.global.customVolumeMounts -}}
{{- end -}}
{{- if .Values.artifactory.customVolumeMounts -}}
{{- .Values.artifactory.customVolumeMounts -}}
{{- end -}}
{{- end -}}
{{/*
Resolve customSidecarContainers value
*/}}
{{- define "artifactory.customSidecarContainers" -}}
{{- if .Values.global.customSidecarContainers -}}
{{- .Values.global.customSidecarContainers -}}
{{- end -}}
{{- if .Values.artifactory.customSidecarContainers -}}
{{- .Values.artifactory.customSidecarContainers -}}
{{- end -}}
{{- end -}}
{{/*
Return the proper artifactory chart image names
*/}}
{{- define "artifactory.getImageInfoByValue" -}}
{{- $dot := index . 0 }}
{{- $indexReference := index . 1 }}
{{- $registryName := index $dot.Values $indexReference "image" "registry" -}}
{{- $repositoryName := index $dot.Values $indexReference "image" "repository" -}}
{{- $tag := default $dot.Chart.AppVersion (index $dot.Values $indexReference "image" "tag") | toString -}}
{{- if $dot.Values.global }}
{{- if and $dot.Values.splitServicesToContainers $dot.Values.global.versions.router (eq $indexReference "router") }}
{{- $tag = $dot.Values.global.versions.router | toString -}}
{{- end -}}
{{- if and $dot.Values.global.versions.artifactory (or (eq $indexReference "artifactory") (eq $indexReference "nginx") ) }}
{{- $tag = $dot.Values.global.versions.artifactory | toString -}}
{{- end -}}
{{- if $dot.Values.global.imageRegistry }}
{{- printf "%s/%s:%s" $dot.Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*
Return the proper artifactory app version
*/}}
{{- define "artifactory.app.version" -}}
{{- $image := split ":" ((include "artifactory.getImageInfoByValue" (list . "artifactory")) | toString) -}}
{{- $tag := $image._1 -}}
{{- printf "%s" $tag -}}
{{- end -}}
{{/*
Custom certificate copy command
*/}}
{{- define "artifactory.copyCustomCerts" -}}
echo "Copy custom certificates to {{ .Values.artifactory.persistence.mountPath }}/etc/security/keys/trusted";
mkdir -p {{ .Values.artifactory.persistence.mountPath }}/etc/security/keys/trusted;
for file in $(ls -1 /tmp/certs/* | grep -v .key | grep -v ":" | grep -v grep); do if [ -f "${file}" ]; then cp -v ${file} {{ .Values.artifactory.persistence.mountPath }}/etc/security/keys/trusted; fi done;
if [ -f {{ .Values.artifactory.persistence.mountPath }}/etc/security/keys/trusted/tls.crt ]; then mv -v {{ .Values.artifactory.persistence.mountPath }}/etc/security/keys/trusted/tls.crt {{ .Values.artifactory.persistence.mountPath }}/etc/security/keys/trusted/ca.crt; fi;
{{- end -}}
{{/*
Circle of trust certificates copy command
*/}}
{{- define "artifactory.copyCircleOfTrustCertsCerts" -}}
echo "Copy circle of trust certificates to {{ .Values.artifactory.persistence.mountPath }}/etc/access/keys/trusted";
mkdir -p {{ .Values.artifactory.persistence.mountPath }}/etc/access/keys/trusted;
for file in $(ls -1 /tmp/circleoftrustcerts/* | grep -v .key | grep -v ":" | grep -v grep); do if [ -f "${file}" ]; then cp -v ${file} {{ .Values.artifactory.persistence.mountPath }}/etc/access/keys/trusted; fi done;
{{- end -}}
{{/*
Resolve requiredServiceTypes value
*/}}
{{- define "artifactory.router.requiredServiceTypes" -}}
{{- $requiredTypes := "jfrt,jfac" -}}
{{- if not .Values.access.enabled -}}
{{- $requiredTypes = "jfrt" -}}
{{- end -}}
{{- if .Values.observability.enabled -}}
{{- $requiredTypes = printf "%s,%s" $requiredTypes "jfob" -}}
{{- end -}}
{{- if .Values.metadata.enabled -}}
{{- $requiredTypes = printf "%s,%s" $requiredTypes "jfmd" -}}
{{- end -}}
{{- if .Values.event.enabled -}}
{{- $requiredTypes = printf "%s,%s" $requiredTypes "jfevt" -}}
{{- end -}}
{{- if .Values.integration.enabled -}}
{{- $requiredTypes = printf "%s,%s" $requiredTypes "jfint" -}}
{{- end -}}
{{- if .Values.frontend.enabled -}}
{{- $requiredTypes = printf "%s,%s" $requiredTypes "jffe" -}}
{{- end -}}
{{- if .Values.jfconnect.enabled -}}
{{- $requiredTypes = printf "%s,%s" $requiredTypes "jfcon" -}}
{{- end -}}
{{- if .Values.artifactory.replicator.enabled -}}
{{- $requiredTypes = printf "%s,%s" $requiredTypes "jfxfer" -}}
{{- end -}}
{{- if .Values.mc.enabled -}}
{{- $requiredTypes = printf "%s,%s" $requiredTypes "jfmc" -}}
{{- end -}}
{{- $requiredTypes -}}
{{- end -}}
{{/*
Check if the image is artifactory pro or not
*/}}
{{- define "artifactory.isImageProType" -}}
{{- if not (regexMatch "^.*(oss|cpp-ce|jcr).*$" .Values.artifactory.image.repository) -}}
{{ true }}
{{- else -}}
{{ false }}
{{- end -}}
{{- end -}}
{{/*
Check if the artifactory is using derby database
*/}}
{{- define "artifactory.isUsingDerby" -}}
{{- if and (eq (default "derby" .Values.database.type) "derby") (not .Values.postgresql.enabled) -}}
{{ true }}
{{- else -}}
{{ false }}
{{- end -}}
{{- end -}}
{{/*
nginx scheme (http/https)
*/}}
{{- define "nginx.scheme" -}}
{{- if .Values.nginx.http.enabled -}}
{{- printf "%s" "http" -}}
{{- else -}}
{{- printf "%s" "https" -}}
{{- end -}}
{{- end -}}
{{/*
nginx command
*/}}
{{- define "nginx.command" -}}
{{- if .Values.nginx.customCommand }}
{{ toYaml .Values.nginx.customCommand }}
{{ else }}
- nginx
- -g
- 'daemon off;'
{{- end }}
{{- end -}}
{{/*
nginx port (80/443) based on http/https enabled
*/}}
{{- define "nginx.port" -}}
{{- if .Values.nginx.http.enabled -}}
{{- .Values.nginx.http.internalPort -}}
{{- else -}}
{{- .Values.nginx.https.internalPort -}}
{{- end -}}
{{- end -}}
{{/*
Resolve customInitContainers value
*/}}
{{- define "artifactory.nginx.customInitContainers" -}}
{{- if .Values.nginx.customInitContainers -}}
{{- .Values.nginx.customInitContainers -}}
{{- end -}}
{{- end -}}
{{/*
Resolve customVolumes value
*/}}
{{- define "artifactory.nginx.customVolumes" -}}
{{- if .Values.nginx.customVolumes -}}
{{- .Values.nginx.customVolumes -}}
{{- end -}}
{{- end -}}
{{/*
Resolve customVolumeMounts nginx value
*/}}
{{- define "artifactory.nginx.customVolumeMounts" -}}
{{- if .Values.nginx.customVolumeMounts -}}
{{- .Values.nginx.customVolumeMounts -}}
{{- end -}}
{{- end -}}
{{/*
Resolve customSidecarContainers value
*/}}
{{- define "artifactory.nginx.customSidecarContainers" -}}
{{- if .Values.nginx.customSidecarContainers -}}
{{- .Values.nginx.customSidecarContainers -}}
{{- end -}}
{{- end -}}
{{/*
Resolve Artifactory pod node selector value
*/}}
{{- define "artifactory.nodeSelector" -}}
nodeSelector:
{{- if .Values.global.nodeSelector }}
{{ toYaml .Values.global.nodeSelector | indent 2 }}
{{- else if .Values.artifactory.nodeSelector }}
{{ toYaml .Values.artifactory.nodeSelector | indent 2 }}
{{- end -}}
{{- end -}}
{{/*
Resolve Nginx pods node selector value
*/}}
{{- define "nginx.nodeSelector" -}}
nodeSelector:
{{- if .Values.global.nodeSelector }}
{{ toYaml .Values.global.nodeSelector | indent 2 }}
{{- else if .Values.nginx.nodeSelector }}
{{ toYaml .Values.nginx.nodeSelector | indent 2 }}
{{- end -}}
{{- end -}}
{{/*
Resolve unifiedCustomSecretVolumeName value
*/}}
{{- define "artifactory.unifiedCustomSecretVolumeName" -}}
{{- printf "%s-%s" (include "artifactory.name" .) ("unified-secret-volume") | trunc 63 -}}
{{- end -}}
{{/*
Check the Duplication of volume names for secrets. If unifiedSecretInstallation is enabled then the method is checking for volume names,
if the volume exists in customVolume then an extra volume with the same name will not be getting added in unifiedSecretInstallation case.
*/}}
{{- define "artifactory.checkDuplicateUnifiedCustomVolume" -}}
{{- if or .Values.global.customVolumes .Values.artifactory.customVolumes -}}
{{- $val := (tpl (include "artifactory.customVolumes" .) .) | toJson -}}
{{- contains (include "artifactory.unifiedCustomSecretVolumeName" .) $val | toString -}}
{{- else -}}
{{- printf "%s" "false" -}}
{{- end -}}
{{- end -}}
{{/*
Resolve fsGroup and runAsGroup on cluster based
*/}}
{{- define "artifactory.isOpenshiftCompatible" -}}
{{- if (.Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints") -}}
{{- printf "%s" "true" -}}
{{- else -}}
{{- printf "%s" "false" -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,3 @@
{{ if .Values.additionalResources }}
{{ tpl .Values.additionalResources . }}
{{- end -}}
@@ -0,0 +1,15 @@
{{- if not (and .Values.artifactory.admin.secret .Values.artifactory.admin.dataKey) }}
{{- if and .Values.artifactory.admin.password (not .Values.artifactory.unifiedSecretInstallation) }}
kind: Secret
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-bootstrap-creds
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
bootstrap.creds: {{ (printf "%s@%s=%s" .Values.artifactory.admin.username .Values.artifactory.admin.ip .Values.artifactory.admin.password) | b64enc }}
{{- end }}
{{- end }}
@@ -0,0 +1,15 @@
{{- if and .Values.access.accessConfig (not .Values.artifactory.unifiedSecretInstallation) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" . }}-access-config
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
type: Opaque
stringData:
access.config.patch.yml: |
{{ tpl (toYaml .Values.access.accessConfig) . | indent 4 }}
{{- end }}
@@ -0,0 +1,18 @@
{{- if and (not .Values.artifactory.persistence.customBinarystoreXmlSecret) (not .Values.artifactory.unifiedSecretInstallation) }}
kind: Secret
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-binarystore
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
stringData:
binarystore.xml: |-
{{- if .Values.artifactory.persistence.binarystoreXml }}
{{ tpl .Values.artifactory.persistence.binarystoreXml . | indent 4 }}
{{- else }}
{{ tpl ( .Files.Get "files/binarystore.xml" ) . | indent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,13 @@
{{ if .Values.artifactory.configMaps }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-configmaps
labels:
app: {{ template "artifactory.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
{{ tpl .Values.artifactory.configMaps . | indent 2 }}
{{ end -}}
@@ -0,0 +1,19 @@
{{- if and .Values.artifactory.customSecrets (not .Values.artifactory.unifiedSecretInstallation) }}
{{- range .Values.artifactory.customSecrets }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" $ }}-{{ .name }}
labels:
app: "{{ template "artifactory.name" $ }}"
chart: "{{ template "artifactory.chart" $ }}"
component: "{{ $.Values.artifactory.name }}"
heritage: {{ $.Release.Service | quote }}
release: {{ $.Release.Name | quote }}
type: Opaque
stringData:
{{ .key }}: |
{{ .data | indent 4 -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,24 @@
{{- if and (not .Values.database.secrets) (not .Values.postgresql.enabled) (not .Values.artifactory.unifiedSecretInstallation) }}
{{- if or .Values.database.url .Values.database.user .Values.database.password }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" . }}-database-creds
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
type: Opaque
data:
{{- with .Values.database.url }}
db-url: {{ tpl . $ | b64enc | quote }}
{{- end }}
{{- with .Values.database.user }}
db-user: {{ tpl . $ | b64enc | quote }}
{{- end }}
{{- with .Values.database.password }}
db-password: {{ tpl . $ | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,19 @@
{{- if .Values.externalSecret.enabled -}}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: {{ template "artifactory.fullname" . }}-secret
spec:
dataFrom:
- extract:
conversionStrategy: Default
key: {{ .Values.externalSecret.key }}
refreshInterval: 15s
secretStoreRef:
kind: ClusterSecretStore
name: {{ .Values.externalSecret.secretStoreRef.name }}
target:
creationPolicy: Owner
deletionPolicy: Retain
name: {{ template "artifactory.fullname" . }}-secret
{{- end -}}
@@ -0,0 +1,16 @@
{{- if not .Values.artifactory.persistence.googleStorage.gcpServiceAccount.customSecretName }}
{{- if and (.Values.artifactory.persistence.googleStorage.gcpServiceAccount.enabled) (not .Values.artifactory.unifiedSecretInstallation) }}
kind: Secret
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-gcpcreds
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
stringData:
gcp.credentials.json: |-
{{ tpl .Values.artifactory.persistence.googleStorage.gcpServiceAccount.config . | indent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,29 @@
{{- if .Values.autoscaling.enabled }}
{{- if semverCompare ">=v1.23.0-0" .Capabilities.KubeVersion.Version }}
apiVersion: autoscaling/v2
{{- else }}
apiVersion: autoscaling/v2beta2
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "artifactory.fullname" . }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: StatefulSet
name: {{ template "artifactory.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
@@ -0,0 +1,12 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-installer-info
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
installer-info.json: |
{{ tpl .Values.installerInfo . }}
@@ -0,0 +1,16 @@
{{ if (not .Values.artifactory.unifiedSecretInstallation) }}
{{- with .Values.artifactory.license.licenseKey }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" $ }}-license
labels:
app: {{ template "artifactory.name" $ }}
chart: {{ template "artifactory.chart" $ }}
heritage: {{ $.Release.Service }}
release: {{ $.Release.Name }}
type: Opaque
data:
artifactory.lic: {{ . | b64enc | quote }}
{{- end }}
{{- end }}
@@ -0,0 +1,18 @@
{{- if .Values.artifactory.migration.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-migration-scripts
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
migrate.sh: |
{{ .Files.Get "files/migrate.sh" | indent 4 }}
migrationHelmInfo.yaml: |
{{ .Files.Get "files/migrationHelmInfo.yaml" | indent 4 }}
migrationStatus.sh: |
{{ .Files.Get "files/migrationStatus.sh" | indent 4 }}
{{- end }}
@@ -0,0 +1,34 @@
{{- range .Values.networkpolicy }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ template "artifactory.fullname" $ }}-{{ .name }}-networkpolicy
labels:
app: {{ template "artifactory.name" $ }}
chart: {{ template "artifactory.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 -}}
@@ -0,0 +1,101 @@
{{- if eq .Values.artifactory.persistence.type "nfs" }}
### Artifactory HA data
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ template "artifactory.fullname" . }}-data-pv
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
id: {{ template "artifactory.name" . }}-data-pv
type: nfs-volume
spec:
{{- if .Values.artifactory.persistence.nfs.mountOptions }}
mountOptions:
{{ toYaml .Values.artifactory.persistence.nfs.mountOptions | indent 4 }}
{{- end }}
capacity:
storage: {{ .Values.artifactory.persistence.nfs.capacity }}
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
nfs:
server: {{ .Values.artifactory.persistence.nfs.ip }}
path: "{{ .Values.artifactory.persistence.nfs.haDataMount }}"
readOnly: false
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-data-pvc
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.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.name" . }}-data-pv
app: {{ template "artifactory.name" . }}
release: {{ .Release.Name }}
---
### Artifactory HA backup
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ template "artifactory.fullname" . }}-backup-pv
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
id: {{ template "artifactory.name" . }}-backup-pv
type: nfs-volume
spec:
{{- if .Values.artifactory.persistence.nfs.mountOptions }}
mountOptions:
{{ toYaml .Values.artifactory.persistence.nfs.mountOptions | indent 4 }}
{{- end }}
capacity:
storage: {{ .Values.artifactory.persistence.nfs.capacity }}
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
nfs:
server: {{ .Values.artifactory.persistence.nfs.ip }}
path: "{{ .Values.artifactory.persistence.nfs.haBackupMount }}"
readOnly: false
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-backup-pvc
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.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.name" . }}-backup-pv
app: {{ template "artifactory.name" . }}
release: {{ .Release.Name }}
{{- end }}
@@ -0,0 +1,24 @@
{{- if .Values.artifactory.minAvailable -}}
{{- if semverCompare "<v1.21.0-0" .Capabilities.KubeVersion.Version }}
apiVersion: policy/v1beta1
{{- else }}
apiVersion: policy/v1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "artifactory.fullname" . }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
component: {{ .Values.artifactory.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
selector:
matchLabels:
component: {{ .Values.artifactory.name }}
app: {{ template "artifactory.name" . }}
role: {{ template "artifactory.name" . }}
release: {{ .Release.Name }}
minAvailable: {{ .Values.artifactory.minAvailable }}
{{- end }}
@@ -0,0 +1,9 @@
{{- if .Values.artifactory.priorityClass.create }}
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: {{ default (include "artifactory.fullname" .) .Values.artifactory.priorityClass.name }}
value: {{ .Values.artifactory.priorityClass.value }}
globalDefault: false
description: "Artifactory priority class"
{{- end }}
@@ -0,0 +1,14 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
component: {{ .Values.artifactory.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "artifactory.fullname" . }}
rules:
{{ toYaml .Values.rbac.role.rules }}
{{- end }}
@@ -0,0 +1,19 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
component: {{ .Values.artifactory.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "artifactory.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "artifactory.serviceAccountName" . }}
roleRef:
kind: Role
apiGroup: rbac.authorization.k8s.io
name: {{ template "artifactory.fullname" . }}
{{- end }}
@@ -0,0 +1,28 @@
{{- if not .Values.artifactory.unifiedSecretInstallation }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" . }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
type: Opaque
data:
{{- if or .Values.artifactory.masterKey .Values.global.masterKey }}
{{- if not (or .Values.artifactory.masterKeySecretName .Values.global.masterKeySecretName) }}
master-key: {{ include "artifactory.masterKey" . | b64enc | quote }}
{{- end }}
{{- end }}
{{- if or .Values.artifactory.joinKey .Values.global.joinKey }}
{{- if not (or .Values.artifactory.joinKeySecretName .Values.global.joinKeySecretName) }}
join-key: {{ include "artifactory.joinKey" . | b64enc | quote }}
{{- end }}
{{- end }}
{{- if .Values.artifactory.jfConnectToken }}
{{- if not (.Values.artifactory.jfConnectTokenSecretName) }}
jfconnect-token: {{ include "artifactory.jfConnectToken" . | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,57 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "artifactory.fullname" . }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
component: {{ .Values.artifactory.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- with .Values.artifactory.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- if .Values.artifactory.service.annotations }}
annotations:
{{ toYaml .Values.artifactory.service.annotations | indent 4 }}
{{- end }}
spec:
type: {{ .Values.artifactory.service.type }}
{{- if .Values.artifactory.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.artifactory.service.loadBalancerSourceRanges | indent 4 }}
{{- end }}
ports:
- port: {{ .Values.artifactory.externalPort }}
targetPort: {{ .Values.artifactory.internalPort }}
{{- if .Values.artifactory.nodePort }}
nodePort: {{ .Values.artifactory.nodePort }}
{{- end }}
protocol: TCP
name: http-router
- port: {{ .Values.federation.internalPort }}
targetPort: {{ .Values.federation.internalPort }}
protocol: TCP
name: http-rtfs
- port: {{ .Values.artifactory.externalArtifactoryPort }}
targetPort: {{ .Values.artifactory.internalArtifactoryPort }}
protocol: TCP
name: http-artifactory
{{- if .Values.artifactory.ssh.enabled }}
- port: {{ .Values.artifactory.ssh.externalPort }}
targetPort: {{ .Values.artifactory.ssh.internalPort }}
protocol: TCP
name: tcp-ssh
{{- end }}
{{- with .Values.artifactory.javaOpts.jmx }}
{{- if .enabled }}
- port: {{ .port }}
targetPort: {{ .port }}
protocol: TCP
name: tcp-jmx
{{- end }}
{{- end }}
selector:
app: {{ template "artifactory.name" . }}
component: "{{ .Values.artifactory.name }}"
release: {{ .Release.Name }}
@@ -0,0 +1,17 @@
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
{{- with .Values.serviceAccount.annotations }}
annotations:
{{ tpl (toYaml .) $ | indent 4 }}
{{- end }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
component: {{ .Values.artifactory.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "artifactory.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,15 @@
{{- if and (not .Values.systemYamlOverride.existingSecret) (not .Values.artifactory.unifiedSecretInstallation) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" . }}-systemyaml
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
type: Opaque
stringData:
system.yaml: |
{{ tpl .Values.artifactory.systemYaml . | indent 4 }}
{{- end }}
@@ -0,0 +1,92 @@
{{- if .Values.artifactory.unifiedSecretInstallation }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.name" . }}-unified-secret
labels:
app: "{{ template "artifactory.name" $ }}"
chart: "{{ template "artifactory.chart" $ }}"
component: "{{ $.Values.artifactory.name }}"
heritage: {{ $.Release.Service | quote }}
release: {{ $.Release.Name | quote }}
type: Opaque
stringData:
{{- if .Values.access.accessConfig }}
access.config.patch.yml: |
{{ tpl (toYaml .Values.access.accessConfig) . | indent 4 }}
{{- end }}
{{- if and (not .Values.artifactory.persistence.customBinarystoreXmlSecret) }}
binarystore.xml: |-
{{- if .Values.artifactory.persistence.binarystoreXml }}
{{ tpl .Values.artifactory.persistence.binarystoreXml . | indent 4 }}
{{- else }}
{{ tpl ( .Files.Get "files/binarystore.xml" ) . | indent 4 }}
{{- end }}
{{- end }}
{{- if not .Values.systemYamlOverride.existingSecret }}
system.yaml: |
{{ tpl .Values.artifactory.systemYaml . | indent 4 }}
{{- end }}
{{- if and .Values.artifactory.customSecrets }}
{{- range .Values.artifactory.customSecrets }}
{{ .key }}: |
{{ .data | indent 4 -}}
{{- end }}
{{- end }}
{{- if not .Values.artifactory.persistence.googleStorage.gcpServiceAccount.customSecretName }}
{{- if .Values.artifactory.persistence.googleStorage.gcpServiceAccount.enabled }}
gcp.credentials.json: |-
{{ tpl .Values.artifactory.persistence.googleStorage.gcpServiceAccount.config . | indent 4 }}
{{- end }}
{{- end }}
data:
{{- if and (not .Values.database.secrets) (not .Values.postgresql.enabled) }}
{{- if or .Values.database.url .Values.database.user .Values.database.password }}
{{- with .Values.database.url }}
db-url: {{ tpl . $ | b64enc | quote }}
{{- end }}
{{- with .Values.database.user }}
db-user: {{ tpl . $ | b64enc | quote }}
{{- end }}
{{- with .Values.database.password }}
db-password: {{ tpl . $ | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- if not (and .Values.artifactory.admin.secret .Values.artifactory.admin.dataKey) }}
{{- if .Values.artifactory.admin.password }}
bootstrap.creds: {{ (printf "%s@%s=%s" .Values.artifactory.admin.username .Values.artifactory.admin.ip .Values.artifactory.admin.password) | b64enc }}
{{- end }}
{{- end }}
{{- with .Values.artifactory.license.licenseKey }}
artifactory.lic: {{ . | b64enc | quote }}
{{- end }}
{{- if or .Values.artifactory.masterKey .Values.global.masterKey }}
{{- if not (or .Values.artifactory.masterKeySecretName .Values.global.masterKeySecretName) }}
master-key: {{ include "artifactory.masterKey" . | b64enc | quote }}
{{- end }}
{{- end }}
{{- if or .Values.artifactory.joinKey .Values.global.joinKey }}
{{- if not (or .Values.artifactory.joinKeySecretName .Values.global.joinKeySecretName) }}
join-key: {{ include "artifactory.joinKey" . | b64enc | quote }}
{{- end }}
{{- end }}
{{- if .Values.artifactory.jfConnectToken }}
{{- if not (.Values.artifactory.jfConnectTokenSecretName) }}
jfconnect-token: {{ include "artifactory.jfConnectToken" . | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,15 @@
{{- if .Values.filebeat.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-filebeat-config
labels:
app: {{ template "artifactory.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
data:
filebeat.yml: |
{{ tpl .Values.filebeat.filebeatYml . | indent 4 }}
{{- end -}}
+260
View File
@@ -0,0 +1,260 @@
{{- if .Values.ingress.enabled -}}
{{- $serviceName := include "artifactory.fullname" . -}}
{{- $servicePort := .Values.artifactory.externalPort -}}
{{- $artifactoryServicePort := .Values.artifactory.externalArtifactoryPort -}}
{{- $ingressName := default ( include "artifactory.fullname" . ) .Values.ingress.name -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $ingressName }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.ingress.labels }}
{{ .Values.ingress.labels | toYaml | trimSuffix "\n"| indent 4 -}}
{{- end}}
{{- with .Values.artifactory.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- if .Values.ingress.annotations }}
annotations:
{{ .Values.ingress.annotations | toYaml | trimSuffix "\n" | indent 4 -}}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18.0-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.defaultBackend.enabled }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
defaultBackend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
{{- else }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
rules:
{{- if .Values.ingress.hosts }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host | quote }}
http:
paths:
- path: {{ $.Values.ingress.routerPath }}
pathType: ImplementationSpecific
backend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
- path: {{ $.Values.ingress.artifactoryPath }}
pathType: ImplementationSpecific
backend:
service:
name: {{ $serviceName }}
port:
number: {{ $artifactoryServicePort }}
{{- if and $.Values.federation.enabled (not (regexMatch "^.*(oss|cpp-ce|jcr).*$" $.Values.artifactory.image.repository)) }}
- path: {{ $.Values.ingress.rtfsPath }}
pathType: ImplementationSpecific
backend:
service:
name: {{ $serviceName }}
port:
number: {{ $.Values.federation.internalPort }}
{{- end }}
{{- end }}
{{- else }}
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host | quote }}
http:
paths:
- path: {{ $.Values.ingress.routerPath }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
- path: {{ $.Values.ingress.artifactoryPath }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $artifactoryServicePort }}
{{- end }}
{{- end }}
{{- end -}}
{{- with .Values.ingress.additionalRules }}
{{ tpl . $ | indent 2 }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- if and .Values.artifactory.replicator.enabled .Values.artifactory.replicator.ingress.enabled }}
---
{{- $replicatorIngressName := default ( include "artifactory.replicator.fullname" . ) .Values.artifactory.replicator.ingress.name -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $replicatorIngressName }}
labels:
app: "{{ template "artifactory.name" $ }}"
chart: "{{ template "artifactory.chart" $ }}"
release: {{ $.Release.Name | quote }}
heritage: {{ $.Release.Service | quote }}
{{- if .Values.artifactory.replicator.ingress.annotations }}
annotations:
{{ .Values.artifactory.replicator.ingress.annotations | toYaml | trimSuffix "\n" | indent 4 -}}
{{- end }}
spec:
{{- if and (or .Values.ingress.className .Values.artifactory.replicator.ingress.className) (semverCompare ">=1.18.0-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ default .Values.ingress.className .Values.artifactory.replicator.ingress.className }}
{{- end }}
{{- if .Values.ingress.defaultBackend.enabled }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
defaultBackend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
{{- else }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
rules:
{{- if .Values.artifactory.replicator.ingress.hosts }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- range $host := .Values.artifactory.replicator.ingress.hosts }}
- host: {{ $host | quote }}
http:
paths:
- path: /replicator/
pathType: ImplementationSpecific
backend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
- path: /artifactory/api/replication/replicate/file/streaming
pathType: ImplementationSpecific
backend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
{{- end }}
{{- else }}
{{- range $host := .Values.artifactory.replicator.ingress.hosts }}
- host: {{ $host | quote }}
http:
paths:
- path: /replicator/
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
- path: /artifactory/api/replication/replicate/file/streaming
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end -}}
{{- if .Values.artifactory.replicator.ingress.tls }}
tls:
{{ toYaml .Values.artifactory.replicator.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
{{- if and .Values.artifactory.replicator.enabled .Values.artifactory.replicator.trackerIngress.enabled }}
---
{{- $replicatorTrackerIngressName := default ( include "artifactory.replicator.tracker.fullname" . ) .Values.artifactory.replicator.trackerIngress.name -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $replicatorTrackerIngressName }}
labels:
app: "{{ template "artifactory.name" $ }}"
chart: "{{ template "artifactory.chart" $ }}"
release: {{ $.Release.Name | quote }}
heritage: {{ $.Release.Service | quote }}
{{- if .Values.artifactory.replicator.trackerIngress.annotations }}
annotations:
{{ .Values.artifactory.replicator.trackerIngress.annotations | toYaml | trimSuffix "\n" | indent 4 -}}
{{- end }}
spec:
{{- if and (or .Values.ingress.className .Values.artifactory.replicator.trackerIngress.className) (semverCompare ">=1.18.0-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ default .Values.ingress.className .Values.artifactory.replicator.trackerIngress.className }}
{{- end }}
{{- if .Values.ingress.defaultBackend.enabled }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
defaultBackend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
{{- else }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
rules:
{{- if .Values.artifactory.replicator.trackerIngress.hosts }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- range $host := .Values.artifactory.replicator.trackerIngress.hosts }}
- host: {{ $host | quote }}
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
{{- end }}
{{- else }}
{{- range $host := .Values.artifactory.replicator.trackerIngress.hosts }}
- host: {{ $host | quote }}
http:
paths:
- path: /
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end -}}
{{- if .Values.artifactory.replicator.trackerIngress.tls }}
tls:
{{ toYaml .Values.artifactory.replicator.trackerIngress.tls | indent 4 }}
{{- end -}}
{{- end -}}
{{- if .Values.customIngress }}
---
{{ .Values.customIngress | toYaml | trimSuffix "\n" }}
{{- end -}}
{{- end -}}
@@ -0,0 +1,63 @@
{{- if or .Values.artifactory.loggers .Values.artifactory.catalinaLoggers }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-logger
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.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
cd ${LOG_DIR}
LOG_PREFIX=$(echo ${LOG_NAME} | sed 's/.log$//g')
# Find the log to tail
LOG_FILE=$(ls -1t ./${LOG_PREFIX}.log 2>/dev/null)
# Wait for the log file
while [ -z "${LOG_FILE}" ]; do
sleep 1
LOG_FILE=$(ls -1t ./${LOG_PREFIX}.log 2>/dev/null)
done
echo "Log file ${LOG_FILE} is ready!"
# Get inode number
INODE_ID=$(ls -i ${LOG_FILE})
# echo "Tailing ${LOG_FILE}"
tail -F ${LOG_FILE} &
PID=$!
# Loop forever to see if a new log was created
while true; do
# Check inode number
NEW_INODE_ID=$(ls -i ${LOG_FILE})
# If inode number changed, this means log was rotated and need to start a new tail
if [ "${INODE_ID}" != "${NEW_INODE_ID}" ]; then
kill -9 ${PID} 2>/dev/null
INODE_ID="${NEW_INODE_ID}"
# Start a new tail
tail -F ${LOG_FILE} &
PID=$!
fi
sleep 1
done
{{- end }}
@@ -0,0 +1,14 @@
{{- if and (not .Values.nginx.customArtifactoryConfigMap) .Values.nginx.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-nginx-artifactory-conf
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
artifactory.conf: |
{{ tpl .Values.nginx.artifactoryConf . | indent 4 }}
{{- end }}
@@ -0,0 +1,14 @@
{{- if and (not .Values.nginx.tlsSecretName) .Values.nginx.enabled .Values.nginx.https.enabled }}
apiVersion: v1
kind: Secret
type: kubernetes.io/tls
metadata:
name: {{ template "artifactory.fullname" . }}-nginx-certificate
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
{{ ( include "artifactory.gen-certs" . ) | indent 2 }}
{{- end }}
@@ -0,0 +1,14 @@
{{- if and (not .Values.nginx.customConfigMap) .Values.nginx.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-nginx-conf
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
nginx.conf: |
{{ tpl .Values.nginx.mainConf . | indent 4 }}
{{- end }}
@@ -0,0 +1,216 @@
{{- if .Values.nginx.enabled -}}
{{- $serviceName := include "artifactory.fullname" . -}}
{{- $servicePort := .Values.artifactory.externalPort -}}
apiVersion: apps/v1
kind: {{ .Values.nginx.kind }}
metadata:
name: {{ template "artifactory.nginx.fullname" . }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: {{ .Values.nginx.name }}
{{- if .Values.nginx.labels }}
{{ toYaml .Values.nginx.labels | indent 4 }}
{{- end }}
{{- with .Values.nginx.deployment.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if eq .Values.nginx.kind "StatefulSet" }}
serviceName: {{ template "artifactory.nginx.fullname" . }}
{{- end }}
{{- if ne .Values.nginx.kind "DaemonSet" }}
replicas: {{ .Values.nginx.replicaCount }}
{{- end }}
selector:
matchLabels:
app: {{ template "artifactory.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.nginx.name }}
template:
metadata:
annotations:
checksum/nginx-conf: {{ include (print $.Template.BasePath "/nginx-conf.yaml") . | sha256sum }}
checksum/nginx-artifactory-conf: {{ include (print $.Template.BasePath "/nginx-artifactory-conf.yaml") . | sha256sum }}
{{- range $key, $value := .Values.nginx.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
component: {{ .Values.nginx.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
securityContext:
runAsUser: {{ .Values.nginx.uid }}
runAsGroup: {{ .Values.nginx.gid }}
serviceAccountName: {{ template "artifactory.serviceAccountName" . }}
terminationGracePeriodSeconds: {{ .Values.nginx.terminationGracePeriodSeconds }}
{{- if or .Values.imagePullSecrets .Values.global.imagePullSecrets }}
{{- include "artifactory.imagePullSecrets" . | indent 6 }}
{{- end }}
{{- if .Values.nginx.priorityClassName }}
priorityClassName: {{ .Values.nginx.priorityClassName | quote }}
{{- end }}
{{- if .Values.nginx.topologySpreadConstraints }}
topologySpreadConstraints:
{{ tpl (toYaml .Values.nginx.topologySpreadConstraints) . | indent 8 }}
{{- end }}
initContainers:
{{- if .Values.nginx.customInitContainers }}
{{ tpl (include "artifactory.nginx.customInitContainers" .) . | indent 6 }}
{{- end }}
- name: "setup"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 10 }}
{{- end }}
command:
- '/bin/sh'
- '-c'
- >
rm -rfv {{ .Values.nginx.persistence.mountPath }}/lost+found;
mkdir -p {{ .Values.nginx.persistence.mountPath }}/logs;
volumeMounts:
- mountPath: {{ .Values.nginx.persistence.mountPath | quote }}
name: nginx-volume
containers:
- name: {{ .Values.nginx.name }}
image: {{ include "artifactory.getImageInfoByValue" (list . "nginx") }}
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
{{- with .Values.nginx.securityContext }}
securityContext:
{{ toYaml . | indent 10 }}
{{- end }}
command:
{{- tpl (include "nginx.command" .) . | indent 10 }}
ports:
{{ if .Values.nginx.customPorts }}
{{ toYaml .Values.nginx.customPorts | indent 8 }}
{{ end }}
# DEPRECATION NOTE: The following is to maintain support for values pre 1.3.1 and
# will be cleaned up in a later version
{{- if .Values.nginx.http }}
{{- if .Values.nginx.http.enabled }}
- containerPort: {{ .Values.nginx.http.internalPort }}
name: http
{{- end }}
{{- else }} # DEPRECATED
- containerPort: {{ .Values.nginx.internalPortHttp }}
name: http-internal
{{- end }}
{{- if .Values.nginx.https }}
{{- if .Values.nginx.https.enabled }}
- containerPort: {{ .Values.nginx.https.internalPort }}
name: https
{{- end }}
{{- else }} # DEPRECATED
- containerPort: {{ .Values.nginx.internalPortHttps }}
name: https-internal
{{- end }}
{{- if .Values.artifactory.ssh.enabled }}
- containerPort: {{ .Values.nginx.ssh.internalPort }}
name: tcp-ssh
{{- end }}
{{- with .Values.nginx.lifecycle }}
lifecycle:
{{ toYaml . | indent 10 }}
{{- end }}
volumeMounts:
- name: nginx-conf
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
- name: nginx-artifactory-conf
mountPath: "{{ .Values.nginx.persistence.mountPath }}/conf.d/"
- name: nginx-volume
mountPath: {{ .Values.nginx.persistence.mountPath | quote }}
{{- if .Values.nginx.https.enabled }}
- name: ssl-certificates
mountPath: "{{ .Values.nginx.persistence.mountPath }}/ssl"
{{- end }}
{{- if .Values.nginx.customVolumeMounts }}
{{ tpl (include "artifactory.nginx.customVolumeMounts" .) . | indent 8 }}
{{- end }}
resources:
{{ toYaml .Values.nginx.resources | indent 10 }}
{{- if .Values.nginx.startupProbe.enabled }}
startupProbe:
{{ tpl .Values.nginx.startupProbe.config . | indent 10 }}
{{- end }}
{{- if .Values.nginx.readinessProbe.enabled }}
readinessProbe:
{{ tpl .Values.nginx.readinessProbe.config . | indent 10 }}
{{- end }}
{{- if .Values.nginx.livenessProbe.enabled }}
livenessProbe:
{{ tpl .Values.nginx.livenessProbe.config . | indent 10 }}
{{- end }}
{{- $mountPath := .Values.nginx.persistence.mountPath }}
{{- range .Values.nginx.loggers }}
- name: {{ . | replace "_" "-" | replace "." "-" }}
image: {{ include "artifactory.getImageInfoByValue" (list $ "logger") }}
command:
- tail
args:
- '-F'
- '{{ $mountPath }}/logs/{{ . }}'
volumeMounts:
- name: nginx-volume
mountPath: {{ $mountPath }}
resources:
{{ toYaml $.Values.nginx.loggersResources | indent 10 }}
{{- end }}
{{- if .Values.nginx.customSidecarContainers }}
{{ tpl (include "artifactory.nginx.customSidecarContainers" .) . | indent 6 }}
{{- end }}
{{- if or .Values.nginx.nodeSelector .Values.global.nodeSelector }}
{{ tpl (include "nginx.nodeSelector" .) . | indent 6 }}
{{- end }}
{{- with .Values.nginx.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.nginx.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
{{- if .Values.nginx.customVolumes }}
{{ tpl (include "artifactory.nginx.customVolumes" .) . | indent 6 }}
{{- end }}
- name: nginx-conf
configMap:
{{- if .Values.nginx.customConfigMap }}
name: {{ .Values.nginx.customConfigMap }}
{{- else }}
name: {{ template "artifactory.fullname" . }}-nginx-conf
{{- end }}
- name: nginx-artifactory-conf
configMap:
{{- if .Values.nginx.customArtifactoryConfigMap }}
name: {{ .Values.nginx.customArtifactoryConfigMap }}
{{- else }}
name: {{ template "artifactory.fullname" . }}-nginx-artifactory-conf
{{- end }}
- name: nginx-volume
{{- if .Values.nginx.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.nginx.persistence.existingClaim | default (include "artifactory.nginx.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end }}
{{- if .Values.nginx.https.enabled }}
- name: ssl-certificates
secret:
{{- if .Values.nginx.tlsSecretName }}
secretName: {{ .Values.nginx.tlsSecretName }}
{{- else }}
secretName: {{ template "artifactory.fullname" . }}-nginx-certificate
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,23 @@
{{- if .Values.nginx.enabled -}}
{{- if semverCompare "<v1.21.0-0" .Capabilities.KubeVersion.Version }}
apiVersion: policy/v1beta1
{{- else }}
apiVersion: policy/v1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "artifactory.nginx.fullname" . }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
component: {{ .Values.nginx.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
selector:
matchLabels:
component: {{ .Values.nginx.name }}
app: {{ template "artifactory.name" . }}
release: {{ .Release.Name }}
minAvailable: {{ .Values.nginx.minAvailable }}
{{- end }}
@@ -0,0 +1,26 @@
{{- if and .Values.nginx.persistence.enabled (.Values.nginx.enabled ) }}
{{- if (not .Values.nginx.persistence.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "artifactory.nginx.fullname" . }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.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.storageClassName }}
{{- if (eq "-" .Values.nginx.persistence.storageClassName) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.nginx.persistence.storageClassName }}"
{{- end }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,52 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-nginx-scripts
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
configreloader.sh: |
#!/bin/sh
####
# A helper script to use inotifyd to reload nginx config
# upon configmap/ssl secrets changes.
#
# Synopsis: setup the nginx command via the values file
# as follows:
#
####
# nginx:
# customVolumes: |
# - name: scripts
# configMap:
# name: {{ "{{" }} template "artifactory.fullname" . {{ "}}" }}-nginx-scripts
# defaultMode: 0550
# customVolumeMounts: |
# - name: scripts
# mountPath: /var/opt/jfrog/nginx/scripts/
# customCommand:
# - /bin/sh
# - -c
# - |
# # watch for configmap changes
# /sbin/inotifyd /var/opt/jfrog/nginx/scripts/configreloader.sh {{ "{{" }} .Values.nginx.persistence.mountPath {{ "-}}" }}/conf.d:n &
# {{ "{{" }} if .Values.nginx.https.enabled {{ "-}}" }}
# # watch for tls secret changes
# /sbin/inotifyd /var/opt/jfrog/nginx/scripts/configreloader.sh {{ "{{" }} .Values.nginx.persistence.mountPath {{ "-}}" }}/ssl:n &
# {{ "{{" }} end {{ "-}}" }}
# nginx -g 'daemon off;'
if [[ "$3" =~ data_tmp ]] && [ "$1" = "n" ]
then
# a symlink has changed in one of the watched folders
# lets verify the config
nginx -t -q
if [ $? -eq 0 ]
then
# config is valid, lets reload nginx config
nginx -q -s reload
fi
fi
@@ -0,0 +1,82 @@
{{- if .Values.nginx.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ template "artifactory.nginx.fullname" . }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
component: {{ .Values.nginx.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.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.nginx.service.customPorts }}
{{ toYaml .Values.nginx.service.customPorts | indent 2 }}
{{ end }}
# DEPRECATION NOTE: The following is to maintain support for values pre 1.3.0 and
# will be cleaned up in a later version
{{- if .Values.nginx.http }}
{{- if .Values.nginx.http.enabled }}
- port: {{ .Values.nginx.http.externalPort }}
targetPort: {{ .Values.nginx.http.internalPort }}
{{- if .Values.nginx.service.nodePort }}
nodePort: {{ .Values.nginx.service.nodePort }}
{{- end }}
protocol: TCP
name: http
{{- end }}
{{- else }} # DEPRECATED
- port: {{ .Values.nginx.externalPortHttp }}
targetPort: {{ .Values.nginx.internalPortHttp }}
protocol: TCP
name: http
{{- end }}
{{- if .Values.nginx.https }}
{{- if or .Values.nginx.https.enabled .Values.nginx.service.ssloffload }}
- port: {{ .Values.nginx.https.externalPort }}
{{- if .Values.nginx.service.ssloffload }}
targetPort: {{ .Values.nginx.http.internalPort }}
{{- else }}
targetPort: {{ .Values.nginx.https.internalPort}}
{{- end }}
{{- if .Values.nginx.service.nodePort }}
nodePort: {{ .Values.nginx.service.nodePort }}
{{- end }}
protocol: TCP
name: https
{{- end }}
{{- else }} # DEPRECATED
- port: {{ .Values.nginx.externalPortHttps }}
targetPort: {{ .Values.nginx.internalPortHttps }}
protocol: TCP
name: https
{{- end }}
{{- if .Values.artifactory.ssh.enabled }}
- port: {{ .Values.nginx.ssh.externalPort }}
targetPort: {{ .Values.nginx.ssh.internalPort }}
protocol: TCP
name: tcp-ssh
{{- end }}
selector:
app: {{ template "artifactory.name" . }}
component: {{ .Values.nginx.name }}
release: {{ .Release.Name }}
{{- end }}
+80
View File
@@ -0,0 +1,80 @@
artifactory:
database:
maxOpenConnections: 150
tomcat:
connector:
maxThreads: 300
resources:
requests:
memory: "6Gi"
cpu: "2"
limits:
memory: "10Gi"
cpu: "8"
javaOpts:
xms: "8g"
xmx: "10g"
access:
database:
maxOpenConnections: 150
tomcat:
connector:
maxThreads: 100
router:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
frontend:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
metadata:
database:
maxOpenConnections: 150
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
event:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
jfconnect:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
integration:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
observability:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
+80
View File
@@ -0,0 +1,80 @@
artifactory:
database:
maxOpenConnections: 100
tomcat:
connector:
maxThreads: 200
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "8Gi"
cpu: "6"
javaOpts:
xms: "6g"
xmx: "8g"
access:
database:
maxOpenConnections: 100
tomcat:
connector:
maxThreads: 50
router:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
frontend:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
metadata:
database:
maxOpenConnections: 100
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
event:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
jfconnect:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
integration:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
observability:
resources:
requests:
memory: "200Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1"
+80
View File
@@ -0,0 +1,80 @@
artifactory:
database:
maxOpenConnections: 80
tomcat:
connector:
maxThreads: 200
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "4"
javaOpts:
xms: "4g"
xmx: "6g"
access:
database:
maxOpenConnections: 80
tomcat:
connector:
maxThreads: 50
router:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
frontend:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
metadata:
database:
maxOpenConnections: 80
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
event:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
jfconnect:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
integration:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
observability:
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1"
File diff suppressed because it is too large Load Diff