Add podinfo chart for GitOps testing

This commit is contained in:
Stefan Prodan
2018-10-02 00:21:44 +03:00
parent 3938eb65eb
commit 3a05cfa20e
13 changed files with 69 additions and 11 deletions
+10 -9
View File
@@ -4,7 +4,7 @@ VERSION_MINOR:=$(shell grep 'VERSION' pkg/version/version.go | awk '{ print $$4
PATCH:=$(shell grep 'VERSION' pkg/version/version.go | awk '{ print $$4 }' | tr -d '"' | awk -F. '{print $$NF}')
SOURCE_DIRS = cmd pkg/apis pkg/controller pkg/server pkg/logging pkg/version
run:
go run cmd/steerer/* -kubeconfig=$$HOME/.kube/config -log-level=debug -metrics-server=https://prometheus.istio.weavedx.com
go run cmd/steerer/* -kubeconfig=$$HOME/.kube/config -log-level=info -metrics-server=https://prometheus.istio.weavedx.com
build:
docker build -t stefanprodan/steerer:$(TAG) . -f Dockerfile
@@ -25,8 +25,8 @@ test: test-fmt test-codegen
go test ./...
helm-package:
cd chart/ && helm package steerer/
mv chart/*.tgz docs/
cd charts/ && helm package steerer/ && helm package podinfo-steerer/
mv charts/*.tgz docs/
helm repo index docs --url https://stefanprodan.github.io/steerer --merge ./docs/index.yaml
helm-up:
@@ -37,24 +37,25 @@ version-set:
current="$(VERSION)" && \
sed -i '' "s/$$current/$$next/g" pkg/version/version.go && \
sed -i '' "s/steerer:$$current/steerer:$$next/g" artifacts/steerer/deployment.yaml && \
sed -i '' "s/tag: $$current/tag: $$next/g" chart/steerer/values.yaml && \
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" chart/steerer/Chart.yaml && \
echo "Version $$next set in code, deployment and chart"
sed -i '' "s/tag: $$current/tag: $$next/g" charts/steerer/values.yaml && \
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/steerer/Chart.yaml && \
echo "Version $$next set in code, deployment and charts"
version-up:
@next="$(VERSION_MINOR).$$(($(PATCH) + 1))" && \
current="$(VERSION)" && \
sed -i '' "s/$$current/$$next/g" pkg/version/version.go && \
sed -i '' "s/steerer:$$current/steerer:$$next/g" artifacts/steerer/deployment.yaml && \
sed -i '' "s/tag: $$current/tag: $$next/g" chart/steerer/values.yaml && \
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" chart/steerer/Chart.yaml && \
sed -i '' "s/tag: $$current/tag: $$next/g" charts/steerer/values.yaml && \
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/steerer/Chart.yaml && \
echo "Version $$next set in code, deployment and chart"
dev-up: version-up
@echo "Starting build/push/deploy pipeline for $(VERSION)"
docker build -t stefanprodan/steerer:$(VERSION) . -f Dockerfile
docker push stefanprodan/steerer:$(VERSION)
helm upgrade --install steerer ./chart/steerer --namespace=istio-system
kubectl apply -f ./artifacts/steerer/crd.yaml
helm upgrade --install steerer ./charts/steerer --namespace=istio-system --set crd.create=false
release:
git tag $(VERSION)
+36
View File
@@ -0,0 +1,36 @@
apiVersion: apps.weave.works/v1beta1
kind: Rollout
metadata:
name: podinfoc
namespace: test
spec:
targetKind: Deployment
virtualService:
name: podinfoc
primary:
name: podinfoc-primary
host: podinfoc-primary
canary:
name: podinfoc-canary
host: podinfoc-canary
canaryAnalysis:
# max number of failed metric checks
# before rolling back the canary
threshold: 10
# max traffic percentage routed to canary
# percentage (0-100)
maxWeight: 50
# canary increment step
# percentage (0-100)
stepWeight: 10
metrics:
- name: istio_requests_total
# minimum req success rate (non 5xx responses)
# percentage (0-100)
threshold: 99
interval: 1m
- name: istio_request_duration_seconds_bucket
# maximum req duration P99
# milliseconds
threshold: 500
interval: 30s
+21
View File
@@ -0,0 +1,21 @@
# 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
@@ -1,5 +1,5 @@
apiVersion: v1
name: steerer
version: 0.0.1
appVersion: 0.0.1-rc.6
appVersion: 0.0.1-rc.16
description: Steerer is a Kubernetes operator that automates the promotion of canary deployments using Istio routing for traffic shifting and Prometheus metrics for canary analysis.
@@ -2,7 +2,7 @@
image:
repository: stefanprodan/steerer
tag: 0.0.1-rc.6
tag: 0.0.1-rc.16
pullPolicy: IfNotPresent
controlLoopInterval: "10s"
Binary file not shown.