Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Commit

Permalink
changes from activiti-cloud-charts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Dawson committed Aug 15, 2018
1 parent c97e9d2 commit c215540
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 4 deletions.
6 changes: 6 additions & 0 deletions charts/example-runtime-bundle/requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- alias: activitipostgresql
name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com
version: 0.11.0
condition: application.runtime-bundle.db.deployPostgres,runtime-bundle.db.deployPostgres,db.deployPostgres
63 changes: 61 additions & 2 deletions charts/example-runtime-bundle/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,66 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: JAVA_OPTS
value: -Xmx{{ .Values.javaOpts.xmx }} -Xms{{ .Values.javaOpts.xms }} {{ .Values.javaOpts.other}}
value: "-Xmx{{ .Values.javaOpts.xmx }} -Xms{{ .Values.javaOpts.xms }} {{ .Values.javaOpts.other}}"
- name: SPRING_APPLICATION_NAME
{{- if .Values.service.name }}
value: "{{ .Values.service.name }}"
{{- else }}
value: {{ template "fullname" . }}
{{- end }}
- name: SPRING_RABBITMQ_HOST
{{- if .Values.global.rabbitmq.host.value }}
value: "{{ .Values.global.rabbitmq.host.value }}"
{{ else }}
value: "{{ .Release.Name }}-rabbitmq"
{{ end }}
- name: SPRING_RABBITMQ_USERNAME
value: {{ .Values.global.rabbitmq.username.value }}
- name: SPRING_RABBITMQ_HOST
{{- if .Values.global.rabbitmq.host.value }}
value: "{{ .Values.global.rabbitmq.host.value }}"
{{- else }}
value: "{{ .Release.Name }}-rabbitmq"
{{- end }}
- name: SPRING_RABBITMQ_USERNAME
value: {{ .Values.global.rabbitmq.username.value }}
- name: SPRING_RABBITMQ_PASSWORD
value: {{ .Values.global.rabbitmq.password.value }}
{{- if .Values.global.keycloak.url }}
- name: ACT_KEYCLOAK_URL
value: "{{ .Values.global.keycloak.url }}"
{{- end }}
{{- if .Values.db.deployPostgres }}
- name: SPRING_DATASOURCE_URL
{{- if .Values.db.uri }}
value: "{{ .Values.db.uri }}"
{{- else }}
value: "jdbc:postgresql://{{ .Release.Name }}-{{ .Values.db.name }}:{{ .Values.db.port }}/postgres"
{{- end }}
- name: SPRING_DATASOURCE_DRIVER_CLASS_NAME
value: {{ default "org.postgresql.Driver" .Values.db.driver }}
- name: SPRING_DATASOURCE_USERNAME
value: {{ default "postgres" .Values.db.user }}
- name: SPRING_DATASOURCE_PASSWORD
{{- if .Values.db.pass }}
value: "{{ .Values.db.pass }}"
{{ else }}
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-{{ .Values.db.name }}
key: postgres-password
{{- end }}
- name: SPRING_JPA_DATABASE_PLATFORM
value: {{ default "org.hibernate.dialect.PostgreSQLDialect" .Values.db.platform }}
{{- end }}
- name: EUREKA_CLIENT_ENABLED
value: "false"
- name: ACTIVITI_CLOUD_SERVICES_METADATA_EUREKA_STATIC_ENABLED
value: "false"
- name: ACTIVITI_CLOUD_SERVICES_METADATA_EUREKA_DYNAMIC_ENABLED
value: "false"
- name: ACT_CLOUD_CONFIG_SERVER_ENABLED
value: "false"
{{- with .Values.extraEnv }}
{{ tpl . $ | indent 8 }}
{{- end }}
Expand All @@ -46,4 +105,4 @@ spec:
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
resources:
{{ toYaml .Values.resources | indent 12 }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
40 changes: 40 additions & 0 deletions charts/example-runtime-bundle/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{- if .Values.ingress.enabled }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- if .Values.ingress.hostName }}
- host: {{ .Values.ingress.hostName }}
http:
{{- else }}
- http:
{{- end }}
paths:
- path: {{ .Values.ingress.path }}
backend:
{{- if .Values.service.name }}
serviceName: {{ .Values.service.name }}
{{- else }}
serviceName: {{ template "fullname" . }}
{{- end }}
servicePort: {{ .Values.service.externalPort }}
{{- if .Values.ingress.tls }}
tls:
- secretName: {{ .Values.ingress.tlsSecret }}
{{- if .Values.ingress.hostName }}
hosts:
- {{ .Values.ingress.hostName }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/example-runtime-bundle/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ spec:
protocol: TCP
name: http
selector:
app: {{ template "fullname" . }}
app: {{ template "fullname" . }}
33 changes: 32 additions & 1 deletion charts/example-runtime-bundle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
global:
rabbitmq:
host:
value: ""
username:
value: guest
password:
value: guest
keycloak:
url: ""
name: keycloak
service:
type: http
port: 80
db:
uri: ""
name: activitipostgresql
deployPostgres: false
port: 5432

activitipostgresql:
postgresPassword: activiti

javaOpts:
xmx: 768m
xms: 512m
other: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
image:
repository: draft
tag: dev
Expand Down Expand Up @@ -31,4 +58,8 @@ readinessProbe:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
terminationGracePeriodSeconds: 10
terminationGracePeriodSeconds: 10

ingress:
## Set to true to enable ingress record generation
enabled: false

0 comments on commit c215540

Please sign in to comment.