Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

syncCatalog: expose add-k8s-namespace-suffix flag #280

Merged
merged 5 commits into from
Dec 6, 2019

Conversation

ishustava
Copy link
Contributor

@ishustava ishustava requested review from lkysow and adilyse November 4, 2019 21:23
Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

Also need to update the default version of imageK8S to whatever the consul-k8s version will be.

values.yaml Outdated
# Namespace suffix is not added if 'annotationServiceName' is provided.
# NOTE: Setting this property to 'true' will result in deregistering of existing
# synced services in Consul and registering them with a new name.
addK8SNamespaceSuffix: false
Copy link
Member

Choose a reason for hiding this comment

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

I think we should set this to true by default. The current default has the major problem that a service with the same name in any namespace will be synced to the same Consul service.

We'd need to document the breaking change and tell people how to upgrade safely (set this value to false) but I think it's worth it to not put new users in a bad state.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lkysow After thinking about this more, I agree that this should be true by default and that it's worth making this a breaking change.

@@ -94,6 +94,9 @@ spec:
{{- if .Values.syncCatalog.consulPrefix}}
-consul-service-prefix="{{ .Values.syncCatalog.consulPrefix}}" \
{{- end}}
{{- if .Values.syncCatalog.addK8SNamespaceSuffix}}
-add-k8s-namespace-suffix="{{ .Values.syncCatalog.addK8SNamespaceSuffix}}" \
Copy link
Member

Choose a reason for hiding this comment

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

This is a bool flag so can this be

{{- if .Values.syncCatalog.addK8SNamespaceSuffix}}
-add-k8s-namespace-suffix \

@ishustava ishustava added area/sync Related to catalog sync bug Something isn't working labels Nov 14, 2019
Copy link
Contributor

@adilyse adilyse left a comment

Choose a reason for hiding this comment

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

Looking good! Just a couple minor comments, so I'm approving to not hold things up.

Reminder for whoever ends up merging this: it shouldn't be merged until 160 has been merged and consul-k8s has officially released v0.9.5.

values.yaml Outdated Show resolved Hide resolved
values.yaml Outdated
# Set this flag to true to avoid registering services with the same name
# but in different namespaces as instances for the same Consul service.
# Namespace suffix is not added if 'annotationServiceName' is provided.
# NOTE: Setting this property to 'true' will result in deregistering of existing
Copy link
Contributor

Choose a reason for hiding this comment

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

This is only a concern when someone is updating an existing Consul installation. This comment reads to me like it might happen if someone sets it to true the first time they install.

Also, given that we're now defaulting this to true, the wording is a little odd.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True. I removed that note entirely. This comment will be more appropriate in the Changelog.

test/unit/sync-catalog-deployment.bats Outdated Show resolved Hide resolved
@ishustava ishustava merged commit 11b76fb into master Dec 6, 2019
@ishustava ishustava deleted the add-k8s-namespace-suffix branch December 6, 2019 01:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/sync Related to catalog sync bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants