From 2beba10909be59038156783117c2d35365524cfb Mon Sep 17 00:00:00 2001 From: Alexandre Nuttinck Date: Tue, 28 Jul 2020 16:54:15 +0200 Subject: [PATCH] Add probes #2 --- .circleci/config.yml | 2 +- Chart.yaml | 6 +-- README.md | 6 +-- publish.sh | 94 --------------------------------------- templates/deployment.yaml | 12 ++--- 5 files changed, 11 insertions(+), 109 deletions(-) delete mode 100644 publish.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 98367a8..8303eb2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,5 +10,5 @@ jobs: environment: - GITHUB_PAGES_REPO: cetic/helm-charts - HELM_CHART: adminer - - HELM_VERSION: 3.1.0 + - HELM_VERSION: 3.1.2 command: wget -O - https://raw.githubusercontent.com/cetic/helm-adminer/develop/publish.sh | sh \ No newline at end of file diff --git a/Chart.yaml b/Chart.yaml index 20a5bcb..ebad758 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,8 +1,8 @@ --- -apiVersion: "v2" +apiVersion: v2 name: adminer -appVersion: "4.7.6" -version: 0.1.3 +appVersion: 4.7.6 +version: 0.1.4 description: Adminer is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. Adminer is available for MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch and MongoDB home: https://www.adminer.org icon: https://raw.githubusercontent.com/Kong/docker-official-docs/master/adminer/logo.png diff --git a/README.md b/README.md index 28808b7..d4fb9e2 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This [Helm](https://github.com/kubernetes/helm) chart installs [Adminer](https:/ ## Prerequisites - Kubernetes cluster 1.10+ -- Helm 2.8.0+ +- Helm 3.0.0+ - PV provisioner support in the underlying infrastructure. ## Installation @@ -86,9 +86,9 @@ The following table lists the configurable parameters of the Adminer chart and t | **Affinity** | | `affinity` | node/pod affinities | `{}` | | **LivenessProbe** | -| `livenessProbe` | Liveness probe settings | `{}` | +| `livenessProbe` | Liveness probe settings | `nil` | | **ReadnessProbe** | -| `readinessProbe` | Readiness probe settings | `{}` | +| `readinessProbe` | Readiness probe settings | `nil` | ## Credits diff --git a/publish.sh b/publish.sh deleted file mode 100644 index 83a01da..0000000 --- a/publish.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -set -e -set -o pipefail - -WORKING_DIRECTORY="$PWD" - -[ "$GITHUB_PAGES_REPO" ] || { - echo "ERROR: Environment variable GITHUB_PAGES_REPO is required" - exit 1 -} -[ "$HELM_CHART" ] || { - echo "ERROR: Environment variable HELM_CHART is required" - exit 1 -} -[ -z "$GITHUB_PAGES_BRANCH" ] && GITHUB_PAGES_BRANCH=gh-pages -[ -z "$HELM_CHARTS_SOURCE" ] && HELM_CHARTS_SOURCE="$WORKING_DIRECTORY/$HELM_CHART" -[ -d "$WORKING_DIRECTORY" ] || { - echo "ERROR: Could not find Helm charts in $WORKING_DIRECTORY" - exit 1 -} -[ "$HELM_VERSION" ] || { - echo "ERROR: Environment variable HELM_VERSION is required" - exit 1 -} -[ "$CIRCLE_BRANCH" ] || { - echo "ERROR: Environment variable CIRCLE_BRANCH is required" - exit 1 -} - -echo "GITHUB_PAGES_REPO=$GITHUB_PAGES_REPO" -echo "GITHUB_PAGES_BRANCH=$GITHUB_PAGES_BRANCH" -echo "HELM_CHARTS_SOURCE=$HELM_CHARTS_SOURCE" -echo "HELM_VERSION=$HELM_VERSION" -echo "CIRCLE_BRANCH=$CIRCLE_BRANCH" - -echo ">>> Create Chart Directory" - -mkdir -p $HELM_CHARTS_SOURCE/ -mkdir -p /tmp/helm-tmp/ - -cp -r $WORKING_DIRECTORY/. /tmp/helm-tmp/ -cp -r /tmp/helm-tmp/. $HELM_CHARTS_SOURCE/ - -echo '>> Prepare...' -mkdir -p /tmp/helm/bin -mkdir -p /tmp/helm/publish -apk update -apk add ca-certificates git openssh - -echo '>> Installing Helm...' -cd /tmp/helm/bin -wget "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" -tar -zxf "helm-v${HELM_VERSION}-linux-amd64.tar.gz" -chmod +x linux-amd64/helm -alias helm=/tmp/helm/bin/linux-amd64/helm -helm version - -echo ">> Checking out $GITHUB_PAGES_BRANCH branch from $GITHUB_PAGES_REPO" -cd /tmp/helm/publish -mkdir -p "$HOME/.ssh" -ssh-keyscan -H github.com >> "$HOME/.ssh/known_hosts" -git clone -b "$GITHUB_PAGES_BRANCH" "git@github.com:$GITHUB_PAGES_REPO.git" . - -echo '>> Add helm repos...' -helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com -helm repo update - -echo '>> Building chart...' -echo ">>> helm lint $HELM_CHARTS_SOURCE" -helm lint "$HELM_CHARTS_SOURCE" - -mkdir -p "$HELM_CHART" - -echo '>>> helm dependency update' -helm dep up "$HELM_CHARTS_SOURCE" - -echo ">>> helm package -d $HELM_CHART $HELM_CHARTS_SOURCE" -helm package -d "$HELM_CHART" "$HELM_CHARTS_SOURCE" - -echo '>>> helm repo index' -helm repo index . - -if [ "$CIRCLE_BRANCH" != "master" ]; then - echo "Current branch is not master and do not publish" - exit 0 -fi - -echo ">> Publishing to $GITHUB_PAGES_BRANCH branch of $GITHUB_PAGES_REPO" -git config user.email "$CIRCLE_USERNAME@users.noreply.github.com" -git config user.name CircleCI -git add . -git status -git commit -m "Published by CircleCI $CIRCLE_BUILD_URL" -git push origin "$GITHUB_PAGES_BRANCH" \ No newline at end of file diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 51fac9f..e8cd0e0 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -34,16 +34,12 @@ spec: value: {{ .Values.config.design }} - name: ADMINER_DEFAULT_SERVER value: {{ .Values.config.externalserver }} - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http resources: {{- toYaml .Values.resources | nindent 12 }} + livenessProbe: +{{ toYaml .Values.livenessProbe | indent 12 }} + readinessProbe: +{{ toYaml .Values.readinessProbe | indent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }}