diff --git a/Makefile b/Makefile index f919293e..70ef96f7 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ else ifeq (${UNAME}, Darwin) INPLACE_SED=sed -i "" endif -TAG ?= v0.3.0 +TAG ?= v0.3.1 REGISTRY ?= quay.io ORG ?= 3scale PROJECT ?= 3scale-saas-operator diff --git a/deploy/crds/saas.3scale.net_v1alpha1_zync_cr.yaml b/deploy/crds/saas.3scale.net_v1alpha1_zync_cr.yaml index 96eb12ef..430e14f6 100644 --- a/deploy/crds/saas.3scale.net_v1alpha1_zync_cr.yaml +++ b/deploy/crds/saas.3scale.net_v1alpha1_zync_cr.yaml @@ -10,7 +10,5 @@ spec: resources: limits: cpu: "1" - env: - dbWaitSleepSeconds: 1 que: replicas: 1 \ No newline at end of file diff --git a/deploy/crds/saas.3scale.net_zyncs_crd.yaml b/deploy/crds/saas.3scale.net_zyncs_crd.yaml index bd0b5000..1d51e21b 100644 --- a/deploy/crds/saas.3scale.net_zyncs_crd.yaml +++ b/deploy/crds/saas.3scale.net_zyncs_crd.yaml @@ -64,12 +64,6 @@ spec: env: type: object properties: - dbWaitSleepSeconds: - type: integer - description: Sleep delay while waiting for the zync database - railsLogsToStdout: - type: boolean - description: Rails log to std output toggle for zync railsEnv: type: string description: Rails environment for zync @@ -137,9 +131,6 @@ spec: env: type: object properties: - railsLogsToStdout: - type: boolean - description: Rails log to std output toggle for zync railsEnv: type: string description: Rails environment for zync diff --git a/docs/zync-crd-reference.md b/docs/zync-crd-reference.md index 2e978009..44ec570e 100644 --- a/docs/zync-crd-reference.md +++ b/docs/zync-crd-reference.md @@ -14,8 +14,6 @@ spec: vaultPath: secret/data/openshift/dev-example-4-3/3scale-zync zync: replicas: 1 - env: - dbWaitSleepSeconds: 60 resources: limits: cpu: "1" @@ -41,9 +39,7 @@ spec: zync: replicas: 2 env: - dbWaitSleepSeconds: 10 - railsEnv: dev - railsLogsToStdout: true + railsEnv: development resources: requests: cpu: "300m" @@ -66,8 +62,7 @@ spec: que: replicas: 2 env: - railsEnv: dev - railsLogsToStdout: true + railsEnv: development resources: requests: cpu: "250m" @@ -101,9 +96,7 @@ spec: | `image.tag` | `string` | No | `nightly` | Image tag for zync | | `image.pullSecretName` | `string` | No | - | Pull secret for private container repository if required | | `secret.vaultPath` | `string` | Yes | - | Vault path with the zync secrets | -| `zync.env.dbWaitSleepSeconds ` | `int` | No | `30` | Sleep delay while waiting for the zync database | -| `zync.env.railsEnv` | `string` | No | `dev` | Rails environment for zync | -| `zync.env.railsLogsToStdout` | `string` | No | `false` | Rails log to std output toggle for zync | +| `zync.env.railsEnv` | `string` | No | `development` | Rails environment for zync (test/development/production) | | `zync.replicas` | `int` | No | `2` | Number of replicas for zync | | `zync.resources.requests.cpu` | `string` | No | `250m` | Override CPU requests for zync | | `zync.resources.requests.memory` | `string` | No | `250Mi` | Override Memory requests for zync | @@ -120,8 +113,7 @@ spec: | `zync.readinessProbe.successThreshold` | `int` | No | `1` | Override readiness success threshold for zync | | `zync.readinessProbe.failureThreshold` | `int` | No | `3` | Override readiness failure threshold for zync | | `que.replicas` | `int` | No | `2` | Number of replicas for zync-que | -| `que.env.railsEnv` | `string` | No | `dev` | Rails environment for zync-que | -| `que.env.railsLogsToStdout` | `string` | No | `false` | Rail log to std output toggle for zync-que | +| `que.env.railsEnv` | `string` | No | `development` | Rails environment for zync-que (test/development/production) | | `que.resources.requests.cpu` | `string` | No | `250m` | Override CPU requests for zync-que | | `que.resources.requests.memory` | `string` | No | `250Mi` | Override Memory requests for zync-que | | `que.resources.limits.cpu` | `string` | No | `750m` | Override CPU limits for zync-que | diff --git a/roles/zync/defaults/main.yml b/roles/zync/defaults/main.yml index 2b08c759..b6df19f4 100644 --- a/roles/zync/defaults/main.yml +++ b/roles/zync/defaults/main.yml @@ -4,11 +4,9 @@ image_name: "quay.io/3scale/zync" image_tag: "nightly" ## Zync Deployment -zync_replicas: 3 +zync_replicas: 2 ### Zync Deployment Env -zync_env_rails_log_to_stdout: false -zync_env_rails_env: dev -zync_env_db_wait_sleep_seconds: 30 +zync_env_rails_env: "development" ### Zync Deployment Resources zync_resources_requests_cpu: "250m" zync_resources_requests_memory: "250Mi" @@ -28,10 +26,9 @@ zync_readiness_probe_success_threshold: 1 zync_readiness_probe_failure_threshold: 3 ## Zync-Que Deployment -que_replicas: 3 +que_replicas: 2 ### Zync Deployment Env -que_env_rails_log_to_stdout: false -que_env_rails_env: dev +que_env_rails_env: "development" ### Zync-Que Deployment Resources que_resources_requests_cpu: "250m" que_resources_requests_memory: "250Mi" diff --git a/roles/zync/templates/zync-deployment.yaml b/roles/zync/templates/zync-deployment.yaml index 2687518f..44be2223 100644 --- a/roles/zync/templates/zync-deployment.yaml +++ b/roles/zync/templates/zync-deployment.yaml @@ -28,33 +28,6 @@ spec: imagePullSecrets: - name: "{{ image.pull_secret_name }}" {% endif %} - initContainers: - # initContainers > zync-db-svc - - name: zync-db-svc - image: "{{ image.name | default(image_name) }}:{{ image.tag | default(image_tag) }}" - imagePullPolicy: Always - command: - - bash - - -c - - bundle exec sh -c "until rake boot:db; do sleep $SLEEP_SECONDS; done" - ## initContainers > zync-db-svc > env - env: - - name: SLEEP_SECONDS - value: "{{ zync.env.db_wait_sleep_seconds | default(zync_env_db_wait_sleep_seconds) }}" - ### secret/zync - - name: DATABASE_URL - valueFrom: - secretKeyRef: - key: DB_URL - name: zync - ## initContainers > zync-db-svc > resources - resources: - requests: - memory: "{{ zync.resources.requests.memory | default(zync_resources_requests_memory) }}" - cpu: "{{ zync.resources.requests.cpu | default(zync_resources_requests_cpu) }}" - limits: - memory: "{{ zync.resources.limits.memory | default(zync_resources_limits_memory) }}" - cpu: "{{ zync.resources.limits.cpu | default(zync_resources_limits_cpu) }}" containers: # containers > zync - name: zync @@ -101,7 +74,7 @@ spec: ## containers > zync > env env: - name: RAILS_LOG_TO_STDOUT - value: "{{ zync.env.rails_log_to_stdout | default(zync_env_rails_log_to_stdout) }}" + value: "true" - name: RAILS_ENV value: "{{ zync.env.rails_env | default(zync_env_rails_env) }}" - name: POD_NAME diff --git a/roles/zync/templates/zync-que-deployment.yaml b/roles/zync/templates/zync-que-deployment.yaml index 89512bb4..e341597e 100644 --- a/roles/zync/templates/zync-que-deployment.yaml +++ b/roles/zync/templates/zync-que-deployment.yaml @@ -73,7 +73,7 @@ spec: ## containers > zync-que > env env: - name: RAILS_LOG_TO_STDOUT - value: "{{ que.env.rails_log_to_stdout | default(que_env_rails_log_to_stdout) }}" + value: "true" - name: RAILS_ENV value: "{{ que.env.rails_env | default(que_env_rails_env) }}" - name: POD_NAME