Skip to content

Commit

Permalink
Add official Helm chart (#16)
Browse files Browse the repository at this point in the history
lint, package, test and publish helm chart to helm.estafette.io
  • Loading branch information
JorritSalverda authored Nov 7, 2019
1 parent b23346b commit 3d808dc
Show file tree
Hide file tree
Showing 27 changed files with 559 additions and 427 deletions.
72 changes: 62 additions & 10 deletions .estafette.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ builder:
track: dev

labels:
app-group: estafette-various
app-group: estafette-controllers
team: estafette-team
language: golang

version:
semver:
major: 1
minor: 0
minor: 2

stages:
build:
image: golang:1.13.0-alpine3.10
image: golang:1.13.4-alpine3.10
env:
CGO_ENABLED: 0
GOOS: linux
commands:
- go test ./...
- go build -a -installsuffix cgo -ldflags "-X main.version=${ESTAFETTE_BUILD_VERSION} -X main.revision=${ESTAFETTE_GIT_REVISION} -X main.branch=${ESTAFETTE_GIT_BRANCH} -X main.buildDate=${ESTAFETTE_BUILD_DATETIME}" -o ./publish/${ESTAFETTE_GIT_NAME} .
- go build -a -installsuffix cgo -ldflags "-X main.appgroup=${ESTAFETTE_LABEL_APP_GROUP} -X main.app=${ESTAFETTE_GIT_NAME} -X main.version=${ESTAFETTE_BUILD_VERSION} -X main.revision=${ESTAFETTE_GIT_REVISION} -X main.branch=${ESTAFETTE_GIT_BRANCH} -X main.buildDate=${ESTAFETTE_BUILD_DATETIME}" -o ./publish/${ESTAFETTE_GIT_NAME} .

bake:
image: extensions/docker:dev
Expand All @@ -35,16 +35,68 @@ stages:
action: push
repositories:
- estafette
when:
status == 'succeeded' &&
branch == 'master' &&
server == 'gocd'

lint-helm-chart:
image: extensions/helm:dev
action: lint
prerelease: true

package-helm-chart:
image: extensions/helm:dev
action: package
prerelease: true

test-helm-chart:
services:
- name: kubernetes
image: bsycorp/kind:latest-1.12
ports:
- port: 8443
- port: 10080
readiness:
path: /kubernetes-ready
timeoutSeconds: 180
image: extensions/helm:dev
action: test
prerelease: true

clone-charts-repo:
image: extensions/git-clone:dev
repo: helm-charts
branch: master

publish-helm-chart:
image: extensions/helm:dev
action: publish
prerelease: true

slack-notify:
image: extensions/slack-build-status:dev
workspace: estafette
channels:
- '#build-status'
when:
status == 'succeeded' ||
status == 'failed'
status == 'failed'

releases:
release:
clone: true
stages:
package-helm-chart:
image: extensions/helm:dev
action: package

clone-charts-repo:
image: extensions/git-clone:dev
repo: helm-charts
branch: master

publish-helm-chart:
image: extensions/helm:dev
action: publish
purgePrerelease: true

create-github-release:
image: extensions/github-release:dev
version: ${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}.0
closeMilestone: true
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
estafette-gke-node-pool-shifter

# Binaries for programs and plugins
*.exe
*.dll
Expand Down
6 changes: 0 additions & 6 deletions chart/estafette-gke-node-pool-shifter/Chart.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions chart/estafette-gke-node-pool-shifter/templates/NOTES.txt

This file was deleted.

8 changes: 0 additions & 8 deletions chart/estafette-gke-node-pool-shifter/templates/_helpers.tpl

This file was deleted.

28 changes: 0 additions & 28 deletions chart/estafette-gke-node-pool-shifter/templates/clusterrole.yaml

This file was deleted.

This file was deleted.

62 changes: 0 additions & 62 deletions chart/estafette-gke-node-pool-shifter/templates/deployment.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions chart/estafette-gke-node-pool-shifter/templates/secret.yaml

This file was deleted.

This file was deleted.

47 changes: 0 additions & 47 deletions chart/estafette-gke-node-pool-shifter/values.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions estafette-gke-node-pool-shifter/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
5 changes: 5 additions & 0 deletions estafette-gke-node-pool-shifter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: Kubernetes controller that can shift nodes from one node pool to another, to favour for example preemptibles over regular vms
name: estafette-gke-node-pool-shifter
version: 0.1.0
2 changes: 2 additions & 0 deletions estafette-gke-node-pool-shifter/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Get the application logs by running this command:
kubectl logs -f -l app.kubernetes.io/name={{ include "estafette-gke-node-pool-shifter.name" . }},app.kubernetes.io/instance={{ .Release.Name }} -n {{ .Release.Namespace }}
Loading

0 comments on commit 3d808dc

Please sign in to comment.