Skip to content

Precreate the Kafka ConfigMap, because the dispatcher will flap until it exists#831

Closed
Harwayne wants to merge 1 commit into
knative:masterfrom
Harwayne:kafka-config-map
Closed

Precreate the Kafka ConfigMap, because the dispatcher will flap until it exists#831
Harwayne wants to merge 1 commit into
knative:masterfrom
Harwayne:kafka-config-map

Conversation

@Harwayne
Copy link
Copy Markdown
Contributor

@Harwayne Harwayne commented Feb 22, 2019

Proposed Changes

  • Precreate the Kafka ConfigMap, because the dispatcher will flap until it exists. And the controller doesn't create the ConfigMap until the first kafka Channel is reconciled.

Release Note

Applying the full YAML will cause the existing ConfigMap's data to be removed. It will be recreated the next time the Channel controller reconciles a Kafka Channel.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Feb 22, 2019
@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 Feb 22, 2019
@Harwayne
Copy link
Copy Markdown
Contributor Author

Should the ConfigMap be in a sibling bootstrap.yaml? It is only desired on the first install. We don't want it on subsequent upgrades (it will cause a short data plane outage, then again so will redeploying the StatefulSet which only has 1 replica).

@evankanderson
Copy link
Copy Markdown
Member

evankanderson commented Feb 25, 2019 via email

@vagababov
Copy link
Copy Markdown
Contributor

The reason why we did this, was since if users override values in their YAML files and then new release is done, we'll rest those to our default values. So our suggested values were all moved to code as defaults and the ConfigMap YAMLs are basically examples of what keys we support.

@Harwayne
Copy link
Copy Markdown
Contributor Author

The reason why we did this, was since if users override values in their YAML files and then new release is done, we'll rest those to our default values. So our suggested values were all moved to code as defaults and the ConfigMap YAMLs are basically examples of what keys we support.

We use knative/pkg's configmap.InformedWatcher, which will error on start up if the ConfigMap isn't present. So without replacing our reliance on configmap.InformedWatcher, changing the startup order, or changing configmap.InformedWatcher, I don't think we can be resilient to the ConfigMap not existing at startup.

@evankanderson How about I add a second file, bootstrap.yaml, which the instructions state to apply only during the initial install?

@vagababov
Copy link
Copy Markdown
Contributor

vagababov commented Feb 26, 2019 via email

@Harwayne
Copy link
Copy Markdown
Contributor Author

You don't remove the config map, it's just empty.

How do we create an empty ConfigMap before first usage? Presumably either in the 'main' YAML, or a secondary bootstrap.yaml, right? The current PR puts it in the main YAML, which will cause overwrites if the YAML is applied again. Putting it into a bootstrap.yaml makes it less likely that mistake will occur.

@n3wscott
Copy link
Copy Markdown
Contributor

n3wscott commented Mar 6, 2019

Ping @vagababov

@vagababov
Copy link
Copy Markdown
Contributor

Didn't think it dependend on me.
The config looks empty, so I guess it's alright. But here's the example: https://github.com/knative/serving/blob/master/config/config-domain.yaml.

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 29, 2019
Copy link
Copy Markdown
Member

@evankanderson evankanderson 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

/hold

Looks like this is the correct format; not sure if this is still needed.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson, Harwayne

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 [Harwayne,evankanderson]

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

@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Apr 25, 2019

@evankanderson is there something that needs to be done here before merging?
@Harwayne still needed?

@Harwayne
Copy link
Copy Markdown
Contributor Author

No, this is no longer needed. #1058 removed the need for this ConfigMap.

@Harwayne Harwayne closed this Apr 25, 2019
@Harwayne Harwayne deleted the kafka-config-map branch May 9, 2019 18:58
mgencur added a commit to mgencur/eventing that referenced this pull request Sep 23, 2020
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants