-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SB-25552 - UCI odk deployment (#2726)
UCI ODK Heml Chart
- Loading branch information
1 parent
634240b
commit 8800eaa
Showing
6 changed files
with
158 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
DB_URL=jdbc:postgres://{{uci_postgres_host}}:5432/{{uci_odk_postgres_database}}?user={{uci_postgres_user}}&password={{uci_postgres_password}}&sslmode=require | ||
DB_RESOURCE_NAME=jdbc/{{uci_odk_postgres_database}} | ||
DB_USERNAME={{uci_postgres_user}} | ||
DB_PASSWORD={{uci_postgres_password}} | ||
DB_SCHEMA=aggregate | ||
DB_NAME={{uci_odk_postgres_database}} | ||
DB_PORT=5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
appVersion: "1.0" | ||
description: A Helm chart for Kubernetes | ||
name: odk | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Chart.Name }} | ||
namespace: {{ .Values.namespace }} | ||
annotations: | ||
reloader.stakater.com/auto: "true" | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: {{ .Values.strategy.maxsurge }} | ||
maxUnavailable: {{ .Values.strategy.maxunavailable }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Chart.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Chart.Name }} | ||
spec: | ||
{{- if .Values.imagepullsecrets }} | ||
imagePullSecrets: | ||
- name: {{ .Values.imagepullsecrets }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" | ||
imagePullPolicy: Always | ||
env: | ||
- name: JAVA_OPTIONS | ||
value: {{ .Values.env.javaoptions | quote }} | ||
envFrom: | ||
- configMapRef: | ||
name: {{ .Chart.Name }}-config | ||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
ports: | ||
- containerPort: {{ .Values.network.port }} | ||
{{- if .Values.healthcheck }} | ||
livenessProbe: | ||
{{ toYaml .Values.livenessProbe | indent 10 }} | ||
readinessProbe: | ||
{{ toYaml .Values.readinessProbe | indent 10 }} | ||
{{- end }} | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Chart.Name }}-service | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: {{ .Chart.Name }} | ||
spec: | ||
ports: | ||
- name: http-{{ .Chart.Name }} | ||
protocol: TCP | ||
port: {{ .Values.network.targetport }} | ||
selector: | ||
app: {{ .Chart.Name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{- if .Values.autoscaling.enabled }} | ||
apiVersion: autoscaling/v2beta1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ .Chart.Name }} | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ .Chart.Name }} | ||
minReplicas: {{ .Values.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.autoscaling.maxReplicas }} | ||
metrics: | ||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
{{- end }} | ||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
### Default variable file for cert-service ### | ||
|
||
namespace: {{ namespace }} | ||
imagepullsecrets: {{ imagepullsecrets }} | ||
dockerhub: {{ dockerhub }} | ||
|
||
env: | ||
javaoptions: {{uci_odk_java_mem_limit|default('-Xmx600m')}} | ||
|
||
replicaCount: {{uci_odk_replicacount|default(1)}} | ||
repository: {{uci_odk_repository|default('odk')}} | ||
image_tag: {{ image_tag }} | ||
resources: | ||
requests: | ||
cpu: {{uci_odk_cpu_req|default('100m')}} | ||
memory: {{uci_odk_mem_req|default('100Mi')}} | ||
limits: | ||
cpu: {{uci_odk_cpu_limit|default('1')}} | ||
memory: {{uci_odk_mem_limit|default('1024Mi')}} | ||
network: | ||
port: 8080 | ||
targetport: 8080 | ||
strategy: | ||
type: RollingUpdate | ||
maxsurge: {{ uci_odk_maxsurge|default('25%') }} | ||
maxunavailable: {{ uci_odk_maxunavailable|default('25%') }} | ||
|
||
{{ uci_odk_liveness_readiness | to_nice_yaml }} | ||
|
||
autoscaling: | ||
enabled: {{ uci_odk_autoscaling_enabled | default('false') }} | ||
minReplicas: {{ uci_odk_autoscaling_minReplicas|default(1) }} | ||
maxReplicas: {{ uci_odk_autoscaling_maxReplicas|default(2) }} | ||
targetCPUUtilizationPercentage: {{ uci_odk_autoscaling_targetCPUUtilizationPercentage|default(60) }} | ||
targetMemoryUtilizationPercentage: {{ uci_odk_autoscaling_targetMemoryUtilizationPercentage|default('') }} |