Skip to content

add owner ref to mtping deployment#3040

Merged
knative-prow-robot merged 1 commit into
knative:masterfrom
lionelvillard:mtping-ownerref
Apr 24, 2020
Merged

add owner ref to mtping deployment#3040
knative-prow-robot merged 1 commit into
knative:masterfrom
lionelvillard:mtping-ownerref

Conversation

@lionelvillard
Copy link
Copy Markdown
Contributor

Fixes #3035

Proposed Changes

  • add owner ref to mtping deployment

Release Note


Docs

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Apr 22, 2020
@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 22, 2020
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 24, 2020
Copy link
Copy Markdown
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2020
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lionelvillard, matzew

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [lionelvillard,matzew]

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

{
APIVersion: v1.SchemeGroupVersion.String(),
Kind: "Deployment",
Name: os.Getenv("CONTROLLER_NAME"), // guarantee to be non-empty
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.

you have already pulled this out of the environment, you should pass that var down so it is not also pulled from the env here.

MTImage string `envconfig:"MT_PING_IMAGE" required:"true"`

// Add this for validation purpose only of validation.
ControllerName string `envconfig:"CONTROLLER_NAME" required:"true"`
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.

What are these for?

ObjectMeta: metav1.ObjectMeta{
Namespace: system.Namespace(),
Name: args.MTAdapterName,
OwnerReferences: []metav1.OwnerReference{
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.

Setting the owner ref to the controller deployment seems like a bug to me, this means that the dataplane and control plane lifecycles are tied together and an upgrade of the control plane takes down the dataplane.

- name: CONTROLLER_UID
valueFrom:
fieldRef:
fieldPath: metadata.uid
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The downward API populates these with Pod values, so this PR is setting up bad owner references and Kubernetes GC will randomly delete the deployments as a result. We hit a similar issue with bad owner references in the webhook several months ago.

I believe @duglin was also just seeing a similar bad behavior in a separate context, and @markusthoemmes got bitten by this a month or two ago.

lionelvillard added a commit that referenced this pull request May 11, 2020
knative-prow-robot pushed a commit that referenced this pull request May 11, 2020
@lionelvillard lionelvillard deleted the mtping-ownerref branch August 28, 2020 15:43
@lionelvillard lionelvillard restored the mtping-ownerref branch September 3, 2020 15:41
@lionelvillard lionelvillard deleted the mtping-ownerref branch September 3, 2020 15:42
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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pingsource-jobrunner has no ownerref

6 participants