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

Implements copying codeModules from image. #729

Merged
merged 18 commits into from
Apr 29, 2022

Conversation

0sewa0
Copy link
Contributor

@0sewa0 0sewa0 commented Apr 15, 2022

Description

This change gets the image specified in the codeModulesImage field and unpacks it's contents into the right place using the csi-driver. The outcome is meant to be the same as getting the zip from the tenant, but this way the user can scan the contents of the image they want us to install.

Some extra logic had to be added where the version is important (creating the symlink) as the image not necessarily has this information plainly available.

How can this be tested?

  1. Create an image with the codeModules inside that you want to use.
  2. Set the codeModulesImage to that image.
    • make sure that the operator can "pull" that image, use a custom pull-secret if needed
    • WARNING: if you use a custom-pull secret, but still want to get the (host) oneagent images from your tenant, you must have the necessary creds in your custom-pull secret to access the tenant, and cloudNative injection will fail if you don't have running oneagents in your cluster. (Using applicationMonitoring with csi-driver for testing is simpler 😉 .)
  3. Deploy the dynakube and some sample apps, and make sure everything works as expected.
    • You can exec into the pod of the csi-driver and check if everything was downloaded properly. (/data/<tenant>/bin/<image-tag>)

Checklist

  • Unit tests have been updated/added
  • PR is labeled accordingly

@0sewa0 0sewa0 added the core Changes to core functionality of the Operator label Apr 15, 2022
@0sewa0 0sewa0 requested a review from a team as a code owner April 15, 2022 11:32
@0sewa0 0sewa0 marked this pull request as draft April 15, 2022 11:34
@0sewa0 0sewa0 added oneagent Changes related to Oneagent and removed core Changes to core functionality of the Operator labels Apr 15, 2022
src/controllers/csi/provisioner/agent_test.go Outdated Show resolved Hide resolved
src/controllers/dynakube/updates/version.go Outdated Show resolved Hide resolved
src/dockerconfig/docker_config.go Outdated Show resolved Hide resolved
src/installer/image_unpack.go Outdated Show resolved Hide resolved
src/installer/image_unpack.go Outdated Show resolved Hide resolved
src/installer/zip.go Outdated Show resolved Hide resolved
src/installer/zip.go Outdated Show resolved Hide resolved
src/installer/zip.go Outdated Show resolved Hide resolved
src/controllers/csi/provisioner/agent.go Outdated Show resolved Hide resolved
src/controllers/dynakube/updates/version.go Show resolved Hide resolved
@0sewa0 0sewa0 requested a review from meik99 April 22, 2022 14:02
@0sewa0 0sewa0 marked this pull request as ready for review April 22, 2022 14:02
@0sewa0 0sewa0 requested review from a team and baichinger April 22, 2022 14:02
src/controllers/csi/provisioner/agent_test.go Outdated Show resolved Hide resolved
src/installer/image_source.go Outdated Show resolved Hide resolved
src/installer/image_unpack.go Outdated Show resolved Hide resolved
src/installer/image_unpack.go Outdated Show resolved Hide resolved
src/installer/image_unpack.go Outdated Show resolved Hide resolved
src/installer/image_unpack.go Outdated Show resolved Hide resolved
src/installer/installer.go Outdated Show resolved Hide resolved
src/installer/installer.go Outdated Show resolved Hide resolved
src/installer/symlink.go Outdated Show resolved Hide resolved
meik99
meik99 previously requested changes Apr 27, 2022
src/api/v1beta1/properties.go Outdated Show resolved Hide resolved
src/controllers/csi/provisioner/agent.go Outdated Show resolved Hide resolved
src/controllers/csi/provisioner/agent.go Outdated Show resolved Hide resolved
src/controllers/csi/provisioner/agent.go Outdated Show resolved Hide resolved
src/controllers/csi/provisioner/agent.go Outdated Show resolved Hide resolved
src/installer/image/unpack.go Show resolved Hide resolved
src/installer/symlink/symlink.go Outdated Show resolved Hide resolved
src/installer/url/installer.go Outdated Show resolved Hide resolved
src/installer/zip/gzip.go Show resolved Hide resolved
src/installer/zip/zip.go Show resolved Hide resolved
@chrismuellner chrismuellner enabled auto-merge (squash) April 29, 2022 10:17
@0sewa0 0sewa0 dismissed meik99’s stale review April 29, 2022 11:00

fixed, or didn't agree :P

@chrismuellner chrismuellner merged commit 1d123a6 into master Apr 29, 2022
@chrismuellner chrismuellner deleted the feature/copy-from-image branch April 29, 2022 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oneagent Changes related to Oneagent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants