Skip to content

Commit 5cb1621

Browse files
authored
Merge branch 'master' into nginx-tls
2 parents 95c82cc + c4b48f0 commit 5cb1621

29 files changed

Lines changed: 793 additions & 142 deletions

.github/workflows/docker-publish.yml

Lines changed: 52 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -9,66 +9,42 @@ on:
99
# Run tests for any PRs.
1010
pull_request:
1111

12-
permissions:
13-
contents: read
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions: {}
1417

1518
jobs:
16-
docker:
19+
set-vars:
20+
permissions:
21+
contents: read
1722
runs-on: ubuntu-latest
23+
outputs:
24+
controller-meta-tags: ${{ steps.controller-meta.outputs.tags }}
25+
plugin-meta-tags: ${{ steps.plugin-meta.outputs.tags }}
26+
platforms: ${{ steps.platform-matrix.outputs.platform-matrix }}
1827

1928
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v3.1.0
22-
23-
- name: Set up QEMU
24-
uses: docker/setup-qemu-action@v2
25-
26-
- name: Set up Docker Buildx
27-
uses: docker/setup-buildx-action@v2
28-
with:
29-
config-inline: |
30-
[worker.oci]
31-
gc = false
32-
3329
- name: Docker meta (controller)
3430
id: controller-meta
3531
uses: docker/metadata-action@v4
3632
with:
3733
images: |
3834
quay.io/argoproj/argo-rollouts
39-
# ghcr.io/argoproj/argo-rollouts
4035
tags: |
41-
type=ref,event=branch
42-
flavor: |
43-
latest=${{ github.ref == 'refs/heads/master' }}
36+
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/master'}}
37+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
4438
4539
- name: Docker meta (plugin)
4640
id: plugin-meta
4741
uses: docker/metadata-action@v4
4842
with:
4943
images: |
5044
quay.io/argoproj/kubectl-argo-rollouts
51-
# ghcr.io/argoproj/kubectl-argo-rollouts
5245
tags: |
53-
type=ref,event=branch
54-
flavor: |
55-
latest=${{ github.ref == 'refs/heads/master' }}
56-
57-
# - name: Login to GitHub Container Registry
58-
# if: github.event_name != 'pull_request'
59-
# uses: docker/login-action@v2
60-
# with:
61-
# registry: ghcr.io
62-
# username: ${{ github.repository_owner }}
63-
# password: ${{ secrets.GITHUB_TOKEN }}
64-
65-
- name: Login to Quay.io
66-
if: github.event_name != 'pull_request'
67-
uses: docker/login-action@v2
68-
with:
69-
registry: quay.io
70-
username: ${{ secrets.QUAY_USERNAME }}
71-
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
46+
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/master'}}
47+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
7248
7349
# avoid building linux/arm64 for PRs since it takes so long
7450
- name: Set Platform Matrix
@@ -79,73 +55,39 @@ jobs:
7955
then
8056
PLATFORM_MATRIX=$PLATFORM_MATRIX,linux/arm64
8157
fi
82-
echo "::set-output name=platform-matrix::$PLATFORM_MATRIX"
83-
84-
- name: Build and push (controller-image)
85-
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
86-
with:
87-
platforms: ${{ steps.platform-matrix.outputs.platform-matrix }}
88-
push: ${{ github.event_name != 'pull_request' }}
89-
tags: ${{ steps.controller-meta.outputs.tags }}
90-
provenance: false
91-
sbom: false
92-
93-
- name: Build and push (plugin-image)
94-
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
95-
with:
96-
target: kubectl-argo-rollouts
97-
platforms: ${{ steps.platform-matrix.outputs.platform-matrix }}
98-
push: ${{ github.event_name != 'pull_request' }}
99-
tags: ${{ steps.plugin-meta.outputs.tags }}
100-
provenance: false
101-
sbom: false
102-
103-
- name: Install cosign
104-
uses: sigstore/cosign-installer@main
105-
with:
106-
cosign-release: 'v1.13.1'
107-
108-
- name: Install crane to get digest of image
109-
uses: imjasonh/setup-crane@v0.3
110-
111-
- name: Get digest of controller-image
112-
run: |
113-
if [[ "${{ github.ref == 'refs/heads/master' }}" ]]
114-
then
115-
echo "CONTROLLER_DIGEST=$(crane digest quay.io/argoproj/argo-rollouts:latest)" >> $GITHUB_ENV
116-
fi
117-
if [[ "${{ github.ref != 'refs/heads/master' }}" ]]
118-
then
119-
echo "CONTROLLER_DIGEST=$(crane digest ${{ steps.controller-meta.outputs.tags }})" >> $GITHUB_ENV
120-
fi
121-
if: github.event_name != 'pull_request'
122-
123-
- name: Get digest of plugin-image
124-
run: |
125-
if [[ "${{ github.ref == 'refs/heads/master' }}" ]]
126-
then
127-
echo "PLUGIN_DIGEST=$(crane digest quay.io/argoproj/kubectl-argo-rollouts:latest)" >> $GITHUB_ENV
128-
fi
129-
if [[ "${{ github.ref != 'refs/heads/master' }}" ]]
130-
then
131-
echo "PLUGIN_DIGEST=$(crane digest ${{ steps.plugin-meta.outputs.tags }})" >> $GITHUB_ENV
132-
fi
133-
if: github.event_name != 'pull_request'
134-
135-
- name: Sign Argo Rollouts Images
136-
run: |
137-
cosign sign --key env://COSIGN_PRIVATE_KEY quay.io/argoproj/argo-rollouts@${{ env.CONTROLLER_DIGEST }}
138-
cosign sign --key env://COSIGN_PRIVATE_KEY quay.io/argoproj/kubectl-argo-rollouts@${{ env.PLUGIN_DIGEST }}
139-
env:
140-
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
141-
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
142-
if: ${{ github.event_name == 'push' }}
143-
144-
- name: Display the public key to share.
145-
run: |
146-
# Displays the public key to share
147-
cosign public-key --key env://COSIGN_PRIVATE_KEY
148-
env:
149-
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
150-
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
151-
if: ${{ github.event_name == 'push' }}
58+
echo "platform-matrix=$PLATFORM_MATRIX" >> $GITHUB_OUTPUT
59+
60+
build-and-push-controller-image:
61+
needs: [set-vars]
62+
permissions:
63+
contents: read
64+
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
65+
id-token: write # for creating OIDC tokens for signing.
66+
uses: ./.github/workflows/image-reuse.yaml
67+
with:
68+
quay_image_name: ${{ needs.set-vars.outputs.controller-meta-tags }}
69+
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
70+
go-version: 1.19
71+
platforms: ${{ needs.set-vars.outputs.platforms }}
72+
push: ${{ github.event_name != 'pull_request' }}
73+
secrets:
74+
quay_username: ${{ secrets.QUAY_USERNAME }}
75+
quay_password: ${{ secrets.QUAY_ROBOT_TOKEN }}
76+
77+
build-and-push-plugin-image:
78+
needs: [set-vars]
79+
permissions:
80+
contents: read
81+
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
82+
id-token: write # for creating OIDC tokens for signing.
83+
uses: ./.github/workflows/image-reuse.yaml
84+
with:
85+
quay_image_name: ${{ needs.set-vars.outputs.plugin-meta-tags }}
86+
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
87+
go-version: 1.19
88+
platforms: ${{ needs.set-vars.outputs.platforms }}
89+
push: ${{ github.event_name != 'pull_request' }}
90+
target: kubectl-argo-rollouts
91+
secrets:
92+
quay_username: ${{ secrets.QUAY_USERNAME }}
93+
quay_password: ${{ secrets.QUAY_ROBOT_TOKEN }}

.github/workflows/image-reuse.yaml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Publish and Sign Container Image
2+
on:
3+
workflow_call:
4+
inputs:
5+
go-version:
6+
required: true
7+
type: string
8+
quay_image_name:
9+
required: false
10+
type: string
11+
ghcr_image_name:
12+
required: false
13+
type: string
14+
docker_image_name:
15+
required: false
16+
type: string
17+
platforms:
18+
required: true
19+
type: string
20+
default: linux/amd64
21+
push:
22+
required: true
23+
type: boolean
24+
default: false
25+
target:
26+
required: false
27+
type: string
28+
29+
secrets:
30+
quay_username:
31+
required: false
32+
quay_password:
33+
required: false
34+
ghcr_username:
35+
required: false
36+
ghcr_password:
37+
required: false
38+
docker_username:
39+
required: false
40+
docker_password:
41+
required: false
42+
43+
outputs:
44+
image-digest:
45+
description: "sha256 digest of container image"
46+
value: ${{ jobs.publish.outputs.image-digest }}
47+
48+
permissions: {}
49+
50+
jobs:
51+
publish:
52+
permissions:
53+
contents: read
54+
packages: write # Used to push images to `ghcr.io` if used.
55+
id-token: write # Needed to create an OIDC token for keyless signing
56+
runs-on: ubuntu-22.04
57+
outputs:
58+
image-digest: ${{ steps.image.outputs.digest }}
59+
steps:
60+
- name: Checkout code
61+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0
62+
with:
63+
fetch-depth: 0
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
if: ${{ github.ref_type == 'tag'}}
66+
67+
- name: Checkout code
68+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0
69+
if: ${{ github.ref_type != 'tag'}}
70+
71+
- name: Setup Golang
72+
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
73+
with:
74+
go-version: ${{ inputs.go-version }}
75+
76+
- name: Install cosign
77+
uses: sigstore/cosign-installer@dd6b2e2b610a11fd73dd187a43d57cc1394e35f9 # v3.0.5
78+
with:
79+
cosign-release: 'v2.0.2'
80+
81+
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
82+
- uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0
83+
84+
- name: Setup tags for container image as a CSV type
85+
run: |
86+
IMAGE_TAGS=$(for str in \
87+
${{ inputs.quay_image_name }} \
88+
${{ inputs.ghcr_image_name }} \
89+
${{ inputs.docker_image_name}}; do
90+
echo -n "${str}",;done | sed 's/,$//')
91+
92+
echo $IMAGE_TAGS
93+
echo "TAGS=$IMAGE_TAGS" >> $GITHUB_ENV
94+
95+
- name: Setup image namespace for signing, strip off the tag
96+
run: |
97+
TAGS=$(for tag in \
98+
${{ inputs.quay_image_name }} \
99+
${{ inputs.ghcr_image_name }} \
100+
${{ inputs.docker_image_name}}; do
101+
echo -n "${tag}" | awk -F ":" '{print $1}' -;done)
102+
103+
echo $TAGS
104+
echo 'SIGNING_TAGS<<EOF' >> $GITHUB_ENV
105+
echo $TAGS >> $GITHUB_ENV
106+
echo 'EOF' >> $GITHUB_ENV
107+
108+
- name: Login to Quay.io
109+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
110+
with:
111+
registry: quay.io
112+
username: ${{ secrets.quay_username }}
113+
password: ${{ secrets.quay_password }}
114+
if: ${{ inputs.quay_image_name && inputs.push }}
115+
116+
- name: Login to GitHub Container Registry
117+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
118+
with:
119+
registry: ghcr.io
120+
username: ${{ secrets.ghcr_username }}
121+
password: ${{ secrets.ghcr_password }}
122+
if: ${{ inputs.ghcr_image_name && inputs.push }}
123+
124+
- name: Login to dockerhub Container Registry
125+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
126+
with:
127+
username: ${{ secrets.docker_username }}
128+
password: ${{ secrets.docker_password }}
129+
if: ${{ inputs.docker_image_name && inputs.push }}
130+
131+
- name: Build and push container image
132+
id: image
133+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 #v4.0.0
134+
with:
135+
context: .
136+
platforms: ${{ inputs.platforms }}
137+
push: ${{ inputs.push }}
138+
tags: ${{ env.TAGS }}
139+
target: ${{ inputs.target }}
140+
provenance: false
141+
sbom: false
142+
143+
- name: Sign container images
144+
run: |
145+
for signing_tag in $SIGNING_TAGS; do
146+
cosign sign \
147+
-a "repo=${{ github.repository }}" \
148+
-a "workflow=${{ github.workflow }}" \
149+
-a "sha=${{ github.sha }}" \
150+
--yes \
151+
"$signing_tag"@${{ steps.image.outputs.digest }}
152+
done
153+
if: ${{ inputs.push }}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11

2+
<a name="v1.5.1"></a>
3+
## [v1.5.1](https://github.com/argoproj/argo-rollouts/compare/v1.5.0...v1.5.1) (2023-05-24)
4+
5+
### Ci
6+
7+
* use keyless signing for main and release branches ([#2783](https://github.com/argoproj/argo-rollouts/issues/2783))
8+
9+
### Fix
10+
11+
* make new alb fullName field optional for backward compatability ([#2806](https://github.com/argoproj/argo-rollouts/issues/2806))
12+
* properly wrap Datadog API v2 request body ([#2771](https://github.com/argoproj/argo-rollouts/issues/2771)) ([#2775](https://github.com/argoproj/argo-rollouts/issues/2775))
13+
14+
215
<a name="v1.5.0"></a>
316
## [v1.5.0](https://github.com/argoproj/argo-rollouts/compare/v1.5.0-rc1...v1.5.0) (2023-05-05)
417

USERS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit
4545
1. [Ubie](https://ubie.life/)
4646
1. [VISITS Technologies](https://visits.world/en)
4747
1. [Yotpo](https://www.yotpo.com/)
48+
1. [VGS](https://www.vgs.io)

docs/CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ cd ~/go/src/github.com/argoproj/argo-rollouts
7070
go run ./cmd/rollouts-controller/main.go
7171
```
7272

73+
When running locally it will connect to whatever kubernetes cluster you have configured in your kubeconfig. You will need to make sure to install the Argo Rollout CRDs into your local cluster, and have the `argo-rollouts` namespace.
74+
7375
## Running Unit Tests
7476

7577
To run unit tests:

docs/analysis/plugins.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Metric Plugins
22

3-
!!! important Available since v1.5 - Status: Alpha
3+
!!! important
4+
Available since v1.5 - Status: Alpha
45

56
Argo Rollouts supports getting analysis metrics via 3rd party plugin system. This allows users to extend the capabilities of Rollouts
67
to support metric providers that are not natively supported. Rollout's uses a plugin library called
63.3 KB
Loading
File renamed without changes.

docs/features/specification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ spec:
276276
matchTrafficWeight: true
277277

278278
# Sets header based route with specified header values
279-
# Setting header based route will send all 100 traffic to the canary for the requests
280-
# O with a specified header, in this case request header "version":"2"
279+
# Setting header based route will send all traffic to the canary for the requests
280+
# with a specified header, in this case request header "version":"2"
281281
# (supported only with trafficRouting, for Istio only at the moment)
282282
- setHeaderRoute:
283283
# Name of the route that will be created by argo rollouts this must also be configured

0 commit comments

Comments
 (0)