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
f9130d53
Commit
f9130d53
authored
May 30, 2024
by
Brad Davidson
Committed by
Brad Davidson
May 31, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix embedded mirror blocked by SAR RBAC and re-enable test
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
7a0ea3c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
e2e.yaml
.github/workflows/e2e.yaml
+2
-4
https.go
pkg/agent/https/https.go
+5
-1
Vagrantfile
tests/e2e/embeddedmirror/Vagrantfile
+6
-0
No files found.
.github/workflows/e2e.yaml
View file @
f9130d53
...
...
@@ -36,8 +36,7 @@ jobs:
strategy
:
fail-fast
:
false
matrix
:
# TODO fix embeddedmirror and add it to the matrix
etest
:
[
startup
,
s3
,
btrfs
,
externalip
,
privateregistry
,
wasm
]
etest
:
[
startup
,
s3
,
btrfs
,
externalip
,
privateregistry
,
embeddedmirror
,
wasm
]
max-parallel
:
3
steps
:
-
name
:
"
Checkout"
...
...
@@ -116,4 +115,4 @@ jobs:
chmod +x ./dist/artifacts/k3s
. ./tests/docker/test-helpers
. ./tests/docker/test-run-${{ matrix.dtest }}
echo "Did test-run-${{ matrix.dtest }} pass $?"
\ No newline at end of file
echo "Did test-run-${{ matrix.dtest }} pass $?"
pkg/agent/https/https.go
View file @
f9130d53
...
...
@@ -75,7 +75,11 @@ func Start(ctx context.Context, nodeConfig *config.Node, runtime *config.Control
}
authz
:=
options
.
NewDelegatingAuthorizationOptions
()
authz
.
AlwaysAllowPaths
=
[]
string
{
"/v2"
,
"/debug/pprof"
,
"/v1-"
+
version
.
Program
+
"/p2p"
}
authz
.
AlwaysAllowPaths
=
[]
string
{
// skip authz for paths that should not use SubjectAccessReview; basically everything that will use this router other than metrics
"/v1-"
+
version
.
Program
+
"/p2p"
,
// spegel libp2p peer discovery
"/v2/*"
,
// spegel registry mirror
"/debug/pprof/*"
,
// profiling
}
authz
.
RemoteKubeConfigFile
=
nodeConfig
.
AgentConfig
.
KubeConfigKubelet
if
applyErr
:=
authz
.
ApplyTo
(
&
config
.
Authorization
);
applyErr
!=
nil
{
err
=
applyErr
...
...
tests/e2e/embeddedmirror/Vagrantfile
View file @
f9130d53
...
...
@@ -38,6 +38,9 @@ def provision(vm, role, role_num, node_num)
if
role
.
include?
(
"server"
)
&&
role_num
==
0
vm
.
provision
"private-registry"
,
type:
"shell"
,
inline:
writePrivateRegistry
vm
.
provision
"create-images-dir"
,
type:
"shell"
,
inline:
"mkdir -p -m 777 /tmp/images /var/lib/rancher/k3s/agent/images"
vm
.
provision
"copy-images-file"
,
type:
"file"
,
source:
"../../../scripts/airgap/image-list.txt"
,
destination:
"/tmp/images/image-list.txt"
vm
.
provision
"move-images-file"
,
type:
"shell"
,
inline:
"mv /tmp/images/image-list.txt /var/lib/rancher/k3s/agent/images/image-list.txt"
vm
.
provision
'k3s-primary-server'
,
type:
'k3s'
,
run:
'once'
do
|
k3s
|
k3s
.
args
=
"server "
...
...
@@ -54,6 +57,9 @@ def provision(vm, role, role_num, node_num)
elsif
role
.
include?
(
"server"
)
&&
role_num
!=
0
vm
.
provision
"shell"
,
inline:
writePrivateRegistry
vm
.
provision
"create-images-dir"
,
type:
"shell"
,
inline:
"mkdir -p -m 777 /tmp/images /var/lib/rancher/k3s/agent/images"
vm
.
provision
"copy-images-file"
,
type:
"file"
,
source:
"../../../scripts/airgap/image-list.txt"
,
destination:
"/tmp/images/image-list.txt"
vm
.
provision
"move-images-file"
,
type:
"shell"
,
inline:
"mv /tmp/images/image-list.txt /var/lib/rancher/k3s/agent/images/image-list.txt"
vm
.
provision
'k3s-secondary-server'
,
type:
'k3s'
,
run:
'once'
do
|
k3s
|
k3s
.
args
=
"server"
...
...
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