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

adding PyxisHost value to ContainerCheckConfig for ubi check #1212

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions container/check_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func (c *containerCheck) resolve(ctx context.Context) error {
DockerConfig: c.dockerconfigjson,
PyxisAPIToken: c.pyxisToken,
CertificationProjectID: c.certificationProjectID,
PyxisHost: c.pyxisHost,
})
if err != nil {
return fmt.Errorf("%w: %s", preflighterr.ErrCannotInitializeChecks, err)
Expand Down
6 changes: 3 additions & 3 deletions internal/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ func InitializeOperatorChecks(ctx context.Context, p policy.Policy, cfg Operator

// ContainerCheckConfig contains configuration relevant to an individual check's execution.
type ContainerCheckConfig struct {
DockerConfig, PyxisAPIToken, CertificationProjectID string
DockerConfig, PyxisAPIToken, CertificationProjectID, PyxisHost string
}

// InitializeContainerChecks returns the appropriate checks for policy p given cfg.
Expand All @@ -769,7 +769,7 @@ func InitializeContainerChecks(ctx context.Context, p policy.Policy, cfg Contain
&containerpol.RunAsNonRootCheck{},
&containerpol.HasModifiedFilesCheck{},
containerpol.NewBasedOnUbiCheck(pyxis.NewPyxisClient(
check.DefaultPyxisHost,
cfg.PyxisHost,
cfg.PyxisAPIToken,
cfg.CertificationProjectID,
&http.Client{Timeout: 60 * time.Second})),
Expand All @@ -783,7 +783,7 @@ func InitializeContainerChecks(ctx context.Context, p policy.Policy, cfg Contain
&containerpol.HasRequiredLabelsCheck{},
&containerpol.HasModifiedFilesCheck{},
containerpol.NewBasedOnUbiCheck(pyxis.NewPyxisClient(
check.DefaultPyxisHost,
cfg.PyxisHost,
cfg.PyxisAPIToken,
cfg.CertificationProjectID,
&http.Client{Timeout: 60 * time.Second})),
Expand Down
Loading