7 changed files with 106 additions and 27 deletions
@ -0,0 +1,17 @@ |
|||
apiVersion: v1 |
|||
kind: ConfigMap |
|||
metadata: |
|||
name: {{ include "covidok.appsettings" . }} |
|||
data: |
|||
appsettings.k8s.json: | |
|||
{ |
|||
"ConnectionStrings": { |
|||
"MySQLDatabase": "server={{- include "covidok.mysql" . -}};database={{ .Values.config.mysql.database }};user={{ .Values.config.mysql.user }};password={{ .Values.config.mysql.password }}", |
|||
"RedisHost": "{{ include "covidok.redis" . }}:{{ .Values.config.redis.port }}" |
|||
}, |
|||
"MinioSettings": { |
|||
"HostName": "{{ include "covidok.minio" . }}", |
|||
"AccessKey": "{{ .Values.config.minio.accesskey }}", |
|||
"SecretKey": "{{ .Values.config.minio.secretkey }}" |
|||
} |
|||
} |
@ -1,42 +1,50 @@ |
|||
# TODO: Add helm templating |
|||
apiVersion: v1 |
|||
kind: Service |
|||
metadata: |
|||
name: mysql |
|||
name: {{ include "covidok.mysql" . }} |
|||
labels: |
|||
{{- include "covidok.labels" . | nindent 4 }} |
|||
spec: |
|||
ports: |
|||
- port: 3306 |
|||
selector: |
|||
{{- include "covidok.selectorLabels" . | nindent 4 }} |
|||
app: mysql |
|||
--- |
|||
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 |
|||
apiVersion: apps/v1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: mysql |
|||
name: {{ include "covidok.mysql" . }} |
|||
spec: |
|||
selector: |
|||
matchLabels: |
|||
{{- include "covidok.selectorLabels" . | nindent 6 }} |
|||
app: mysql |
|||
strategy: |
|||
type: Recreate |
|||
template: |
|||
metadata: |
|||
{{- with .Values.podAnnotations }} |
|||
annotations: |
|||
{{- toYaml . | nindent 8 }} |
|||
{{- end }} |
|||
labels: |
|||
{{- include "covidok.selectorLabels" . | nindent 8 }} |
|||
app: mysql |
|||
spec: |
|||
containers: |
|||
- image: mysql:8.0 |
|||
- image: "{{ .Values.images.mysql.name }}:{{ .Values.images.mysql.tag }}" |
|||
name: mysql |
|||
env: |
|||
# Use secret in real usage |
|||
- name: MYSQL_ROOT_PASSWORD |
|||
value: dev-pass1 |
|||
- name: MYSQL_DATABASE |
|||
value: "covidok" |
|||
value: "{{ .Values.config.mysql.database }}" |
|||
- name: MYSQL_USER |
|||
value: "covidok" |
|||
value: "{{ .Values.config.mysql.user }}" |
|||
- name: MYSQL_PASSWORD |
|||
value: "covidok" |
|||
value: "{{ .Values.config.mysql.password }}" |
|||
ports: |
|||
- containerPort: 3306 |
|||
name: mysql |
|||
|
Loading…
Reference in new issue