diff --git a/tables-api/bin/deploy-ingress-nginx b/tables-api/bin/deploy-ingress-nginx index 673d040e..70e2ce4f 100755 --- a/tables-api/bin/deploy-ingress-nginx +++ b/tables-api/bin/deploy-ingress-nginx @@ -34,4 +34,4 @@ template=$( cat "$template_path" | \ echo "Creating ingress-nginx resources..." # Apply the template. -echo "$template" | kubectl apply -f - \ No newline at end of file +echo "$template" | kubectl apply -f - diff --git a/tables-api/ingress-nginx.yaml b/tables-api/ingress-nginx.yaml index eee26040..51a7bb11 100644 --- a/tables-api/ingress-nginx.yaml +++ b/tables-api/ingress-nginx.yaml @@ -398,7 +398,7 @@ spec: type: ClusterIP --- apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: labels: app.kubernetes.io/component: controller @@ -409,6 +409,7 @@ metadata: name: tables-api-nginx-controller namespace: tables-api-nginx spec: + serviceName: tables-api-nginx-controller minReadySeconds: 0 revisionHistoryLimit: 10 selector: diff --git a/tables-api/tables-api.yaml b/tables-api/tables-api.yaml index 3d3dd99a..a044ec59 100644 --- a/tables-api/tables-api.yaml +++ b/tables-api/tables-api.yaml @@ -1,11 +1,12 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: tables-api-primary labels: app: tables-api-primary spec: replicas: 4 + serviceName: tables-api-primary selector: matchLabels: component: tables-api-primary @@ -73,13 +74,14 @@ spec: timeoutSeconds: 20 --- apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: tables-api-reader labels: app: tables-api-reader spec: replicas: 6 + serviceName: tables-api-reader selector: matchLabels: component: tables-api-reader @@ -195,4 +197,4 @@ spec: service: name: tables-api-primary port: - number: 80 \ No newline at end of file + number: 80