Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.12 Backports 2023-06-06 #25919

Merged
merged 2 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/helm-values.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion install/kubernetes/Makefile.values
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export CERTGEN_VERSION:=v0.1.8@sha256:4a456552a5f192992a6edcec2febb1c54870d66517
export CILIUM_ETCD_OPERATOR_REPO:=quay.io/cilium/cilium-etcd-operator
export CILIUM_ETCD_OPERATOR_VERSION:=v2.0.7@sha256:04b8327f7f992693c2cb483b999041ed8f92efc8e14f2a5f3ab95574a65ea2dc
export CILIUM_NODEINIT_REPO:=quay.io/cilium/startup-script
export CILIUM_NODEINIT_VERSION:=d69851597ea019af980891a4628fb36b7880ec26
export CILIUM_NODEINIT_VERSION:=62093c5c233ea914bfa26a10ba41f8780d9b737f
export CILIUM_OPERATOR_BASE_REPO:=quay.io/cilium/operator

export ETCD_REPO:=quay.io/coreos/etcd
Expand Down
2 changes: 1 addition & 1 deletion install/kubernetes/cilium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ contributors across the globe, there is almost always someone available to help.
| nodeinit.bootstrapFile | string | `"/tmp/cilium-bootstrap.d/cilium-bootstrap-time"` | bootstrapFile is the location of the file where the bootstrap timestamp is written by the node-init DaemonSet |
| nodeinit.enabled | bool | `false` | Enable the node initialization DaemonSet |
| nodeinit.extraEnv | list | `[]` | Additional nodeinit environment variables. |
| nodeinit.image | object | `{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/startup-script","tag":"d69851597ea019af980891a4628fb36b7880ec26"}` | node-init image. |
| nodeinit.image | object | `{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/startup-script","tag":"62093c5c233ea914bfa26a10ba41f8780d9b737f"}` | node-init image. |
| nodeinit.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for nodeinit pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ |
| nodeinit.podAnnotations | object | `{}` | Annotations to be added to node-init pods. |
| nodeinit.podLabels | object | `{}` | Labels to be added to node-init pods. |
Expand Down
2 changes: 1 addition & 1 deletion install/kubernetes/cilium/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ nodeinit:
image:
override: ~
repository: "quay.io/cilium/startup-script"
tag: "d69851597ea019af980891a4628fb36b7880ec26"
tag: "62093c5c233ea914bfa26a10ba41f8780d9b737f"
pullPolicy: "IfNotPresent"

# -- The priority class to use for the nodeinit pod.
Expand Down
25 changes: 24 additions & 1 deletion test/helpers/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -3237,7 +3237,7 @@ func (kub *Kubectl) CiliumReport(commands ...string) {
defer cancel()

var wg sync.WaitGroup
wg.Add(2)
wg.Add(3)

go func() {
defer wg.Done()
Expand All @@ -3249,6 +3249,11 @@ func (kub *Kubectl) CiliumReport(commands ...string) {
kub.DumpCiliumCommandOutput(ctx, CiliumNamespace)
}()

go func() {
defer wg.Done()
kub.CollectSysdump(ctx)
}()

kub.CiliumCheckReport(ctx)

pods, err := kub.GetCiliumPodsContext(ctx, CiliumNamespace)
Expand All @@ -3275,6 +3280,24 @@ func (kub *Kubectl) CiliumReport(commands ...string) {
}
}

func (kub *Kubectl) CollectSysdump(ctx context.Context) {
testPath, err := CreateReportDirectory()
if err != nil {
log.WithError(err).Errorf("cannot create test result path '%s'", testPath)
return
}

logsPath := filepath.Join(kub.BasePath(), testPath)

// We need to get into the root directory because the CLI doesn't yet
// support absolute path. Once https://github.com/cilium/cilium-cli/pull/1552
// is installed in test VM images, we can remove this.
res := kub.ExecContext(ctx, fmt.Sprintf("cd / && cilium-cli sysdump --output-filename %s/cilium-sysdump", logsPath))
if !res.WasSuccessful() {
log.WithError(res.GetError()).Errorf("failed to collect sysdump")
}
}

// CiliumCheckReport prints a few checks on the Junit output to provide more
// context to users. The list of checks that prints are the following:
// - Number of Kubernetes and Cilium policies installed.
Expand Down