From 1817bf65a12cbbc90fc1b9547f28f418f942ecce Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Mon, 3 Apr 2017 15:30:07 +0200 Subject: [PATCH] Make example manifests minikube-friendly. Remove fixed namespace from all manifests, reduce resource requests. Remove the storageclass default, since it is not present in minikube. Use the team name instead of integer id, remove unused robots. The manifests are still compatible with the non-local deployment, the only difference is that now a namespace is requred (assuming that the operator can only be deployed in a specific namespace.) --- manifests/postgres-operator.yaml | 1 - manifests/serviceaccount.yaml | 1 - manifests/testpostgresql.yaml | 17 +++++------- manifests/testpostgresql_prime.yaml | 41 ----------------------------- 4 files changed, 6 insertions(+), 54 deletions(-) delete mode 100644 manifests/testpostgresql_prime.yaml diff --git a/manifests/postgres-operator.yaml b/manifests/postgres-operator.yaml index 59e86f31a..6fa6b8870 100644 --- a/manifests/postgres-operator.yaml +++ b/manifests/postgres-operator.yaml @@ -2,7 +2,6 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: postgres-operator - namespace: acid spec: replicas: 1 template: diff --git a/manifests/serviceaccount.yaml b/manifests/serviceaccount.yaml index a0cca091d..f98a17b74 100644 --- a/manifests/serviceaccount.yaml +++ b/manifests/serviceaccount.yaml @@ -2,6 +2,5 @@ apiVersion: v1 kind: ServiceAccount metadata: name: operator - namespace: acid imagePullSecrets: - name: pierone.example.com diff --git a/manifests/testpostgresql.yaml b/manifests/testpostgresql.yaml index 3308d8e58..932839e08 100644 --- a/manifests/testpostgresql.yaml +++ b/manifests/testpostgresql.yaml @@ -3,20 +3,15 @@ kind: "Postgresql" metadata: name: testcluster - namespace: default - spec: - teamId: "50051320" + teamId: "ACID" volume: - size: 10Gi - storageClass: standard - numberOfInstances: 3 + size: 5Gi + numberOfInstances: 2 users: #Application/Robot users - jdoe: + zalando: - superuser - createdb - rmiles: - rroe: allowedSourceRanges: #Load balancer source ranges - 127.0.0.1/32 @@ -24,12 +19,12 @@ spec: postgresql: version: "9.6" parameters: - shared_buffers: "500MB" + shared_buffers: "32MB" max_connections: "10" log_statement: "all" resources: cpu: 10m - memory: 20Mi + memory: 100Mi patroni: initdb: encoding: "UTF8" diff --git a/manifests/testpostgresql_prime.yaml b/manifests/testpostgresql_prime.yaml deleted file mode 100644 index 242833211..000000000 --- a/manifests/testpostgresql_prime.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: "acid.zalan.do/v1" -kind: "Postgresql" - -metadata: - name: testcluster - -spec: - volume: - size: 100Gi - storageClass: gp2 - numberOfInstances: 2 - postgresql: - version: "9.6" - parameters: - shared_buffers: "500MB" - max_connections: "10" - log_statement: "all" - users: - jdoe: - - superuser - - createdb - rmiles: - rroe: - resources: - cpu: 100m - memory: 500Mi - patroni: - initdb: - encoding: "UTF8" - locale: "en_US.UTF-8" - data-checksums: "true" - pg_hba: - - hostssl all all 0.0.0.0/0 md5 - - host all all 0.0.0.0/0 md5 - ttl: 30 - loop_wait: &loop_wait 10 - retry_timeout: 10 - maximum_lag_on_failover: 33554432 - maintenanceWindows: - - 01:00-06:00 #UTC - - Sat:00:00-Sat:04:00