-
Notifications
You must be signed in to change notification settings - Fork 431
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
Fix api service reg #1337
Fix api service reg #1337
Conversation
Signed-off-by: Ishan Khare <[email protected]>
Signed-off-by: Ishan Khare <[email protected]>
Signed-off-by: Ishan Khare <[email protected]>
Signed-off-by: Ishan Khare <[email protected]>
Signed-off-by: Ishan Khare <[email protected]>
Signed-off-by: Ishan Khare <[email protected]>
Signed-off-by: Ishan Khare <[email protected]>
@@ -169,6 +174,7 @@ spec: | |||
{{- end }} | |||
{{- if or .Values.proxy.metricsServer.nodes.enabled .Values.proxy.metricsServer.pods.enabled}} | |||
- --proxy-metrics-server=true | |||
- --single-binary-distro=false |
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.
Why do we have an env var and flag for this? Also why is this necessary?
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.
this info is needed at 2 places basically, one is at places like endpoints syncer, apiregistration etc.
and the other is in specialservices
Since we don't have a way to inject controller context here, I thought to inject the env var
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.
How about removing the global Default
variable in the resolver (https://github.com/ishankhare07/vcluster/blob/c98aba12ee29bc661a75af190cabca0b8bd5d213/pkg/specialservices/resolver.go#L12) and adding a boolean to the function definition of DefaultNameserverFinder
.
As the specialservices.Default
variable is used in two places, why not store the variable from the controller context in those two syncers and then pass it down to the DefaultNameserverFinder
function?
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.
Also, would it make more sense to pass down the name of the distro as an arg instead of this flag and then decide within the code if it's a single binary distro?
@ishankhare07 also would be good if we add some sort of test here to avoid breaking this in future |
address other minor review comments Signed-off-by: Ishan Khare <[email protected]>
Signed-off-by: Ishan Khare <[email protected]>
Signed-off-by: Ishan Khare <[email protected]>
e2a8de8
to
7b39ff4
Compare
Signed-off-by: Ishan Khare <[email protected]>
@@ -169,6 +174,7 @@ spec: | |||
{{- end }} | |||
{{- if or .Values.proxy.metricsServer.nodes.enabled .Values.proxy.metricsServer.pods.enabled}} | |||
- --proxy-metrics-server=true | |||
- --single-binary-distro=false |
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.
How about removing the global Default
variable in the resolver (https://github.com/ishankhare07/vcluster/blob/c98aba12ee29bc661a75af190cabca0b8bd5d213/pkg/specialservices/resolver.go#L12) and adding a boolean to the function definition of DefaultNameserverFinder
.
As the specialservices.Default
variable is used in two places, why not store the variable from the controller context in those two syncers and then pass it down to the DefaultNameserverFinder
function?
The We are still storing the boolean in the controllerctx and using it where possible. But if we want to pass it to Edit: I think I misunderstood, I got what you're suggesting and it makes sense - will push an update soon |
Signed-off-by: Ishan Khare <[email protected]>
441f68f
to
73719a4
Compare
enable hostNetwork for metrics server Signed-off-by: Ishan Khare <[email protected]>
Signed-off-by: Ishan Khare <[email protected]>
13b7442
to
c6d0d85
Compare
Signed-off-by: Ishan Khare <[email protected]>
pkg/specialservices/resolver.go
Outdated
|
||
const ( | ||
DefaultKubeDNSServiceName = "kube-dns" | ||
DefaultKubeDNSServiceNamespace = "kube-system" | ||
|
||
DistroEnvKey = "SINGLE_BINARY_DISTRO" |
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.
Can we remove this?
if vEndpoints.Labels == nil { | ||
vEndpoints.Labels = map[string]string{} | ||
} | ||
// vEndpoints.Labels[discoveryv1.LabelSkipMirror] = "true" |
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.
why is this commented out?
✅ Deploy Preview for vcluster-docs canceled.
|
720cbd5
to
f742c4e
Compare
What issue type does this pull request address? (keep at least one, remove the others)
/kind bugfix
/kind enhancement
What does this pull request do? Which issues does it resolve? (use
resolves #<issue_number>
if possible)resolves #1163 ENG-1901
Please provide a short message that should be published in the vcluster release notes
Fixed an issue where vcluster when deployed with k8s/eks distro and metrics proxy enabled could not resolve apiservice properly because syncer and apiserver being in separate pods
What else do we need to know?