From a1cd9e83fac5d669bbc2f57e08b8005c30c164a5 Mon Sep 17 00:00:00 2001 From: Arturo Contreras Date: Wed, 13 Nov 2019 09:50:06 -0800 Subject: [PATCH] Helm v3 working --- .gitignore | 1 + .gitops/helm/Chart.yaml | 4 --- .gitops/helm/checkr-deploy-test/Chart.lock | 6 +++++ .gitops/helm/checkr-deploy-test/Chart.yaml | 10 +++++++ .gitops/helm/checkr-deploy-test/values.yaml | 30 +++++++++++++++++++++ .gitops/helm/dev.yaml | 8 ------ .gitops/helm/requirements.yaml | 1 - .gitops/helm/values.yaml | 29 -------------------- .gitops/helmfile.yaml | 12 +++++++++ 9 files changed, 59 insertions(+), 42 deletions(-) create mode 100644 .gitignore delete mode 100644 .gitops/helm/Chart.yaml create mode 100644 .gitops/helm/checkr-deploy-test/Chart.lock create mode 100644 .gitops/helm/checkr-deploy-test/Chart.yaml create mode 100644 .gitops/helm/checkr-deploy-test/values.yaml delete mode 100644 .gitops/helm/dev.yaml delete mode 100644 .gitops/helm/requirements.yaml delete mode 100644 .gitops/helm/values.yaml create mode 100644 .gitops/helmfile.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cf7deb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.gitops/helm/**/*.tgz diff --git a/.gitops/helm/Chart.yaml b/.gitops/helm/Chart.yaml deleted file mode 100644 index 9dc16b8..0000000 --- a/.gitops/helm/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -description: Helm chart containing monolith services and dependencies -name: checkr-checkr -version: 0.1.0 diff --git a/.gitops/helm/checkr-deploy-test/Chart.lock b/.gitops/helm/checkr-deploy-test/Chart.lock new file mode 100644 index 0000000..3b6cdd0 --- /dev/null +++ b/.gitops/helm/checkr-deploy-test/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: helm-chart-checkr-microservice-template + repository: https://harbor.checkrhq.net/chartrepo/iie + version: 0.8.3 +digest: sha256:9794d363f17008a9101c5df00a17f33598377681d96f9c599219c3ab9e638e5b +generated: "2019-11-13T08:59:21.03039-08:00" diff --git a/.gitops/helm/checkr-deploy-test/Chart.yaml b/.gitops/helm/checkr-deploy-test/Chart.yaml new file mode 100644 index 0000000..bce5ee2 --- /dev/null +++ b/.gitops/helm/checkr-deploy-test/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +description: checkr example helm chart +name: checkr-deploy-test +version: 0.1.0 + +dependencies: +- name: helm-chart-checkr-microservice-template + version: 0.8.x + repository: "@checkr" + alias: microservice diff --git a/.gitops/helm/checkr-deploy-test/values.yaml b/.gitops/helm/checkr-deploy-test/values.yaml new file mode 100644 index 0000000..7474939 --- /dev/null +++ b/.gitops/helm/checkr-deploy-test/values.yaml @@ -0,0 +1,30 @@ +microservice: + podDefaults: + image: checkr/deploy-test + imagePullPolicy: IfNotPresent + command: ["/app/docker-entrypoint.sh", "bundle", "exec"] + env: + dev: + DEPLOYTEST: foo + ENV_TEST: bar + + deployments: + server: + args: ["puma", "-C", "config/puma.rb"] + resque-scheduler: + args: ["rake", "resque:scheduler"] + + services: + deploy-test: + selector: server + ports: + - port: 80 + targetPort: 9393 + + ingressPrefix: dev + ingresses: + web-public: + hosts: + - host: deploy-test.checkrhq-dev.net + serviceName: deploy-test + servicePort: 80 diff --git a/.gitops/helm/dev.yaml b/.gitops/helm/dev.yaml deleted file mode 100644 index f8799d6..0000000 --- a/.gitops/helm/dev.yaml +++ /dev/null @@ -1,8 +0,0 @@ -microservice: - ingressPrefix: dev - ingresses: - - name: web-public - hosts: - - host: checkr.checkrhq-dev.net - serviceName: web - servicePort: 80 diff --git a/.gitops/helm/requirements.yaml b/.gitops/helm/requirements.yaml deleted file mode 100644 index 1de5d1c..0000000 --- a/.gitops/helm/requirements.yaml +++ /dev/null @@ -1 +0,0 @@ -dependencies: \ No newline at end of file diff --git a/.gitops/helm/values.yaml b/.gitops/helm/values.yaml deleted file mode 100644 index 85f8fc1..0000000 --- a/.gitops/helm/values.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Checkr/checkr github repo -microservice: - image: checkr/deploy-test - imagePullPolicy: IfNotPresent - command: ["/app/docker-entrypoint.sh", "bundle", "exec"] - - # Global environment vars - globalEnv: - - name: DEPLOYTEST - value: foo - - name: ENV_TEST - value: bar - - # Array of services (kubernetes deployments) - deployments: - - name: server - args: ["puma", "-C", "config/puma.rb"] - - name: resque-scheduler - args: ["rake", "resque:scheduler"] - - services: - - name: deploy-test - selector: server - ports: - - port: 80 - targetPort: 9393 - - # Array of jobs (kubernetes jobs) to be optionally run before any deploys - jobs: diff --git a/.gitops/helmfile.yaml b/.gitops/helmfile.yaml new file mode 100644 index 0000000..46bbd0c --- /dev/null +++ b/.gitops/helmfile.yaml @@ -0,0 +1,12 @@ +# Common config +templates: + default: &default + namespace: {{ requiredEnv "DEPLOY_NAMESPACE" }} + +releases: +- name: {{ requiredEnv "DEPLOY_NAMESPACE" }}-checkr-deploy-test + <<: *default + chart: ./helm/checkr-deploy-test + values: + - microservice: + ingressPrefix: {{ requiredEnv "DEPLOY_NAMESPACE" }}