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

Use the built image as the default for Envoy init and shutdown #130

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

ghost
Copy link

@ghost ghost commented Dec 21, 2021

While the Envoy init and shutdown manager images can be overridden at
runtime, the defaults were more-or-less hardcoded. Now the default
image is the same as what was built. This means that the init manager
and shutdown manager images will respect build-time overrides of
IMAGE_TAG_BASE, e.g., to use a different registry.

NOTE: I wanted to query at runtime the image that the manager
container is currently running, but that turns out to be difficult to
do. The image name isn't available in the downstream API[1] so for now
I'm doing a cut-n-paste of the existing "version" code and having the
Makefile pass the image name into the generator.

[1] kubernetes/kubernetes#19475

While the Envoy init and shutdown manager images can be overridden at
runtime, the defaults were more-or-less hardcoded. Now the default
image is the same as what was built. This means that the init manager
and shutdown manager images will respect build-time overrides of
IMAGE_TAG_BASE, e.g., to use a different registry.

NOTE: I wanted to query at runtime the image that the manager
container is currently running, but that turns out to be difficult to
do. The image name isn't available in the downstream API[1] so for now
I'm doing a cut-n-paste of the existing "version" code and having the
Makefile pass the image name into the generator.

[1] kubernetes/kubernetes#19475
@3scale-robot 3scale-robot added needs-kind Indicates a PR or issue lacks a `kind/foo` label and requires one. needs-priority Indicates a PR or issue lacks a `priority/foo` label and requires one. needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels Dec 21, 2021
@3scale-robot 3scale-robot added size/L Requires few days to complete the PR or the issue. and removed needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels Dec 21, 2021
@ghost
Copy link
Author

ghost commented Dec 21, 2021

/kind feature

@3scale-robot 3scale-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed needs-kind Indicates a PR or issue lacks a `kind/foo` label and requires one. labels Dec 21, 2021
@roivaz
Copy link
Member

roivaz commented Dec 27, 2021

This awesome @acnodal-tc! I actually needed to do something like this for some internal builds of the operator. I will expand it even further in an upcoming PR so the image can also be overridden in runtime using an environment variable in the operator Pod.

Just one minor thing I spotted, could you also delete the DefaultImageRegistry var in apis/operator.marin3r/v1alpha1/discoveryservice_types.go as it is not used anymore?

@roivaz
Copy link
Member

roivaz commented Dec 27, 2021

/ok-to-test

@3scale-robot 3scale-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Dec 27, 2021
@roivaz
Copy link
Member

roivaz commented Dec 27, 2021

/priority important-soon

@3scale-robot 3scale-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next sprint. and removed needs-priority Indicates a PR or issue lacks a `priority/foo` label and requires one. labels Dec 27, 2021
@roivaz
Copy link
Member

roivaz commented Jan 21, 2022

/approve

@3scale-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roivaz

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

@3scale-robot 3scale-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2022
@roivaz roivaz added the lgtm Indicates that a PR is ready to be merged. label Jan 21, 2022
@3scale-robot 3scale-robot merged commit a625d11 into 3scale-ops:main Jan 21, 2022
@ghost ghost deleted the current-image branch February 28, 2022 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next sprint. size/L Requires few days to complete the PR or the issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants