diff --git a/artifacts/nginx/canary.yaml b/artifacts/nginx/canary.yaml index 6186889b..acb9afbc 100644 --- a/artifacts/nginx/canary.yaml +++ b/artifacts/nginx/canary.yaml @@ -23,8 +23,10 @@ spec: # to make progress before it is rollback (default 600s) progressDeadlineSeconds: 60 service: - # container port - port: 9898 + # ClusterIP port number + port: 80 + # container port number or name + targetPort: 9898 canaryAnalysis: # schedule interval (default 60s) interval: 10s diff --git a/artifacts/nginx/deployment.yaml b/artifacts/nginx/deployment.yaml deleted file mode 100644 index 4baf9424..00000000 --- a/artifacts/nginx/deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: podinfo - namespace: test - labels: - app: podinfo -spec: - replicas: 1 - strategy: - rollingUpdate: - maxUnavailable: 0 - type: RollingUpdate - selector: - matchLabels: - app: podinfo - template: - metadata: - annotations: - prometheus.io/scrape: "true" - labels: - app: podinfo - spec: - containers: - - name: podinfod - image: quay.io/stefanprodan/podinfo:1.7.0 - imagePullPolicy: IfNotPresent - ports: - - containerPort: 9898 - name: http - protocol: TCP - command: - - ./podinfo - - --port=9898 - - --level=info - - --random-delay=false - - --random-error=false - env: - - name: PODINFO_UI_COLOR - value: green - livenessProbe: - exec: - command: - - podcli - - check - - http - - localhost:9898/healthz - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 - readinessProbe: - exec: - command: - - podcli - - check - - http - - localhost:9898/readyz - failureThreshold: 3 - periodSeconds: 3 - successThreshold: 1 - timeoutSeconds: 2 - resources: - limits: - cpu: 1000m - memory: 256Mi - requests: - cpu: 100m - memory: 16Mi diff --git a/artifacts/nginx/hpa.yaml b/artifacts/nginx/hpa.yaml deleted file mode 100644 index fa2b5a6f..00000000 --- a/artifacts/nginx/hpa.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: podinfo - namespace: test -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: podinfo - minReplicas: 2 - maxReplicas: 4 - metrics: - - type: Resource - resource: - name: cpu - # scale up if usage is above - # 99% of the requested CPU (100m) - targetAverageUtilization: 99 diff --git a/docs/gitbook/usage/nginx-progressive-delivery.md b/docs/gitbook/usage/nginx-progressive-delivery.md index 2dcb117a..ea686b96 100644 --- a/docs/gitbook/usage/nginx-progressive-delivery.md +++ b/docs/gitbook/usage/nginx-progressive-delivery.md @@ -56,8 +56,7 @@ kubectl create ns test Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -f ${REPO}/artifacts/nginx/deployment.yaml -kubectl apply -f ${REPO}/artifacts/nginx/hpa.yaml +kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo ``` Deploy the load testing service to generate traffic during the canary analysis: