Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b43c8e45
Unverified
Commit
b43c8e45
authored
Dec 17, 2019
by
Erik Wilson
Committed by
GitHub
Dec 17, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1213 from erikwilson/containerd-patch-3889
Apply containerd patch 3889
parents
14aa455e
6875b11d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
go.mod
go.mod
+1
-1
go.sum
go.sum
+0
-0
templates.go
pkg/agent/templates/templates.go
+1
-1
authorizer.go
...ub.com/containerd/containerd/remotes/docker/authorizer.go
+7
-7
modules.txt
vendor/modules.txt
+1
-1
No files found.
go.mod
View file @
b43c8e45
...
@@ -7,7 +7,7 @@ replace (
...
@@ -7,7 +7,7 @@ replace (
github.com/containerd/btrfs => github.com/containerd/btrfs v0.0.0-20181101203652-af5082808c83
github.com/containerd/btrfs => github.com/containerd/btrfs v0.0.0-20181101203652-af5082808c83
github.com/containerd/cgroups => github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601
github.com/containerd/cgroups => github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601
github.com/containerd/console => github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50
github.com/containerd/console => github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50
github.com/containerd/containerd => github.com/rancher/containerd v1.3.0-k3s.
4
github.com/containerd/containerd => github.com/rancher/containerd v1.3.0-k3s.
5
github.com/containerd/continuity => github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02
github.com/containerd/continuity => github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02
github.com/containerd/cri => github.com/rancher/cri v1.3.0-k3s.3
github.com/containerd/cri => github.com/rancher/cri v1.3.0-k3s.3
github.com/containerd/fifo => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c
github.com/containerd/fifo => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c
...
...
go.sum
View file @
b43c8e45
This diff is collapsed.
Click to expand it.
pkg/agent/templates/templates.go
View file @
b43c8e45
...
@@ -54,7 +54,7 @@ const ContainerdConfigTemplate = `
...
@@ -54,7 +54,7 @@ const ContainerdConfigTemplate = `
{{ if $v.Auth.Username }}username = "{{ $v.Auth.Username }}"{{end}}
{{ if $v.Auth.Username }}username = "{{ $v.Auth.Username }}"{{end}}
{{ if $v.Auth.Password }}password = "{{ $v.Auth.Password }}"{{end}}
{{ if $v.Auth.Password }}password = "{{ $v.Auth.Password }}"{{end}}
{{ if $v.Auth.Auth }}auth = "{{ $v.Auth.Auth }}"{{end}}
{{ if $v.Auth.Auth }}auth = "{{ $v.Auth.Auth }}"{{end}}
{{ if $v.Auth.IdentityToken }}identity
_
token = "{{ $v.Auth.IdentityToken }}"{{end}}
{{ if $v.Auth.IdentityToken }}identitytoken = "{{ $v.Auth.IdentityToken }}"{{end}}
{{end}}
{{end}}
{{ if $v.TLS }}
{{ if $v.TLS }}
[plugins.cri.registry.configs."{{$k}}".tls]
[plugins.cri.registry.configs."{{$k}}".tls]
...
...
vendor/github.com/containerd/containerd/remotes/docker/authorizer.go
View file @
b43c8e45
...
@@ -196,10 +196,11 @@ func (a *dockerAuthorizer) generateTokenOptions(ctx context.Context, host string
...
@@ -196,10 +196,11 @@ func (a *dockerAuthorizer) generateTokenOptions(ctx context.Context, host string
}
}
scope
,
ok
:=
c
.
parameters
[
"scope"
]
scope
,
ok
:=
c
.
parameters
[
"scope"
]
if
!
ok
{
if
ok
{
return
tokenOptions
{},
errors
.
Errorf
(
"no scope specified for token auth challenge"
)
to
.
scopes
=
append
(
to
.
scopes
,
scope
)
}
else
{
log
.
G
(
ctx
)
.
WithField
(
"host"
,
host
)
.
Debug
(
"no scope specified for token auth challenge"
)
}
}
to
.
scopes
=
append
(
to
.
scopes
,
scope
)
if
a
.
credentials
!=
nil
{
if
a
.
credentials
!=
nil
{
to
.
username
,
to
.
secret
,
err
=
a
.
credentials
(
host
)
to
.
username
,
to
.
secret
,
err
=
a
.
credentials
(
host
)
...
@@ -273,9 +274,6 @@ func (ah *authHandler) doBearerAuth(ctx context.Context) (string, error) {
...
@@ -273,9 +274,6 @@ func (ah *authHandler) doBearerAuth(ctx context.Context) (string, error) {
to
:=
ah
.
common
to
:=
ah
.
common
to
.
scopes
=
getTokenScopes
(
ctx
,
to
.
scopes
)
to
.
scopes
=
getTokenScopes
(
ctx
,
to
.
scopes
)
if
len
(
to
.
scopes
)
==
0
{
return
""
,
errors
.
Errorf
(
"no scope specified for token auth challenge"
)
}
// Docs: https://docs.docker.com/registry/spec/auth/scope
// Docs: https://docs.docker.com/registry/spec/auth/scope
scoped
:=
strings
.
Join
(
to
.
scopes
,
" "
)
scoped
:=
strings
.
Join
(
to
.
scopes
,
" "
)
...
@@ -332,7 +330,9 @@ type postTokenResponse struct {
...
@@ -332,7 +330,9 @@ type postTokenResponse struct {
func
(
ah
*
authHandler
)
fetchTokenWithOAuth
(
ctx
context
.
Context
,
to
tokenOptions
)
(
string
,
error
)
{
func
(
ah
*
authHandler
)
fetchTokenWithOAuth
(
ctx
context
.
Context
,
to
tokenOptions
)
(
string
,
error
)
{
form
:=
url
.
Values
{}
form
:=
url
.
Values
{}
form
.
Set
(
"scope"
,
strings
.
Join
(
to
.
scopes
,
" "
))
if
len
(
to
.
scopes
)
>
0
{
form
.
Set
(
"scope"
,
strings
.
Join
(
to
.
scopes
,
" "
))
}
form
.
Set
(
"service"
,
to
.
service
)
form
.
Set
(
"service"
,
to
.
service
)
// TODO: Allow setting client_id
// TODO: Allow setting client_id
form
.
Set
(
"client_id"
,
"containerd-client"
)
form
.
Set
(
"client_id"
,
"containerd-client"
)
...
...
vendor/modules.txt
View file @
b43c8e45
...
@@ -151,7 +151,7 @@ github.com/container-storage-interface/spec/lib/go/csi
...
@@ -151,7 +151,7 @@ github.com/container-storage-interface/spec/lib/go/csi
github.com/containerd/cgroups
github.com/containerd/cgroups
# github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 => github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50
# github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 => github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50
github.com/containerd/console
github.com/containerd/console
# github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69 => github.com/rancher/containerd v1.3.0-k3s.
4
# github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69 => github.com/rancher/containerd v1.3.0-k3s.
5
github.com/containerd/containerd
github.com/containerd/containerd
github.com/containerd/containerd/api/events
github.com/containerd/containerd/api/events
github.com/containerd/containerd/api/services/containers/v1
github.com/containerd/containerd/api/services/containers/v1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment