Skip to content

Commit

Permalink
Merge branch 'master' into fix-cron-overriden
Browse files Browse the repository at this point in the history
  • Loading branch information
terrytangyuan authored Jul 19, 2021
2 parents 95cdcb3 + 5f0d6ab commit ed6c36e
Show file tree
Hide file tree
Showing 19 changed files with 149 additions and 7 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## v3.1.2 (2021-07-15)

* [98721a96e](https://github.com/argoproj/argo-workflows/commit/98721a96eef8e4fe9a237b2105ba299a65eaea9a) fixed test
* [6041ffe22](https://github.com/argoproj/argo-workflows/commit/6041ffe228c8f79e6578e097a357dfebf768c78f) fix(controller): Not updating StoredWorkflowSpec when WFT changed during workflow running (#6342)
* [d14760182](https://github.com/argoproj/argo-workflows/commit/d14760182851c280b11d688b70a81f3fe014c52f) fix(cli): v3.1 Argo Auth Token (#6344)
* [ce5679c4b](https://github.com/argoproj/argo-workflows/commit/ce5679c4bd1040fa5d68eea24a4a82ef3844d43c) feat(controller): Store artifact repository in workflow status. Fixes
* [74581157f](https://github.com/argoproj/argo-workflows/commit/74581157f9fd8190027021dd5af409cd3e3e781f) fix(executor): Tolerate docker re-creating containers. Fixes #6244 (#6252)
* [cd208e27f](https://github.com/argoproj/argo-workflows/commit/cd208e27ff0e45f82262b18ebb65081ae5978761) fix(executor): emissary - make /var/run/argo files readable from non-root users. Fixes #6238 (#6304)

### Contributors

* Alex Collins
* Saravanan Balasubramanian
* Yuan (Bob) Gong

## v3.1.1 (2021-06-28)

* [4d12bbfee](https://github.com/argoproj/argo-workflows/commit/4d12bbfee13faea6d2715c809fab40ae33a66074) fix(conttroller): Always set finishedAt dote. Fixes #6135 (#6139)
Expand Down
2 changes: 2 additions & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Currently, the following organizations are **officially** using Argo Workflows:
1. [Admiralty](https://admiralty.io/)
1. [Adobe](https://www.adobe.com/)
1. [Alibaba Cloud](https://www.alibabacloud.com/about)
1. [Alibaba Group](https://www.alibabagroup.com/)
1. [Ant Group](https://www.antgroup.com/)
1. [AppDirect](https://www.appdirect.com/)
1. [Astraea](https://astraea.earth/)
Expand Down Expand Up @@ -127,6 +128,7 @@ Currently, the following organizations are **officially** using Argo Workflows:
1. [Wavefront](https://www.wavefront.com/)
1. [Wellcome Trust](https://wellcome.ac.uk/)
1. [VMware](https://www.vmware.com/)
1. [WooliesX](https://wooliesx.com.au/)
1. [Woolworths Group](https://www.woolworthsgroup.com.au/)
1. [Zhihu](https://www.zhihu.com/)

Expand Down
2 changes: 1 addition & 1 deletion hack/crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func removeCRDValidation(filename string) {
properties := version["schema"].(obj)["openAPIV3Schema"].(obj)["properties"].(obj)
for k := range properties {
if k == "spec" || k == "status" {
properties[k] = obj{"type": "object", "x-kubernetes-preserve-unknown-fields": true}
properties[k] = obj{"type": "object", "x-kubernetes-preserve-unknown-fields": true, "x-kubernetes-map-type": "atomic"}
}
}
data, err = yaml.Marshal(crd)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/minimal/argoproj.io_cronworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/minimal/argoproj.io_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/minimal/argoproj.io_workflowtasksets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/quick-start-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/quick-start-mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/quick-start-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
3 changes: 2 additions & 1 deletion util/kubeconfig/kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ func GetBearerToken(in *restclient.Config, explicitKubeConfigPath string) (strin
}
req := http.Request{Header: map[string][]string{}}

_, _ = rt.RoundTrip(&req)
newT := NewUserAgentRoundTripper("dummy", rt)
_, _ = newT.RoundTrip(&req)

token := req.Header.Get("Authorization")
return strings.TrimPrefix(token, "Bearer "), nil
Expand Down
17 changes: 17 additions & 0 deletions util/kubeconfig/roundtripper.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package kubeconfig

import "net/http"

type userAgentRoundTripper struct {
agent string
rt http.RoundTripper
}

func (rt userAgentRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
req.Header.Set("User-Agent", rt.agent)
return rt.rt.RoundTrip(req)
}

func NewUserAgentRoundTripper(agent string, rt http.RoundTripper) http.RoundTripper {
return &userAgentRoundTripper{agent, rt}
}
Loading

0 comments on commit ed6c36e

Please sign in to comment.