Skip to content

Commit

Permalink
[teleport-update] Add support for version pinning (#49307)
Browse files Browse the repository at this point in the history
* pinning

* cleanup

* unskip

* cleanup

* unpin

* typo
  • Loading branch information
sclevine authored Nov 21, 2024
1 parent 1989776 commit 63838a3
Show file tree
Hide file tree
Showing 35 changed files with 446 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: ""
enabled: false
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: ""
enabled: false
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ spec:
proxy: localhost
group: ""
url_template: ""
enabled: true
enabled: false
pinned: false
status:
active_version: 16.3.0
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ spec:
proxy: localhost
group: ""
url_template: ""
enabled: true
enabled: false
pinned: false
status:
active_version: 16.3.0
backup_version: backup-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ spec:
proxy: localhost
group: ""
url_template: ""
enabled: true
enabled: false
pinned: false
status:
active_version: 16.3.0
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ spec:
proxy: localhost
group: ""
url_template: ""
enabled: true
enabled: false
pinned: false
status:
active_version: 16.3.0
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: group
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: 16.3.0
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: new-group
url_template: https://example.com/new
enabled: true
pinned: false
status:
active_version: new-version
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ spec:
proxy: localhost
group: ""
url_template: ""
enabled: true
enabled: false
pinned: false
status:
active_version: 16.3.0
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: http://example.com
enabled: false
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: ""
enabled: false
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: ""
enabled: false
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: ""
enabled: false
pinned: false
status:
active_version: 16.3.0
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ spec:
proxy: localhost
group: ""
url_template: ""
enabled: true
enabled: false
pinned: false
status:
active_version: 16.3.0
backup_version: ""
skip_version: ""
12 changes: 12 additions & 0 deletions lib/autoupdate/agent/testdata/TestUpdater_Unpin/not_pinned.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v1
kind: update_config
spec:
proxy: ""
group: ""
url_template: ""
enabled: false
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
12 changes: 12 additions & 0 deletions lib/autoupdate/agent/testdata/TestUpdater_Unpin/pinned.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v1
kind: update_config
spec:
proxy: ""
group: ""
url_template: ""
enabled: false
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: 16.3.0
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: 16.3.0
backup_version: backup-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: 16.3.0
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: http://example.com
enabled: true
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: ""
enabled: true
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: ""
enabled: false
pinned: false
status:
active_version: ""
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: https://example.com
enabled: true
pinned: true
status:
active_version: old-version
backup_version: backup-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: old-version
backup_version: backup-version
skip_version: 16.3.0
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: old-version
backup_version: backup-version
skip_version: 16.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: old-version
backup_version: backup-version
skip_version: 16.3.0
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: group
url_template: https://example.com
enabled: false
pinned: false
status:
active_version: old-version
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: group
url_template: https://example.com
enabled: false
pinned: false
status:
active_version: old-version
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: group
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: 16.3.0
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: group
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: old-version
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: 16.3.0
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ spec:
group: ""
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: 16.3.0
backup_version: ""
skip_version: ""
Loading

0 comments on commit 63838a3

Please sign in to comment.