-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat(ingress) Experimental Native Ingress #316
Conversation
Codecov Report
@@ Coverage Diff @@
## master #316 +/- ##
==========================================
+ Coverage 55.69% 59.48% +3.78%
==========================================
Files 6 6
Lines 386 543 +157
==========================================
+ Hits 215 323 +108
- Misses 151 189 +38
- Partials 20 31 +11
Continue to review full report at Codecov.
|
@kris-nova, I think I see a problem here...
Thinking through this more, I suspect what we really need to do is not touch the router chart at all, but conditionally include it or not include it in the Workflow chart. I'm wondering if that can actually be done... going to consult with the Helm team a bit. |
.gitignore
Outdated
@@ -4,3 +4,4 @@ rootfs/opt/router/sbin/router | |||
rootfs/opt/router/sbin/router.* | |||
vendor/ | |||
coverage.txt | |||
.idea* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hiding files under .idea isn't strictly related to the ingress changes, so ideally this would be in a separate PR.
@@ -76,3 +77,4 @@ spec: | |||
port: 9090 | |||
initialDelaySeconds: 1 | |||
timeoutSeconds: 1 | |||
{{ end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files should end with a newline to satisfy some tools.
Would it improve readability to finish with a comment like:
{{ end }}{{/* if not .Values.global.experimental_native_ingress */}}
I'm just asking--not sure myself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, also added a newline back to the end.. dang emacs 😝
Adding logic to disable router Non breaking change, as users must opt-in to the feature.
Add newline and comment for huge if statmenet Non breaking change, just semantic
Add newline and comment for huge if statmenet Non breaking change, just semantic
.gitignore
Outdated
@@ -1,4 +1,4 @@ | |||
rootfs/opt/router/sbin/router | |||
rootfs/opt/router/sbin/router.* | |||
vendor/ | |||
coverage.txt | |||
coverage.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this removes the trailing newline in this file. Can we leave that be?
Remove trailing newline Non breaking change, just semantic
@@ -1,3 +1,4 @@ | |||
{{- if not .Values.global.experimental_native_ingress }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I may have said something to this effect once before, but I don't think this works... .Values.global
looks like a reference to the "top level" configuration in the Workflow chart. This chart can't "look up" into there because... well... imagine the scenario where this chart is installed standalone (i.e. without the rest of Workflow)... there wouldn't even be anything to look up to.
I think this repo probably does not require any changes to support the native ingress initiative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the global.experimental_native_engress
value to the values.yaml
for the router chart.. this should support a standalone installation of the router
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. I am sorry for a bit of mis-understanding here. I'd forgotten that global
was a special scope within Helm that allowed charts to "look up." I've now realized that...
I understand what you're trying to do here. Regardless of whether someone installs the router chart directly or installs the Workflow chart, which includes the router chart, a value for global.experimental_native_ingress
should be available.
Although I understand what you're trying to do and agree it would work, I think there are a couple smells here... and I think there's a much cleaner alternative.
The smells:
The router chart now has the ability, when installed, depending on the value of global.experimental_native_ingress
to actually not install any of its k8s resources. i.e. It is possible to effect a "no-op" install of the router. (Install this chart-- but dont!) This doesn't make sense unless considered in the broader context of re-use by the Workflow chart. That means the router chart has been designed with that specific re-use by the Workflow chart in mind. And that's a smell. Because, what really, does "experimental native ingress" mean to the router itself? Nothing, in fact.
As I've said before, I think the router requires no changes to support this experiment. (Neither Go nor chart changes are in order.) All that needs to be done is for the Workflow chart to conditionally include or not include the router chart. Until re-reading the Helm documentation this evening, I'd hoped, but hadn't known for sure that was possible... it is...
This section of the documentation shows two techniques that could be used to conditionally include or exclude the router chart in its entirety from a Workflow installation:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point: @knova I think I misunderstood the context earlier. I see @krancour's point that this makes a change to the router's own chart that allows it to be disabled completely, which seems wrong in the context of the router chart standing alone. We do intend the individual component charts to be useful separate from Workflow itself if at all possible.
Counterpoint: changing to use the new tags and conditions in Helm requires Workflow to specify helm
v2.2.1 or later, is my understanding. And other components such as minio are disabled in a similarly inelegant way already. It could be argued that using tags + conditions isn't in scope for this overall feature, and that we should instead make a coordinated effort to refactor all conditional components at once.
@krancour would you be amenable to allowing this smelly-but-consistent change into router if we follow up with a set of PRs that embrace Helm tags & conditions that remove the currently enclosing {{ if
blocks from all relevant Workflow charts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @krancour, no worries. We do intend to revert this change at some point in the future in favor of the cleaner tags & conditionals approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry my code smells
Adding global.experimental_native_ingress flag to values.yaml so this can be ran standalone Non breaking change, just semantic
@mboersma @bacongobbler does anyone else see anything that needs attention on this one? |
Nope! Looks like all of the templated objects from this chart is covered. |
With the caveat that we intend to refactor this eventually (see deis/workflow#771), I'm ok with this change. |
Adding ingress support to controller Adding changes to chart to support feature Adding ingress rules for controller API, and SSH on TCP 2222 Adding ingress support in general Requires deis/workflow#732 Requires deis/builder#495 Requires deis/router#316 Technically a non breaking change, as the user must opt-in to the feature
Preliminary work for disabling the router chart when using
EXPERIMENTAL_NATIVE_INGRESS
Note: this will probably be refactored once we figure out #771
Requires deis/builder#495
Requires deis/workflow#732
Requires deis/controller#1243