Upgrade CRD to v1alpha2

- add required fields for deployment and hpa targets
- make service port mandatory
- add webhooks validation
This commit is contained in:
stefanprodan
2018-12-26 13:46:59 +02:00
parent 0d96bedfee
commit 199e3b36c6
11 changed files with 100 additions and 28 deletions
+13 -6
View File
@@ -9,7 +9,7 @@
For a deployment named _podinfo_, a canary promotion can be defined using Flagger's custom resource:
```yaml
apiVersion: flagger.app/v1alpha1
apiVersion: flagger.app/v1alpha2
kind: Canary
metadata:
name: podinfo
@@ -23,7 +23,7 @@ spec:
# the maximum time in seconds for the canary deployment
# to make progress before it is rollback (default 600s)
progressDeadlineSeconds: 60
# hpa reference (optional)
# HPA reference (optional)
autoscalerRef:
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
@@ -36,16 +36,17 @@ spec:
- public-gateway.istio-system.svc.cluster.local
# Istio virtual service host names (optional)
hosts:
- app.istio.weavedx.com
- app.iowa.weavedx.com
canaryAnalysis:
# max number of failed metric checks before rollback
threshold: 5
threshold: 10
# max traffic percentage routed to canary
# percentage (0-100)
maxWeight: 50
# canary increment step
# percentage (0-100)
stepWeight: 10
stepWeight: 5
# Istio Prometheus checks
metrics:
- name: istio_requests_total
# minimum req success rate (non 5xx responses)
@@ -57,7 +58,13 @@ spec:
# milliseconds
threshold: 500
interval: 30s
# external checks (optional)
webhooks:
- name: integration-tests
url: http://podinfo.test:9898/echo
timeout: 5s
metadata:
test: "all"
```
### Canary Deployment
+2 -2
View File
@@ -333,7 +333,7 @@ kubectl create secret generic cert-manager-credentials \
Create a letsencrypt issuer for CloudDNS \(replace `email@example.com` with a valid email address and `my-gcp-project`with your project ID\):
```yaml
apiVersion: certmanager.k8s.io/v1alpha1
apiVersion: v1alpha2
kind: Issuer
metadata:
name: letsencrypt-prod
@@ -363,7 +363,7 @@ kubectl apply -f ./letsencrypt-issuer.yaml
Create a wildcard certificate \(replace `example.com` with your domain\):
```yaml
apiVersion: certmanager.k8s.io/v1alpha1
apiVersion: v1alpha2
kind: Certificate
metadata:
name: istio-gateway
+1 -1
View File
@@ -20,7 +20,7 @@ kubectl apply -f ${REPO}/artifacts/canaries/hpa.yaml
Create a canary custom resource \(replace example.com with your own domain\):
```yaml
apiVersion: flagger.app/v1alpha1
apiVersion: v1alpha2
kind: Canary
metadata:
name: podinfo