Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTK Mysql connection properties #246

Open
wants to merge 3 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions charts/gateway/production-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,13 @@ otk:
labels: {}
# nodeSelector: {}
# tolerations: []
## Pod Labels for the OTK install Pod
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podLabels: {}

# Pod Annotations apply to the OTK install Pod
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podAnnotations: {}
database:
# OTK database type - mysql/oracle/cassandra
type: mysql
Expand All @@ -530,6 +537,7 @@ otk:
# jdbcURL: jdbc:mysql://<host>:<port>/<database>
jdbcURL:
jdbcDriverClass: com.l7tech.jdbc.mysql.MySQLDriver
# connectionProperties: {"c3p0.maxPoolSize":15,"c3p0.maxConnectionAge":0,"c3p0.maxIdleTime":0}
# Oracle database name
# databaseName:
# cassandra:
Expand Down
29 changes: 29 additions & 0 deletions charts/gateway/templates/otk-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,26 @@ metadata:
spec:
backoffLimit: 1
template:
metadata:
labels:
app: {{ template "gateway.fullname" . }}
release: {{ .Release.Name }}
{{- if .Values.otk.job.podLabels }}
{{- toYaml .Values.otk.job.podLabels | nindent 8 }}
{{- end }}
{{- if .Values.otk.job.podAnnotations }}
annotations: {{- toYaml .Values.otk.job.podAnnotations | nindent 8 }}
{{- end }}
spec:
volumes:
- name: otk-script-files
configMap:
name: {{ template "gateway.fullname" . }}-otk-scripts
items:
- key: install_otk.py
path: install_otk.py
- key: gateway_entities.py
path: gateway_entities.py
serviceAccountName: {{ include "gateway.serviceAccountName" . }}
{{- if .Values.podSecurityContext }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
Expand All @@ -36,9 +55,17 @@ spec:
- name: otk-install
image: {{.Values.image.registry}}/{{.Values.otk.job.image.repository}}:{{.Values.otk.job.image.tag}}
imagePullPolicy: {{ .Values.otk.job.image.pullPolicy }}
volumeMounts:
- name: otk-script-files
mountPath: /install/scripts/install_otk.py
subPath: install_otk.py
- name: otk-script-files
mountPath: /install/scripts/gateway_entities.py
subPath: gateway_entities.py
{{- if .Values.containerSecurityContext }}
securityContext: {{- toYaml .Values.containerSecurityContext | nindent 12 }}
{{- end }}

envFrom:
- secretRef:
name: {{ template "otk.dbSecretName" . }}
Expand Down Expand Up @@ -76,6 +103,8 @@ spec:
{{ end }}
- name: OTK_DATABASE_PROPERTIES
value: {{ default "na" .Values.otk.database.properties | toJson | b64enc | quote }}
- name: OTK_DATABASE_CONN_PROPERTIES
value: {{ default "na" .Values.otk.database.sql.connectionProperties | toJson | b64enc | quote }}
{{ end }}
- name: OTK_SKAR_RETRY_COUNT
value: {{ default 1 .Values.otk.installRetry | quote}}
Expand Down
Loading