-
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.
moving mlworkbench from swarm to k9s
- Loading branch information
1 parent
eee54c2
commit afef017
Showing
6 changed files
with
111 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
7 changes: 7 additions & 0 deletions
7
ansible/roles/stack-sunbird/templates/sunbird_mlworkbench.env
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 @@ | ||
GOOGLE_APPLICATION_CREDENTIALS="" | ||
redis_host={{groups['redis1'][0]}} | ||
redis_port=6379 | ||
redis_password="" | ||
tagme_token="" | ||
kafka_host={{groups['processing-cluster-kafka']|join(',')}} | ||
kafka_port=9092 |
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: mlworkbench | ||
version: 0.1.0 |
11 changes: 11 additions & 0 deletions
11
kubernetes/helm_charts/core/mlworkbench/templates/configmap.yaml
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,11 @@ | ||
#apiVersion: v1 | ||
#data: | ||
# {{- range $key, $val := .Values.certenv }} | ||
# {{ $key }}: {{ $val }} | ||
# {{- end }} | ||
#kind: ConfigMap | ||
#metadata: | ||
# creationTimestamp: null | ||
# name: {{ .Chart.Name }}-config | ||
# namespace: {{ .Values.namespace }} | ||
|
60 changes: 60 additions & 0 deletions
60
kubernetes/helm_charts/core/mlworkbench/templates/deployment.yaml
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,60 @@ | ||
--- | ||
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: | ||
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,26 @@ | ||
### Default variable file for mlworkbench-service ### | ||
|
||
namespace: {{ namespace }} | ||
imagepullsecrets: {{ imagepullsecrets }} | ||
dockerhub: {{ dockerhub }} | ||
|
||
|
||
replicaCount: {{mllworkbench_replicacount|default(1)}} | ||
repository: {{mlworkbench_repository|default('mlworkbench_service')}} | ||
image_tag: {{ image_tag }} | ||
resources: | ||
requests: | ||
cpu: {{mlworkbench_cpu_req|default('100m')}} | ||
memory: {{mlworkbench_mem_req|default('100Mi')}} | ||
limits: | ||
cpu: {{mlworkbench_cpu_limit|default('2')}} | ||
memory: {{mlworkbench_mem_limit|default('2048Mi')}} | ||
network: | ||
port: 3579 | ||
targetport: 3579 | ||
strategy: | ||
type: RollingUpdate | ||
maxsurge: {{ mlworkbench_maxsurge|default('25%') }} | ||
maxunavailable: {{ mlworkbench_maxunavailable|default('25%') }} | ||
|
||
{{ mlworkbench_liveness_readiness | to_nice_yaml }} |