Skip to content

Commit

Permalink
Merge branch 'master' into native-sidecar-status
Browse files Browse the repository at this point in the history
  • Loading branch information
martynd authored Jul 10, 2024
2 parents 0eb4322 + 764f530 commit b4c79af
Show file tree
Hide file tree
Showing 51 changed files with 1,788 additions and 774 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
uses: codecov/[email protected]
with:
file: coverage.out
fail_ci_if_error: true
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/image-reuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ jobs:
with:
cosign-release: 'v2.2.0'

- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
- uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0

- name: Setup tags for container image as a CSV type
run: |
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:

- name: Build and push container image
id: image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 #v5.4.0
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c #v6.3.0
with:
context: .
platforms: ${{ inputs.platforms }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ jobs:
go-version: ${{ env.GOLANG_VERSION }}

- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0

- name: Generate release artifacts
run: |
Expand All @@ -107,7 +107,7 @@ jobs:
make manifests IMAGE_TAG=${{ github.ref_name }}
- name: Draft release
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v0.1.15
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v0.1.15
with:
tag_name: ${{ github.event.inputs.tag }}
draft: true
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
/tmp/sbom.tar.gz
- name: Upload SBOM and signature assets
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v0.1.15
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v0.1.15
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="v1.7.1"></a>
## [v1.7.1](https://github.com/argoproj/argo-rollouts/compare/v1.7.0...v1.7.1) (2024-06-22)

### Fix

* docs site version selector broken ([#3590](https://github.com/argoproj/argo-rollouts/issues/3590))
* don't default datadog aggregator ([#3643](https://github.com/argoproj/argo-rollouts/issues/3643))
* Add volume for plugin and tmp folder ([#3546](https://github.com/argoproj/argo-rollouts/issues/3546))


<a name="v1.7.0"></a>
## [v1.7.0](https://github.com/argoproj/argo-rollouts/compare/v1.7.0-rc1...v1.7.0) (2024-06-12)

Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ make start-e2e E2E_INSTANCE_ID=''
```


6. Working on CRDs? While editing them directly works when you are finding the shape of things you want, the final CRDs are autogenerated. Make sure to regenerate them before submitting PRs. They are controlled by the relevant annotations in the types file:
6. Working on CRDs? While editing them directly works when you are finding the shape of things you want, the final CRDs are autogenerated. Make sure to regenerate them by running `make gen-crd` before submitting PRs. They are controlled by the relevant annotations in the types file:

eg: Analysis Templates are controlled by annotations in `pkg/apis/rollouts/v1alpha1/analysis_types.go`.

Expand Down
41 changes: 41 additions & 0 deletions docs/analysis/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,47 @@ you validate your [PromQL expression](https://prometheus.io/docs/prometheus/late
See the [Analysis Overview page](../../features/analysis) for more details on the available options.
## Range queries
```yaml
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
name: range-query-example
spec:
args:
- name: service-name
- name: lookback-duration
value: 5m
metrics:
- name: success-rate
# checks that all returned values are under 1000ms
successCondition: "all(result, # < 1000)"
failureLimit: 3
provider:
prometheus:
rangeQuery:
# See https://expr-lang.org/docs/language-definition#date-functions
# for value date functions
# The start point to query from
start: 'now() - duration("{{args.lookback-duration}}")'
# The end point to query to
end: 'now()'
# Query resolution width
step: 1m
address: http://prometheus.example.com:9090
query: http_latency_ms{service="{{args.service-name}}"}
```
### Range query and successCondition/failureCondition
Since range queries will usually return multiple values from prometheus. It is important to assert on every value returned. See the following examples:
* ❌ `result[0] < 1000` - this will only check the first value returned
* ✅ `all(result, # < 1000)` - checks every value returns from prometheus

See [expr](https://github.com/expr-lang/expr) for more expression options.

## Authorization

### Utilizing Amazon Managed Prometheus
Expand Down
76 changes: 63 additions & 13 deletions docs/assets/versions.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
setTimeout(function() {
const callbackName = 'callback_' + new Date().getTime();
window[callbackName] = function (response) {
const div = document.createElement('div');
div.innerHTML = response.html;
document.querySelector(".md-header__inner > .md-header__title").appendChild(div);
const container = div.querySelector('.rst-versions');
var caret = document.createElement('div');
caret.innerHTML = "<i class='fa fa-caret-down dropdown-caret'></i>"
caret.classList.add('dropdown-caret')
div.querySelector('.rst-current-version').appendChild(caret);
const targetNode = document.querySelector('.md-header__inner');
const observerOptions = {
childList: true,
subtree: true
};

const observerCallback = function(mutationsList, observer) {
for (let mutation of mutationsList) {
if (mutation.type === 'childList') {
const titleElement = document.querySelector('.md-header__inner > .md-header__title');
if (titleElement) {
initializeVersionDropdown();
observer.disconnect();
}
}
}
};

const observer = new MutationObserver(observerCallback);
observer.observe(targetNode, observerOptions);

function initializeVersionDropdown() {
const callbackName = 'callback_' + new Date().getTime();
window[callbackName] = function(response) {
const div = document.createElement('div');
div.innerHTML = response.html;
document.querySelector(".md-header__inner > .md-header__title").appendChild(div);
const container = div.querySelector('.rst-versions');
var caret = document.createElement('div');
caret.innerHTML = "<i class='fa fa-caret-down dropdown-caret'></i>";
caret.classList.add('dropdown-caret');
div.querySelector('.rst-current-version').appendChild(caret);

div.querySelector('.rst-current-version').addEventListener('click', function() {
container.classList.toggle('shift-up');
});
};

var CSSLink = document.createElement('link');
CSSLink.rel='stylesheet';
Expand All @@ -20,6 +45,31 @@ setTimeout(function() {
script.src = 'https://argo-rollouts.readthedocs.io/_/api/v2/footer_html/?'+
'callback=' + callbackName + '&project=argo-rollouts&page=&theme=mkdocs&format=jsonp&docroot=docs&source_suffix=.md&version=' + (window['READTHEDOCS_DATA'] || { version: 'latest' }).version;
document.getElementsByTagName('head')[0].appendChild(script);
}, 0);

}

// VERSION WARNINGS
window.addEventListener("DOMContentLoaded", function() {
var currentVersion = window.location.href.match(/\/en\/(release-(?:v\d+|\w+)|latest|stable)\//);
var margin = 30;
var headerHeight = document.getElementsByClassName("md-header")[0].offsetHeight;
if (currentVersion && currentVersion.length > 1) {
currentVersion = currentVersion[1];
if (currentVersion === "latest") {
document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the docs for an unreleased version of Argo Rollouts, <a href='https://argoproj.github.io/argo-rollouts/'>click here to go to the latest stable version.</a></div>";
var bannerHeight = document.getElementById('announce-msg').offsetHeight + margin;
document.querySelector("header.md-header").style.top = bannerHeight + "px";
document.querySelector('style').textContent +=
"@media screen and (min-width: 76.25em){ .md-sidebar { height: 0; top:" + (bannerHeight + headerHeight) + "px !important; }}";
document.querySelector('style').textContent +=
"@media screen and (min-width: 60em){ .md-sidebar--secondary { height: 0; top:" + (bannerHeight + headerHeight) + "px !important; }}";
} else if (currentVersion !== "stable") {
document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the docs for a previous version of Argo Rollouts, <a href='https://argoproj.github.io/argo-rollouts/'>click here to go to the latest stable version.</a></div>";
var bannerHeight = document.getElementById('announce-msg').offsetHeight + margin;
document.querySelector("header.md-header").style.top = bannerHeight + "px";
document.querySelector('style').textContent +=
"@media screen and (min-width: 76.25em){ .md-sidebar { height: 0; top:" + (bannerHeight + headerHeight) + "px !important; }}";
document.querySelector('style').textContent +=
"@media screen and (min-width: 60em){ .md-sidebar--secondary { height: 0; top:" + (bannerHeight + headerHeight) + "px !important; }}";
}
}
});
2 changes: 1 addition & 1 deletion docs/features/bluegreen.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BlueGreen Deployment Strategy

A Blue Green Deployment allows users to reduce the amount of time multiple versions running at the same time.
A Blue Green Deployment allows users to reduce the amount of time multiple versions are running at the same time.

## Overview

Expand Down
45 changes: 42 additions & 3 deletions docs/features/kustomize/rollout_cr_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@
"datadog": {
"properties": {
"aggregator": {
"default": "last",
"enum": [
"avg",
"min",
Expand Down Expand Up @@ -4686,6 +4685,20 @@
"query": {
"type": "string"
},
"rangeQuery": {
"properties": {
"end": {
"type": "string"
},
"start": {
"type": "string"
},
"step": {
"type": "string"
}
},
"type": "object"
},
"timeout": {
"format": "int64",
"type": "integer"
Expand Down Expand Up @@ -5082,7 +5095,6 @@
"datadog": {
"properties": {
"aggregator": {
"default": "last",
"enum": [
"avg",
"min",
Expand Down Expand Up @@ -9524,6 +9536,20 @@
"query": {
"type": "string"
},
"rangeQuery": {
"properties": {
"end": {
"type": "string"
},
"start": {
"type": "string"
},
"step": {
"type": "string"
}
},
"type": "object"
},
"timeout": {
"format": "int64",
"type": "integer"
Expand Down Expand Up @@ -9933,7 +9959,6 @@
"datadog": {
"properties": {
"aggregator": {
"default": "last",
"enum": [
"avg",
"min",
Expand Down Expand Up @@ -14375,6 +14400,20 @@
"query": {
"type": "string"
},
"rangeQuery": {
"properties": {
"end": {
"type": "string"
},
"start": {
"type": "string"
},
"step": {
"type": "string"
}
},
"type": "object"
},
"timeout": {
"format": "int64",
"type": "integer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ Start UI dashboard
kubectl argo rollouts dashboard [flags]
```

## Examples

```shell
# Start UI dashboard
kubectl argo rollouts dashboard

# Start UI dashboard on a specific port
kubectl argo rollouts dashboard --port 8080
```

## Options

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ kubectl argo rollouts get rollout guestbook

# Watch progress of a rollout
kubectl argo rollouts get rollout guestbook -w

# Watch the rollout, fail if it takes more than 60 seconds
kubectl argo rollouts get rollout guestbook -w --timeout-seconds 60
```

## Options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ kubectl argo rollouts list experiments --watch
## Options

```
--all-namespaces Include all namespaces
-A, --all-namespaces Include all namespaces
-h, --help help for experiments
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ kubectl argo rollouts list rollouts [flags]
# List rollouts
kubectl argo rollouts list rollouts

# List rollouts with a specific name
kubectl argo rollouts list rollouts --name my-rollout

# List rollouts from all namespaces
kubectl argo rollouts list rollouts --all-namespaces

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ kubectl argo rollouts set image ROLLOUT_NAME CONTAINER=IMAGE [flags]
## Examples

```shell
# Set rollout image
kubectl argo rollouts set image my-rollout www=image:v2
# Set rollout image (containers contains 'initContainer', 'container', 'ephemeralContainer')
kubectl argo rollouts set image my-rollout containerName=imageName

# Set rollout image for all containers
kubectl argo rollouts set image my-rollout *=imageName
```

## Options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ kubectl argo rollouts status ROLLOUT_NAME [flags]
# Watch the rollout until it succeeds
kubectl argo rollouts status guestbook

# Show the rollout status
kubectl argo rollouts status guestbook --watch false

# Watch the rollout until it succeeds, fail if it takes more than 60 seconds
kubectl argo rollouts status --timeout 60s guestbook

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ kubectl argo rollouts terminate <analysisrun|experiment> RESOURCE_NAME [flags]
## Examples

```shell
# Terminate an analysisRun
# Terminate an AnalysisRun
kubectl argo rollouts terminate analysisrun guestbook-877894d5b-4-success-rate.1

# Terminate a failed experiment
Expand Down
Loading

0 comments on commit b4c79af

Please sign in to comment.