Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Avoid name conflict by using deployment+delimiter+container as the key (#159) #161

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

houshengbo
Copy link

@houshengbo houshengbo commented Mar 31, 2020

Cherry-pick of 044d9c4

Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@houshengbo: 0 warnings.

In response to this:

Issue to be fixed

Fixes #

Proposed Changes

Release Note

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/test-infra repository.

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: houshengbo

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

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/knativeeventing/common/images.go 91.5% 89.7% -1.7

overrideImage := registry.Override[containerName]
func getNewImage(registry *eventingv1alpha1.Registry, containerName, deploymentName string) string {
overrideImage := registry.Override[deploymentName+delimiter+containerName]
if overrideImage == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a test where override for "deploymentName+delimiter+containerName" and "containerName" is specified, and that "deploymentName+delimiter+containerName" wins out, that is to verify that deploymentName takes precedence over just containerName

Copy link
Author

Choose a reason for hiding this comment

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

That is what exactly the test cases in image_test.go is doing:

OverrideWithDeploymentContainer, OverridePartialWithDeploymentContainer, OverrideWithDeploymentName

They respectively check overriding both of two containers, overriding one container, and using deploymentName+delimiter+containerName only.

@houshengbo houshengbo merged commit a19394f into knative:release-0.13 Mar 31, 2020
@houshengbo
Copy link
Author

Let me merge it first, to catch up the incoming patch release in 30 mins.
For any other concerns, PLZ open issues. Thanks.

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

Successfully merging this pull request may close these issues.

5 participants