1
0
Fork 0

fix(test): updated helm charts for test purposes

This commit is contained in:
sido 2018-05-30 23:16:22 +02:00
parent e1c8c728af
commit 4c05d4ee5e
22 changed files with 274 additions and 308 deletions

View File

@ -1,19 +0,0 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "jenkins.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.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "jenkins.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "jenkins.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "jenkins.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}

View File

@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "jenkins.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 "jenkins.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 "jenkins.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -1,51 +0,0 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "jenkins.fullname" . }}
labels:
app: {{ template "jenkins.name" . }}
chart: {{ template "jenkins.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "jenkins.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "jenkins.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

View File

@ -0,0 +1,39 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.13.0 ()
creationTimestamp: null
labels:
io.kompose.service: jenkins-agent-worker
name: jenkins-agent-worker
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: jenkins-agent-worker
spec:
containers:
- env:
- name: JENKINS_SLAVE_SSH_PUBKEY
value: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC6+L3I5Dh1oKCxRktAhKwX20vQq5+hp40D2HCN+JSOT1WmiZOKQQ2U73HyRlukXV1MJGn6NM0pZS1W12IiAiSeu6xl+YFlEJykRK+9NnpSGwTMXXirCmCyWAlMUb6pcXmCqa1Pk1HqiUUfvflkvFHNT+26LBNXj0LbrT6KFd0xhm/KH9gMTKnYoBQqezE7D5jjPki5lKAfBL7IQkwgs5wFdaQicRYAUsuI7gV6EsDgVmLmF6f2d8+/AJ0fwYIFpzaYqQfgrpilMCvHXcuskpHj2RtJFMiPZ4WZSMZ3sMTD0MmZxdNU32qc/TR7mILHEB9/10EzmE4F7X1NdWYeJqK5VKH8RfwLHtiFDPPoqttc2AuaMrSPiRJxtww0oLsEN3toE9qauXpVcJUgaxpj0hE7UQP026Et3LZDQCD8w+3VPVUCfGHy7LTZdPzxDYuWmSMGF/VjYYKbv3WgPEVomRdB1TlaSEb8JfnHI1CVo4C+dImwxppVRbiAkjK/D+TnTavgx+zl85Fo1oNO49kjg9Avp2sOoHBSCBk6ceywIdvvaIzQSxQZfj3PbSWRg+ywJMS8tM6m6riEQola8EmHA7pP/Aj70453ip08MUnz1vsM/e396nqdw55KhR5dPEPHrfqmONMgr6IUa+6zyeWBQ7LTpkWztQ4lQcPl48jRE0ijTQ==
sido@client-145-100-225-240.surfnet.eduroam.rug.nl
image: registry.molgenis.org/molgenis-ops-releases/jenkins-agent-worker:lts
name: jenkins-agent-worker
ports:
- containerPort: 22
resources: {}
volumeMounts:
- mountPath: /var/run/docker.sock
name: jenkins-agent-worker-claim
restartPolicy: Always
volumes:
- name: jenkins-agent-worker-claim
persistentVolumeClaim:
claimName: jenkins-agent-worker-claim
status: {}

View File

@ -0,0 +1,40 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.13.0 ()
creationTimestamp: null
labels:
io.kompose.service: jenkins-master
name: jenkins-master
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: jenkins-master
spec:
containers:
- env:
- name: JENKINS_ADMIN_PASS
- name: JENKINS_ADMIN_USER
image: registry.molgenis.org/molgenis-ops-releases/jenkins-master:lts
name: jenkins-master
ports:
- containerPort: 8080
resources: {}
volumeMounts:
- mountPath: /var/jenkins-home
name: jenkins-master-claim
- mountPath: /var/run/docker.sock
name: jenkins-master-claim
restartPolicy: Always
volumes:
- name: jenkins-master-claim
persistentVolumeClaim:
claimName: jenkins-master-claim
status: {}

View File

@ -1,38 +1,12 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "jenkins.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "jenkins.name" . }}
chart: {{ template "jenkins.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
name: ingress-${SERVICE}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}
- host: ${SITENAME}
http:
paths:
- backend:
serviceName: ${SERVICE}
servicePort: 80

View File

@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "jenkins.fullname" . }}
labels:
app: {{ template "jenkins.name" . }}
chart: {{ template "jenkins.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "jenkins.name" . }}
release: {{ .Release.Name }}

View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.13.0 ()
creationTimestamp: null
labels:
io.kompose.service: jenkins-agent-worker
name: jenkins-agent-worker
spec:
ports:
- name: "22"
port: 22
targetPort: 22
selector:
io.kompose.service: jenkins-agent-worker
status:
loadBalancer: {}

View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.13.0 ()
creationTimestamp: null
labels:
io.kompose.service: jenkins-master
name: jenkins-master
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
io.kompose.service: jenkins-master
status:
loadBalancer: {}

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
name: jenkins-agent-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
name: jenkins-master-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

View File

@ -1,19 +0,0 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "nexus.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.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "nexus.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "nexus.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "nexus.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}

View File

@ -1,32 +0,0 @@
{{/* 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 -}}

View File

@ -1,51 +0,0 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "nexus.fullname" . }}
labels:
app: {{ template "nexus.name" . }}
chart: {{ template "nexus.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "nexus.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "nexus.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

View File

@ -0,0 +1,29 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: httpd
labels:
app: httpd
spec:
replicas: 1
strategy: {}
template:
metadata:
labels:
app: httpd
creationTimestamp: null
spec:
containers:
- env:
- name: PROXY_SERVICE
value: nexus:8081,nexus:5000:v2
- name: SERVER_NAME
value: httpd:80
image: registry.webhosting.rug.nl/molgenis/httpd:lts
name: httpd
ports:
- containerPort: 80
resources: {}
restartPolicy: Always
status: {}

View File

@ -0,0 +1,32 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: nexus
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: httpd
creationTimestamp: null
spec:
containers:
- image: sonatype/nexus3:latest
name: nexus
ports:
- containerPort: 8081
- containerPort: 5000
resources: {}
volumeMounts:
- mountPath: /nexus-data
name: molgenis-nexus-data
restartPolicy: Always
volumes:
- name: molgenis-nexus-data
persistentVolumeClaim:
claimName: molgenis-nexus-data
status: {}

View File

@ -1,38 +1,12 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "nexus.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "nexus.name" . }}
chart: {{ template "nexus.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
name: ingress-nexus
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}
- host: registry.molgenis.org
http:
paths:
- backend:
serviceName: httpd
servicePort: 80

View File

@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "nexus.fullname" . }}
labels:
app: {{ template "nexus.name" . }}
chart: {{ template "nexus.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "nexus.name" . }}
release: {{ .Release.Name }}

View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
name: httpd
spec:
ports:
- name: "80"
port: 80
targetPort: 80
selector:
app: nexus
status:
loadBalancer: {}

View File

@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
name: nexus
labels:
app: nexus
spec:
ports:
- name: "8081"
port: 8081
targetPort: 8081
- name: "5000"
port: 5000
targetPort: 5000
selector:
app: nexus

View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: molgenis-nexus-data
labels:
name: nfs2
spec:
storageClassName: nfs-class
capacity:
storage: 5Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
server: 192.168.64.10
path: /home/gcc/molgenis-nexus-data

View File

@ -0,0 +1,11 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: molgenis-nexus-data
spec:
storageClassName: nfs-class
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi