Skip to content

Commit 7c0b642

Browse files
author
Menno Smits
committed
component/all: Machine downloads of unit resources
For model migrations, machine agents (specifically the migrationmaster worker) needs to be able to download unit resources.
1 parent e6b4909 commit 7c0b642

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

component/all/resource.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ func (r resources) registerHookContextFacade() {
210210
func (r resources) registerUnitDownloadEndpoint() {
211211
common.RegisterAPIModelEndpoint(privateapi.HTTPEndpointPattern, apihttp.HandlerSpec{
212212
Constraints: apihttp.HandlerConstraints{
213-
AuthKinds: []string{names.UnitTagKind},
213+
// Machines are allowed too so that unit resources can be
214+
// retrieved for model migrations.
215+
AuthKinds: []string{names.UnitTagKind, names.MachineTagKind},
214216
StrictValidation: true,
215217
ControllerModelOnly: false,
216218
},

0 commit comments

Comments
 (0)