Merged in feature/helm-install-plugins (pull request #117)

Feature/helm install plugins
This commit is contained in:
Philipp Czora
2018-11-27 12:43:19 +00:00
4 changed files with 42 additions and 1 deletions

View File

@@ -108,7 +108,7 @@ data:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<--
<!--
in a container environment we only need stdout
-->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">

View File

@@ -29,6 +29,17 @@ spec:
volumeMounts:
- name: data
mountPath: /data
{{- if .Values.plugins }}
- name: install-plugins
image: alpine:3.8
imagePullPolicy: IfNotPresent
command: ['sh', '/scripts/install-plugins.sh']
volumeMounts:
- name: data
mountPath: /data
- name: scripts
mountPath: /scripts
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
@@ -63,6 +74,11 @@ spec:
- name: config
configMap:
name: {{ include "scm-manager.fullname" . }}
{{- if .Values.plugins }}
- name: scripts
configMap:
name: {{ include "scm-manager.fullname" . }}-scripts
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}

View File

@@ -0,0 +1,21 @@
{{- if .Values.plugins }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "scm-manager.fullname" . }}-scripts
labels:
app: {{ include "scm-manager.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
data:
install-plugins.sh: |
#!/bin/sh
mkdir -p /data/plugins
chown 1000:1000 /data/plugins
{{ range $i, $plugin := .Values.plugins }}
# install plugin {{ $plugin.name }}
wget -O /data/plugins/{{ $plugin.name }}.smp {{ $plugin.url }}
chown 1000:1000 /data/plugins/{{ $plugin.name }}.smp
{{ end }}
{{- end }}

View File

@@ -10,6 +10,10 @@ image:
tag: latest
pullPolicy: Always
# plugins:
# - name: scm-review-plugin
# url: https://oss.cloudogu.com/jenkins/job/scm-manager/job/scm-manager-bitbucket/job/scm-review-plugin/job/develop/lastSuccessfulBuild/artifact/target/scm-review-plugin-2.0.0-SNAPSHOT.smp
nameOverride: ""
fullnameOverride: ""