From 5d0ffcabe023bb36ee9dfc0d6fd261301dd4533e Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Mon, 29 Oct 2018 10:36:23 -0500 Subject: [PATCH] snapshot of dev before I switched tasks --- templates/server-deployment.yaml | 40 ++++++++++++++++++-------------- test/terraform/main.tf | 6 +++++ 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/templates/server-deployment.yaml b/templates/server-deployment.yaml index 6aea407..eecaf22 100644 --- a/templates/server-deployment.yaml +++ b/templates/server-deployment.yaml @@ -27,6 +27,11 @@ spec: release: {{ .Release.Name }} component: server spec: + strategy: + type: "RollingUpdate" #default + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 #affinity: # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: @@ -75,6 +80,8 @@ spec: fieldPath: metadata.namespace - name: VAULT_ADDR value: "http://localhost:8200" + #- name: VAULT_TEST + #- value: "true" command: - "/bin/sh" - "-ec" @@ -97,24 +104,23 @@ spec: preStop: exec: command: - - vault step-down + - vault operator step-down ports: - containerPort: 8200 name: http - #readinessProbe: - # # NOTE(mitchellh): when our HTTP status endpoints support the - # # proper status codes, we should switch to that. This is temporary. - # # TODO: verify for Vault - # #exec: - # # command: - # # - "/bin/sh" - # # - "-ec" - # # - | - # # curl http://127.0.0.1:8500/v1/status/leader 2>/dev/null | \ - # # grep -E '".+"' - # failureThreshold: 2 - # initialDelaySeconds: 5 - # periodSeconds: 3 - # successThreshold: 1 - # timeoutSeconds: 5 + readinessProbe: + # NOTE(mitchellh): when our HTTP status endpoints support the + # proper status codes, we should switch to that. This is temporary. + # TODO: verify for Vault + exec: + command: + - "/bin/sh" + - "-ec" + - | + vault status + failureThreshold: 2 + initialDelaySeconds: 5 + periodSeconds: 3 + successThreshold: 1 + timeoutSeconds: 5 {{- end }} diff --git a/test/terraform/main.tf b/test/terraform/main.tf index 868281d..2e6ed98 100644 --- a/test/terraform/main.tf +++ b/test/terraform/main.tf @@ -16,6 +16,12 @@ data "google_container_engine_versions" "main" { zone = "${var.zone}" } +#data "google_container_cluster" "cluster" { +# name = "cluster-1" +# zone = "${var.zone}" +# project = "${var.project}" +#} + resource "google_container_cluster" "cluster" { name = "vault-helm-dev-${random_id.suffix.dec}" project = "${var.project}"