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

feat: use RELATED_IMAGES_ environment variables to configure operand's images #812

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

osmman
Copy link
Contributor

@osmman osmman commented Jan 15, 2025

This pull request introduces a new feature that allows the Operator manager to utilize RELATED_IMAGES_* environment variables for image configurations. This change allows operator-sdk to generate bundle image with relatedImages meta data which are used for disconnected environment. Additionally, it includes several refactoring changes to improve deployment for different environments Kubernetes/Openshift.

Key Features

  • Environment Variables: Use RELATED_IMAGES_ environment variables for image configurations.
  • Makefile Updates: Added CONFIG_DEFAULT for dynamic configuration based on the OPENSHIFT variable.
  • Codebase Enhancements: Centralized image management by importing internal/images.

@openshift-ci openshift-ci bot requested review from JasonPowr and lance January 15, 2025 11:09
Copy link

openshift-ci bot commented Jan 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: osmman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@osmman osmman force-pushed the tturek/related-images branch from 3057129 to dc7b201 Compare January 15, 2025 11:22
@osmman osmman marked this pull request as draft January 15, 2025 16:47
@osmman osmman changed the title feat: use RELATED_IMAGES_ environment variables for manager PoC 1: feat: use RELATED_IMAGES_ environment variables for manager Jan 15, 2025
}

// parseConfigFile parses an embedded `.env` content and returns a map of key-value pairs.
func parseConfigFile(envContent string) (map[Image]string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you considered using Viper https://github.com/spf13/viper ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did not thing for this case. We can move our configuration of operator to be managed by it.

@osmman osmman force-pushed the tturek/related-images branch from 99976e7 to 1c8328a Compare January 16, 2025 11:19
@osmman osmman force-pushed the tturek/related-images branch from 1c8328a to 1a0f6ff Compare January 16, 2025 11:26
@osmman osmman marked this pull request as ready for review January 16, 2025 12:47
@openshift-ci openshift-ci bot requested review from bouskaJ and tommyd450 January 16, 2025 12:47
@osmman osmman changed the title PoC 1: feat: use RELATED_IMAGES_ environment variables for manager feat: use RELATED_IMAGES_ environment variables for manager Jan 16, 2025
@osmman osmman changed the title feat: use RELATED_IMAGES_ environment variables for manager feat: use RELATED_IMAGES_ environment variables to configure operand's images Jan 16, 2025
@osmman osmman force-pushed the tturek/related-images branch 2 times, most recently from 7e26eee to 83f4538 Compare January 16, 2025 14:07
@osmman osmman force-pushed the tturek/related-images branch 2 times, most recently from 2431c20 to 83f4538 Compare February 3, 2025 10:11
@osmman
Copy link
Contributor Author

osmman commented Feb 4, 2025

/test tas-operator-e2e

@osmman
Copy link
Contributor Author

osmman commented Feb 4, 2025

@osmman
Copy link
Contributor Author

osmman commented Feb 4, 2025

/override ci/prow/tas-operator-e2e

Copy link

openshift-ci bot commented Feb 4, 2025

@osmman: Overrode contexts on behalf of osmman: ci/prow/tas-operator-e2e

In response to this:

/override ci/prow/tas-operator-e2e

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants