From fa38257e232b7e0f579c78f027a348d66586c7a3 Mon Sep 17 00:00:00 2001 From: "igor.tsupko" Date: Tue, 27 Mar 2018 11:13:48 +0300 Subject: [PATCH 1/3] #78 autoupdate to helm's version, not to default "latest" in values.yaml --- .gitignore | 1 + charts/loghouse/templates/clickhouse/clickhouse.yaml | 2 +- charts/loghouse/templates/fluentd/fluentd.yaml | 2 +- charts/loghouse/templates/loghouse/loghouse-cronjob.yaml | 2 +- charts/loghouse/templates/loghouse/loghouse-init-db.yaml | 2 +- charts/loghouse/templates/loghouse/loghouse-init-tables.yaml | 2 +- charts/loghouse/templates/loghouse/loghouse.yaml | 2 +- charts/loghouse/templates/tabix/tabix.yaml | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index dd1a288..7112d2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/.idea /log /tmp # dotenv diff --git a/charts/loghouse/templates/clickhouse/clickhouse.yaml b/charts/loghouse/templates/clickhouse/clickhouse.yaml index 9427054..4c0d815 100644 --- a/charts/loghouse/templates/clickhouse/clickhouse.yaml +++ b/charts/loghouse/templates/clickhouse/clickhouse.yaml @@ -28,7 +28,7 @@ spec: mountPath: /var/lib/clickhouse containers: - name: clickhouse - image: flant/loghouse-clickhouse:{{ default .Chart.Version .Values.version }} + image: flant/loghouse-clickhouse:{{ .Chart.Version }} imagePullPolicy: {{ .Values.imagePullPolicy }} ports: - name: http diff --git a/charts/loghouse/templates/fluentd/fluentd.yaml b/charts/loghouse/templates/fluentd/fluentd.yaml index efb63d4..4442c1d 100644 --- a/charts/loghouse/templates/fluentd/fluentd.yaml +++ b/charts/loghouse/templates/fluentd/fluentd.yaml @@ -19,7 +19,7 @@ spec: serviceAccountName: fluentd containers: - name: fluentd - image: flant/loghouse-fluentd:{{ default .Chart.Version .Values.version }} + image: flant/loghouse-fluentd:{{ .Chart.Version }} imagePullPolicy: {{ .Values.imagePullPolicy }} env: - name: FLUENTD_ARGS diff --git a/charts/loghouse/templates/loghouse/loghouse-cronjob.yaml b/charts/loghouse/templates/loghouse/loghouse-cronjob.yaml index d217b12..0890942 100644 --- a/charts/loghouse/templates/loghouse/loghouse-cronjob.yaml +++ b/charts/loghouse/templates/loghouse/loghouse-cronjob.yaml @@ -19,7 +19,7 @@ spec: command: ['/bin/sh', '-c', 'while ! getent ahostsv4 clickhouse; do sleep 1; done'] containers: - name: cron - image: flant/loghouse-dashboard:{{ default .Chart.Version .Values.version }} + image: flant/loghouse-dashboard:{{ .Chart.Version }} imagePullPolicy: {{ .Values.imagePullPolicy }} command: ['/bin/bash', '-l', '-c', 'rake create_logs_tables'] env: diff --git a/charts/loghouse/templates/loghouse/loghouse-init-db.yaml b/charts/loghouse/templates/loghouse/loghouse-init-db.yaml index 95140b3..4cfc3e9 100644 --- a/charts/loghouse/templates/loghouse/loghouse-init-db.yaml +++ b/charts/loghouse/templates/loghouse/loghouse-init-db.yaml @@ -19,7 +19,7 @@ spec: command: [ '/bin/sh', '-c', 'while ! getent ahostsv4 clickhouse; do sleep 1; done' ] containers: - name: init - image: flant/loghouse-fluentd:{{ default .Chart.Version .Values.version }} + image: flant/loghouse-fluentd:{{ .Chart.Version }} imagePullPolicy: {{ .Values.imagePullPolicy }} command: ['/bin/bash', '-l', '-c', 'clickhouse-client --host=${CLICKHOUSE_URL} --port=9000 --user=${CLICKHOUSE_USERNAME} --password=${CLICKHOUSE_PASSWORD} --query="CREATE DATABASE ${CLICKHOUSE_DATABASE};"'] env: diff --git a/charts/loghouse/templates/loghouse/loghouse-init-tables.yaml b/charts/loghouse/templates/loghouse/loghouse-init-tables.yaml index cb26f22..b4bdaf9 100644 --- a/charts/loghouse/templates/loghouse/loghouse-init-tables.yaml +++ b/charts/loghouse/templates/loghouse/loghouse-init-tables.yaml @@ -19,7 +19,7 @@ spec: command: [ '/bin/sh', '-c', 'while ! getent ahostsv4 clickhouse; do sleep 1; done' ] containers: - name: init-tables - image: flant/loghouse-dashboard:{{ default .Chart.Version .Values.version }} + image: flant/loghouse-dashboard:{{ .Chart.Version }} imagePullPolicy: {{ .Values.imagePullPolicy }} command: ['/bin/bash', '-l', '-c', 'rake create_logs_tables'] env: diff --git a/charts/loghouse/templates/loghouse/loghouse.yaml b/charts/loghouse/templates/loghouse/loghouse.yaml index 41087a7..fc7acc9 100644 --- a/charts/loghouse/templates/loghouse/loghouse.yaml +++ b/charts/loghouse/templates/loghouse/loghouse.yaml @@ -33,7 +33,7 @@ spec: mountPath: /etc/nginx/nginx.conf subPath: nginx.conf - name: backend - image: flant/loghouse-dashboard:{{ default .Chart.Version .Values.version }} + image: flant/loghouse-dashboard:{{ .Chart.Version }} imagePullPolicy: {{ .Values.imagePullPolicy }} command: ["bundle", "exec", "puma"] ports: diff --git a/charts/loghouse/templates/tabix/tabix.yaml b/charts/loghouse/templates/tabix/tabix.yaml index 9c2bfa2..fe3973c 100644 --- a/charts/loghouse/templates/tabix/tabix.yaml +++ b/charts/loghouse/templates/tabix/tabix.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: tabix - image: flant/loghouse-tabix:{{ default .Chart.Version .Values.version }} + image: flant/loghouse-tabix:{{ .Chart.Version }} imagePullPolicy: {{ .Values.imagePullPolicy }} ports: - name: http From 5d3ff33bc71c655fdb74cc0d7ca7e7a17149d06e Mon Sep 17 00:00:00 2001 From: "igor.tsupko" Date: Tue, 27 Mar 2018 12:07:25 +0300 Subject: [PATCH 2/3] test --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8ff65f..a3a9279 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: generic +if: tag IS present + install: # Installing helm - wget -q https://storage.googleapis.com/kubernetes-helm/helm-v2.6.2-linux-amd64.tar.gz @@ -20,7 +22,7 @@ script: - helm repo index charts/ - git add charts/ - git commit --message "Add new version ${TRAVIS_TAG}" - - git remote add origin-pages https://${GITHUB_TOKEN}@github.com/flant/loghouse.git + - git remote add origin-pages https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git - git push --quiet --set-upstream origin-pages gh-pages after_success: - true From 20e35b0209471aa6df90bb212c6533c986ddd2da Mon Sep 17 00:00:00 2001 From: "igor.tsupko" Date: Tue, 27 Mar 2018 12:33:13 +0300 Subject: [PATCH 3/3] #78 no version in values.yaml --- charts/loghouse/values.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/charts/loghouse/values.yaml b/charts/loghouse/values.yaml index 5ac585c..1ca64c6 100644 --- a/charts/loghouse/values.yaml +++ b/charts/loghouse/values.yaml @@ -61,9 +61,6 @@ partition_period: 1 # If you not want install fluentd on master install_master: false -# For install specific version of Chart use version -version: latest - imagePullPolicy: Always clickhouse: