Skip to content

Configurable container images for cert-csi#53

Merged
suryagupta4 merged 5 commits intomainfrom
feature/configurable-images
Dec 4, 2023
Merged

Configurable container images for cert-csi#53
suryagupta4 merged 5 commits intomainfrom
feature/configurable-images

Conversation

@rishabhatdell
Copy link
Copy Markdown
Contributor

@rishabhatdell rishabhatdell commented Dec 1, 2023

Description

This PR allows cert-csi to use custom images for creating containers by passing an image config YAML file as an argument. The YAML file should have linux(test) and postgres images name with their corresponding image URL. For example:

images:
  - test: "docker.io/centos:centos7"
    postgres: "docker.io/bitnami/postgresql:11.8.0-debian-10-r72"

To use this feature, run cert-csi with the option --image-config /path/to/config.yaml along with any other arguments.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1059

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Built binary and executed unit tests
    image

  • Executed the cert-csi to verify whether the provided image was utilized in the container build process
    287244359-8c8bdbe3-6996-4bcc-93bd-c99e8daea067

Comment thread pkg/testcore/suites/functional-suites.go Outdated
@atye
Copy link
Copy Markdown
Contributor

atye commented Dec 1, 2023

Will there be a csm-docs update describing how to use this?

}

if cts.Image == "" {
log.Info("Using default image")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we enhance this log by stating that 'docker.io/centos:latest' is the default image?

Comment thread pkg/cmd/testcmd.go Outdated
size := c.String("size")
accessMode := c.String("access-mode")
imageConfigPath := c.String("image-config")
var testImage string
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rishabhatdell , what are your thoughts on incorporating a generic/common function to eliminate code duplication? It seems we've duplicated the same logic across multiple sections, checking for the same conditions in each suite.

@rishabhatdell
Copy link
Copy Markdown
Contributor Author

Will there be a csm-docs update describing how to use this?

here is the PR: dell/csm-docs#928

Copy link
Copy Markdown
Contributor

@gallacher gallacher left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@AkshaySainiDell AkshaySainiDell left a comment

Choose a reason for hiding this comment

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

LGTM

@suryagupta4 suryagupta4 merged commit 934c398 into main Dec 4, 2023
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.

6 participants