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

fix(#127): removing unused service and changing app names #131

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions deploy/cht_sync/templates/couch2pg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ spec:
replicas: 1
selector:
matchLabels:
app: cht-sync
app: cht-sync-couch2pg-{{ $service.host | replace "." "-" }}
template:
metadata:
labels:
app: cht-sync
app: cht-sync-couch2pg-{{ $service.host | replace "." "-" }}
spec:
automountServiceAccountToken: false
containers:
Expand Down
4 changes: 2 additions & 2 deletions deploy/cht_sync/templates/dbt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ spec:
replicas: 1
selector:
matchLabels:
app: cht-sync
app: cht-sync-dbt
template:
metadata:
labels:
app: cht-sync
app: cht-sync-dbt
spec:
automountServiceAccountToken: false
containers:
Expand Down
2 changes: 1 addition & 1 deletion deploy/cht_sync/templates/medic-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (.Values.medic_ingress).enabled -}}
{{- if and (.Values.medic_ingress).enabled (.Values.metrics_exporter).enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down
2 changes: 1 addition & 1 deletion deploy/cht_sync/templates/postgres-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: postgres
spec:
selector:
inner.service: postgres
app: cht-sync-postgres
ports:
- protocol: TCP
port: {{ .Values.postgres.port | default "5432" }}
Expand Down
6 changes: 2 additions & 4 deletions deploy/cht_sync/templates/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ spec:
replicas: 1
selector:
matchLabels:
app: cht-sync
inner.service: postgres
app: cht-sync-postgres
template:
metadata:
labels:
app: cht-sync
inner.service: postgres
app: cht-sync-postgres
spec:
automountServiceAccountToken: false
containers:
Expand Down
10 changes: 0 additions & 10 deletions deploy/cht_sync/templates/postgrest-service.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions deploy/cht_sync/templates/sql-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ spec:
spec:
automountServiceAccountToken: false
containers:
- name: dbt
- name: sql-exporter
image: burningalchemist/sql_exporter:latest
command: ["sql_exporter", "--config.file=/etc/sql_exporter/sql_exporter.yml"]
resources:
limits:
cpu: {{ (.Values.dbt).cpu_limit | default "500m" }}
memory: {{ (.Values.dbt).memory_limit | default "1Gi" }}
cpu: {{ (.Values.metrics_exporter).cpu_limit | default "500m" }}
memory: {{ (.Values.metrics_exporter).memory_limit | default "1Gi" }}
volumeMounts:
- name: config-volume
mountPath: /etc/sql_exporter/sql_exporter.yml
Expand Down
13 changes: 13 additions & 0 deletions deploy/cht_sync_superset/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v2
name: cht_sync_superst
description: helm chart for cht_sync together with superset
type: application
version: 0.1.0
appVersion: "0.1.0"
dependencies:
- name: cht_sync
version: "0.1.0"
repository: "file://../cht_sync"
- name: superset
version: "0.12.11"
repository: "https://apache.github.io/superset"
30 changes: 30 additions & 0 deletions deploy/cht_sync_superset/templates/medic-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if (.Values.medic_ingress).enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: cht-sync-superset-ingress
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/tags: {{ .Values.medic_ingress.annotations.tags }}
alb.ingress.kubernetes.io/group.name: {{ .Values.medic_ingress.annotations.groupname }}
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/healthcheck-port: traffic-port
{{- if and (hasKey .Values.medic_ingress.annotations "certificate") .Values.medic_ingress.annotations.certificate }}
alb.ingress.kubernetes.io/certificate-arn: {{ .Values.medic_ingress.annotations.certificate }}
{{- end }}
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
spec:
ingressClassName: alb
rules:
- host: {{ .Values.medic_ingress.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: cht-sync-superset
port:
number: 8088
{{- end }}
73 changes: 73 additions & 0 deletions deploy/cht_sync_superset/values.yaml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
cht_sync: # see ../cht_sync/values.yaml.template for more details
postgres:
enabled: true # if true a postgres service will be created in this cluster
user: ""
password: ""
db: ""
schema: "v1"
table: "medic"
host: "postgres" # if postgres is outside the cluster
port: 5432 # if postgres is outside the cluster

cht_pipeline_branch_url: "https://github.com/medic/cht-pipeline.git#main"

# values shared by all couchdb instances
# can be omitted if couchdb instances do not share any values
couchdb:
user: ""
dbs: "medic" # space separated list of databases you want to sync e.g "medic medic-sentinel"
port: "5984"
secure: "true" # "true" if SSL is required

# values for each couchdb instance
# host and password are required
# other values can be omitted if they are common to all couchdb instances and specified above
couchdbs:
- host: "host1" # required for all couchdb instances
password: "" # required for all couchdb instances
- host: "host2"
password: ""
- host: "host3"
password: ""
user: "user2" # required if different than above
dbs: "medic medic_sentinel" # required if different than above
port: "5984" # required if different than above
secure: "true" # required if different than above

superset:
extraSecretEnv:
SUPERSET_SECRET_KEY: ''
postgresql:
enabled: false # must be fals
supersetNode:
connections:
db_host: ""
db_port: ""
db_user: ""
db_pass: ""
db_name: ""
initContainers: null
init:
adminUser:
username: ""
firstname: ""
lastname: ""
email: ""
password: ""
initContainers: null
supersetWorker:
initContainers: null

# if using the medic EKS cluster these values will create an ingress
# using a shared ALB
# if not using medic EKS cluser, omit
#medic_ingress:
# enabled: true
# annotations:
# groupname: "dev-cht-alb"
# tags: "Environment=dev,Team=QA"
# certificate: ""
# host: ""
# hosted_zone_id: ""
# load_balancer: ""