Skip to content

Commit

Permalink
cleanup output by removing optional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
sclevine committed Nov 21, 2024
1 parent e3b40eb commit e95b068
Show file tree
Hide file tree
Showing 31 changed files with 3 additions and 67 deletions.
6 changes: 3 additions & 3 deletions lib/autoupdate/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ type UpdateSpec struct {
// Proxy address
Proxy string `yaml:"proxy"`
// Group specifies the update group identifier for the agent.
Group string `yaml:"group"`
Group string `yaml:"group,omitempty"`
// URLTemplate for the Teleport tgz download URL.
URLTemplate string `yaml:"url_template"`
URLTemplate string `yaml:"url_template,omitempty"`
// Enabled controls whether auto-updates are enabled.
Enabled bool `yaml:"enabled"`
// Pinned controls whether the active_version is pinned.
Expand All @@ -72,7 +72,7 @@ type UpdateStatus struct {
// BackupVersion is the last working version of Teleport.
BackupVersion string `yaml:"backup_version"`
// SkipVersion is the last reverted version of Teleport.
SkipVersion string `yaml:"skip_version"`
SkipVersion string `yaml:"skip_version,omitempty"`
}

// readConfig reads UpdateConfig from a file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ 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 @@ -2,11 +2,8 @@ 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 @@ -2,11 +2,8 @@ version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: ""
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 @@ -2,11 +2,8 @@ version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: ""
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 @@ -2,11 +2,8 @@ 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 @@ -2,11 +2,8 @@ version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: ""
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 @@ -9,4 +9,3 @@ spec:
status:
active_version: 16.3.0
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ spec:
status:
active_version: new-version
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ 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 @@ -2,11 +2,9 @@ version: v1
kind: update_config
spec:
proxy: ""
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 @@ -2,11 +2,8 @@ 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 @@ -2,11 +2,8 @@ version: ""
kind: ""
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 @@ -2,11 +2,8 @@ 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 @@ -2,11 +2,8 @@ version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: ""
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 @@ -2,11 +2,9 @@ version: v1
kind: update_config
spec:
proxy: localhost
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 @@ -2,11 +2,9 @@ version: v1
kind: update_config
spec:
proxy: localhost
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 @@ -2,11 +2,9 @@ version: v1
kind: update_config
spec:
proxy: localhost
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 @@ -2,11 +2,9 @@ version: v1
kind: update_config
spec:
proxy: localhost
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 @@ -2,11 +2,8 @@ version: v1
kind: update_config
spec:
proxy: localhost
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 @@ -2,11 +2,8 @@ version: ""
kind: ""
spec:
proxy: localhost
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 @@ -2,11 +2,9 @@ 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 @@ -2,7 +2,6 @@ version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: https://example.com
enabled: true
pinned: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: https://example.com
enabled: true
pinned: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: https://example.com
enabled: true
pinned: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ spec:
status:
active_version: old-version
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ spec:
status:
active_version: old-version
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ spec:
status:
active_version: 16.3.0
backup_version: old-version
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ spec:
status:
active_version: old-version
backup_version: ""
skip_version: ""
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ version: v1
kind: update_config
spec:
proxy: localhost
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 @@ -2,11 +2,9 @@ version: v1
kind: update_config
spec:
proxy: localhost
group: ""
url_template: https://example.com
enabled: true
pinned: false
status:
active_version: 16.3.0
backup_version: ""
skip_version: ""

0 comments on commit e95b068

Please sign in to comment.