900343f852
This PS adds Artifactory JVM memory tuning & pod resource limit adjustments. Change-Id: I47f535029dadc7b7dfe18c1598630bf5e1219e9f
90 lines
3.0 KiB
YAML
90 lines
3.0 KiB
YAML
{{/*
|
|
Copyright 2017 The Openstack-Helm Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
{{- if .Values.manifests.statefulset }}
|
|
{{- $envAll := . }}
|
|
---
|
|
apiVersion: apps/v1beta1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: artifactory
|
|
spec:
|
|
serviceName: artifactory
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{ tuple $envAll "artifactory" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
|
annotations:
|
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
|
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
|
spec:
|
|
nodeSelector:
|
|
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }}
|
|
containers:
|
|
- name: artifactory
|
|
image: {{ .Values.images.tags.artifactory }}
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
|
{{ tuple $envAll $envAll.Values.pod.resources.artifactory | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
|
env:
|
|
- name: DB_TYPE
|
|
value: mysql
|
|
- name: DB_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: artifactory-db-creds
|
|
key: DB_USERNAME
|
|
- name: DB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: artifactory-db-creds
|
|
key: DB_PASSWORD
|
|
- name: DB_HOST
|
|
value: {{ .Values.endpoints.oslo_db.hosts.default }}
|
|
- name: EXTRA_JAVA_OPTIONS
|
|
value: {{ .Values.conf.artifactory.env.java_opts }}
|
|
{{ if .Values.bootstrap.master_key }}
|
|
- name: ARTIFACTORY_MASTER_KEY
|
|
value: {{ .Values.bootstrap.master_key }}
|
|
{{ end }}
|
|
ports:
|
|
- containerPort: 8081
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- name: artifactory-extra-etc
|
|
mountPath: /artifactory_extra_conf/db.properties
|
|
subPath: db.properties
|
|
- name: artifactory-data
|
|
mountPath: /var/opt/jfrog/artifactory
|
|
volumes:
|
|
- name: artifactory-extra-etc
|
|
configMap:
|
|
name: artifactory-extra-etc
|
|
- name: artifactory-bin
|
|
configMap:
|
|
name: artifactory-bin
|
|
defaultMode: 0555
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: artifactory-data
|
|
spec:
|
|
accessModes: [ "ReadWriteOnce" ]
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.volume.size }}
|
|
storageClassName: {{ .Values.volume.class_name }}
|
|
{{- end }}
|