refactor: Move charts to charts dir
This commit is contained in:
32
charts/molgenis-nexus/templates/_helpers.tpl
Normal file
32
charts/molgenis-nexus/templates/_helpers.tpl
Normal file
@ -0,0 +1,32 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "nexus.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "nexus.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 chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "nexus.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
@ -0,0 +1,65 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: {{ .Values.nexus.name }}
|
||||
labels:
|
||||
app: {{ .Values.nexus.name }}
|
||||
environment: {{ .Values.environment }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
strategy:
|
||||
type: {{ .Values.nexus.strategy.type }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Values.nexus.selector }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Values.nexus.name }}
|
||||
creationTimestamp: null
|
||||
spec:
|
||||
restartPolicy: {{ .Values.nexus.restartPolicy }}
|
||||
initContainers:
|
||||
- name: nexus-nfs
|
||||
image: busybox
|
||||
command: ["sh", "-c", "chown -R 200:200 /nexus-data"]
|
||||
volumeMounts:
|
||||
- name: molgenis-nexus-nfs
|
||||
mountPath: "/nexus-data"
|
||||
containers:
|
||||
- name: {{ .Values.nexus.name }}
|
||||
image: "{{ .Values.nexus.image.repository }}:{{ .Values.nexus.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.nexus.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.nexus.port.ui }}
|
||||
- containerPort: {{ .Values.nexus.port.docker }}
|
||||
volumeMounts:
|
||||
- name: molgenis-nexus-nfs
|
||||
mountPath: /nexus-data
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ .Values.nexus.port.ui }}
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 20
|
||||
failureThreshold: 15
|
||||
successThreshold: 1
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ .Values.nexus.port.ui }}
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 20
|
||||
failureThreshold: 15
|
||||
successThreshold: 1
|
||||
|
||||
volumes:
|
||||
- name: molgenis-nexus-nfs
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.claim }}
|
||||
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
@ -0,0 +1,55 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: {{ .Values.nexusProxy.name }}
|
||||
labels:
|
||||
app: {{ .Values.nexusProxy.name }}
|
||||
environment: {{ .Values.environment }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
strategy:
|
||||
type: {{ .Values.nexusProxy.strategy.type }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Values.nexusProxy.selector }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Values.nexusProxy.name }}
|
||||
creationTimestamp: null
|
||||
spec:
|
||||
restartPolicy: {{ .Values.nexusProxy.restartPolicy }}
|
||||
containers:
|
||||
- name: {{ .Values.nexusProxy.name }}
|
||||
image: "{{ .Values.nexusProxy.image.repository }}:{{ .Values.nexusProxy.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.nexusProxy.image.pullPolicy }}
|
||||
env:
|
||||
- name: PROXY_SERVICE
|
||||
value: "{{ .Values.nexus.name }}:{{ .Values.nexus.port.ui }},{{ .Values.nexus.name }}:{{ .Values.nexus.port.docker }}:{{ .Values.nexus.path.dockerV2 }}"
|
||||
- name: SERVER_NAME
|
||||
value: {{ .Values.nexusProxy.hostname }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.nexusProxy.port }}
|
||||
resources: {}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ .Values.nexusProxy.port }}
|
||||
initialDelaySeconds: 1500
|
||||
periodSeconds: 20
|
||||
failureThreshold: 5
|
||||
successThreshold: 1
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ .Values.nexusProxy.port }}
|
||||
initialDelaySeconds: 150
|
||||
periodSeconds: 20
|
||||
failureThreshold: 15
|
||||
successThreshold: 1
|
||||
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
38
charts/molgenis-nexus/templates/ingress.yaml
Normal file
38
charts/molgenis-nexus/templates/ingress.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: "{{ $.Release.Name }}-ingress"
|
||||
labels:
|
||||
app: {{ $.Values.nexusProxy.name }}
|
||||
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
|
||||
release: "{{ $.Release.Name }}"
|
||||
heritage: "{{ $.Release.Service }}"
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||
{{- if .tls }}
|
||||
ingress.kubernetes.io/secure-backends: "true"
|
||||
{{- end }}
|
||||
{{- range $key, $value := .annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
backend:
|
||||
serviceName: {{ $.Values.nexusProxy.name }}
|
||||
servicePort: {{ $.Values.nexusProxy.port }}
|
||||
{{- if .tls }}
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .name }}
|
||||
secretName: {{ .tlsSecret }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
15
charts/molgenis-nexus/templates/persistence/nexusPVC.yaml
Normal file
15
charts/molgenis-nexus/templates/persistence/nexusPVC.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
{{- if .Values.persistence.enabled -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .Values.persistence.claim }}
|
||||
annotations:
|
||||
volume.beta.kubernetes.io/storage-class: "nfs-provisioner-retain"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size }}
|
||||
{{- end }}
|
15
charts/molgenis-nexus/templates/services/nexus-service.yaml
Normal file
15
charts/molgenis-nexus/templates/services/nexus-service.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.nexus.name }}
|
||||
labels:
|
||||
app: {{ .Values.nexus.name }}
|
||||
spec:
|
||||
type: {{ .Values.nexus.service.type }}
|
||||
ports:
|
||||
- name: ui
|
||||
port: {{ .Values.nexus.port.ui }}
|
||||
- name: docker
|
||||
port: {{ .Values.nexus.port.docker }}
|
||||
selector:
|
||||
app: {{ .Values.nexus.selector }}
|
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.nexusProxy.name }}
|
||||
labels:
|
||||
app: {{ .Values.nexusProxy.name }}
|
||||
spec:
|
||||
type: {{ .Values.nexusProxy.service.type }}
|
||||
ports:
|
||||
- name: {{ .Values.nexusProxy.name }}
|
||||
port: {{ .Values.nexusProxy.port }}
|
||||
selector:
|
||||
app: {{ .Values.nexusProxy.selector }}
|
Reference in New Issue
Block a user