diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8eed60359..3cfe090d3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,11 +1,13 @@ name: build on: + workflow_dispatch: pull_request: + branches: + - main push: branches: - main - - github-actions jobs: container: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 520096002..a50e7b16c 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -1,11 +1,13 @@ name: e2e on: + workflow_dispatch: pull_request: + branches: + - main push: branches: - main - - github-actions jobs: kind: diff --git a/kustomize/appmesh/patch.yaml b/kustomize/appmesh/patch.yaml index 408379d16..38315632e 100644 --- a/kustomize/appmesh/patch.yaml +++ b/kustomize/appmesh/patch.yaml @@ -9,11 +9,9 @@ spec: - name: flagger args: - -log-level=info + - -include-label-prefix=app.kubernetes.io - -mesh-provider=appmesh - -metrics-server=http://appmesh-prometheus:9090 - - -slack-user=flagger - - -slack-channel= - - -slack-url= --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding diff --git a/kustomize/contour/patch.yaml b/kustomize/contour/patch.yaml index 540e7defa..99570ae5d 100644 --- a/kustomize/contour/patch.yaml +++ b/kustomize/contour/patch.yaml @@ -9,9 +9,7 @@ spec: - name: flagger args: - -log-level=info + - -include-label-prefix=app.kubernetes.io - -mesh-provider=contour - -ingress-class=contour - -metrics-server=http://flagger-prometheus:9090 - - -slack-user=flagger - - -slack-channel= - - -slack-url= diff --git a/kustomize/istio/patch.yaml b/kustomize/istio/patch.yaml index 8180d2d89..a9e3d9843 100644 --- a/kustomize/istio/patch.yaml +++ b/kustomize/istio/patch.yaml @@ -9,12 +9,9 @@ spec: - name: flagger args: - -log-level=info + - -include-label-prefix=app.kubernetes.io - -mesh-provider=istio - -metrics-server=http://prometheus:9090 - - -slack-user=flagger - - -slack-channel= - - -slack-url= ---- --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding diff --git a/kustomize/kubernetes/patch.yaml b/kustomize/kubernetes/patch.yaml index 3bec1e645..85afd87b7 100644 --- a/kustomize/kubernetes/patch.yaml +++ b/kustomize/kubernetes/patch.yaml @@ -9,8 +9,6 @@ spec: - name: flagger args: - -log-level=info + - -include-label-prefix=app.kubernetes.io - -mesh-provider=kubernetes - -metrics-server=http://flagger-prometheus:9090 - - -slack-user=flagger - - -slack-channel= - - -slack-url= diff --git a/kustomize/linkerd/patch.yaml b/kustomize/linkerd/patch.yaml index e20531383..25fcade60 100644 --- a/kustomize/linkerd/patch.yaml +++ b/kustomize/linkerd/patch.yaml @@ -9,11 +9,9 @@ spec: - name: flagger args: - -log-level=info + - -include-label-prefix=app.kubernetes.io - -mesh-provider=linkerd - -metrics-server=http://linkerd-prometheus:9090 - - -slack-user=flagger - - -slack-channel= - - -slack-url= --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding diff --git a/test/kubernetes/install.sh b/test/kubernetes/install.sh index 018622716..dd41d9b7e 100755 --- a/test/kubernetes/install.sh +++ b/test/kubernetes/install.sh @@ -12,4 +12,4 @@ kubectl apply -k ${REPO_ROOT}/kustomize/kubernetes kubectl -n flagger-system set image deployment/flagger flagger=test/flagger:latest kubectl -n flagger-system rollout status deployment/flagger -kubectl -n flagger-system rollout status deployment/flagger-prometheus \ No newline at end of file +kubectl -n flagger-system rollout status deployment/flagger-prometheus diff --git a/test/kubernetes/test-deployment.sh b/test/kubernetes/test-deployment.sh index 42cb7a2d5..836e44e7d 100755 --- a/test/kubernetes/test-deployment.sh +++ b/test/kubernetes/test-deployment.sh @@ -72,6 +72,17 @@ until ${ok}; do fi done +passed=$(kubectl -n test get deploy/podinfo-primary -oyaml 2>&1 | { grep test-label-prefix || true; }) +if [ -z "$passed" ]; then + echo -e '\u2716 primary copy labels by prefix test failed' + exit 1 +fi +passed=$(kubectl -n test get deploy/podinfo-primary -oyaml 2>&1 | { grep test-annotation-prefix || true; }) +if [ -z "$passed" ]; then + echo -e '\u2716 primary copy annotations by prefix test failed' + exit 1 +fi + echo '✔ Canary initialization test passed' echo '>>> Triggering canary deployment' diff --git a/test/workloads/deployment.yaml b/test/workloads/deployment.yaml index 175803d9b..390baa329 100644 --- a/test/workloads/deployment.yaml +++ b/test/workloads/deployment.yaml @@ -4,7 +4,10 @@ metadata: name: podinfo namespace: test labels: - app: podinfo + app.kubernetes.io/name: podinfo + app.kubernetes.io/managed-by: test-label-prefix + annotations: + app.kubernetes.io/instance: test-annotation-prefix spec: minReadySeconds: 5 revisionHistoryLimit: 5