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

sonobuoy-test-agent: pass '--sonobuoy-image' to 'sonobuoy run' #801

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

etungsten
Copy link
Contributor

@etungsten etungsten commented Mar 28, 2023

Issue number:
Resolves #797

Description of changes:

    sonobuoy-test-agent: pass '--sonobuoy-image' to 'sonobuoy run'
    
    In airgapped testing environments, sonobuoy might not have access to the
    Sonobuoy container image for the worker and aggregator pods.
    
    This lets us configure the source of that image to point to a mirror
    image repo.

Testing done:

sonobuoy-test-agent configuration:

Spec:
  Agent:
    Capabilities:
    Configuration:
      Assume Role:             <nil>
      e2eRepoConfigBase64:   <blah>
      Kube Conformance Image:  123.dkr.ecr.cn-north-1.amazonaws.com.cn/conformance:v1.25.6
      kubeconfigBase64:        ${x86-64-aws-k8s-125.encodedKubeconfig}
      Kubernetes Version:      <nil>
      Mode:                    certified-conformance
      Plugin:                  e2e
      Sonobuoy Image:          123.dkr.ecr.cn-north-1.amazonaws.com.cn/sonobuoy:v0.56.4
    Image:                     123.dkr.ecr.cn-north-1.amazonaws.com.cn/testsys:sonobuoy-test-agent-etung-test
    Keep Running:              false
    Name:                      agent
    Privileged:                <nil>
    Pull Secret:               <nil>
    Secrets:
    Timeout:  <nil>

Checking the sonobuoy pod in the target test cluster, and it shows the expected image:

$ kubectl --kubeconfig ../bottlerocket_release_scripts/shared-testing/cn-x86-64-aws-k8s-125-config describe pod sonobuoy -n sonobuoy
...
Name:         sonobuoy
Namespace:    sonobuoy
Priority:     0
Node:         ip-192-168-78-55.cn-north-1.compute.internal/192.168.78.55
Start Time:   Wed, 29 Mar 2023 00:18:02 +0000
Status:       Running
IP:           192.168.66.124
IPs:
  IP:  192.168.66.124
Containers:
  kube-sonobuoy:
    Container ID:  containerd://dd4b0de1a1bfbf973da29086e64b0f67e4ea930422b252e2aa0c19b2a3b07799
    Image:         123.dkr.ecr.cn-north-1.amazonaws.com.cn/sonobuoy:v0.56.4
    Image ID:      123.dkr.ecr.cn-north-1.amazonaws.com.cn/sonobuoy@sha256:be5e6a32469df1409c647c2a45b6bb1da40d67af1a49175c10928f0b62f161b3
    Port:          <none>
    Host Port:     <none>
..

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

In airgapped testing environments, sonobuoy might not have access to the
Sonobuoy container image for the worker and aggregator pods.

This lets us configure the source of that image to point to a mirror
image repo.
@etungsten etungsten requested a review from ecpullen March 28, 2023 21:22
Copy link
Contributor

@ecpullen ecpullen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@etungsten etungsten marked this pull request as ready for review March 29, 2023 00:52
@etungsten etungsten requested review from webern and mjsterckx March 29, 2023 00:52
@etungsten etungsten merged commit aa3fd83 into bottlerocket-os:develop Mar 29, 2023
@etungsten etungsten deleted the sonobuoy-image branch March 29, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sonobuoy-test-agent: support specifying --sonobuoy-image to override the Sonobuoy image URI
3 participants