-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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 k8s overlays for addons #22104
fix k8s overlays for addons #22104
Conversation
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 thought this is what the overlays were for?
operator/pkg/translate/translate.go
Outdated
|
||
var found bool | ||
var m interface{} | ||
if componentName == name.AddonComponentName { |
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.
it would be better to do this inside renderFeatureComponentPathTemplate as a special case template. this kind of fixup if going to be hard to read and maintain.
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 can create a helper function for this, would that be better? The reason is that we are not just changing the templates but there is also some logic changed required(due to the limitation of the tpath code we discussed offline)
@@ -3,10 +3,15 @@ kind: Service | |||
metadata: | |||
name: kiali | |||
namespace: {{ .Release.Namespace }} | |||
annotations: |
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.
per john's comment this strikes me as the wrong approach - we should not be adding things that are in IOP to values.yaml.
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.
But I think for now we should keep it consistent with other templates, which means that we should have it before we fully remove helm support.
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.
we are quite likely to move the kiali chart out of the repo shortly so this is not likely to be a lasting change. does this pr work without this change? if not we will have to tackle this problem sooner or later.
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.
without this, user can still do overlay via IOP API, they just cannot use the helm values pass through, but we actually can do that for other addons. I think we'd better to remove all of them at once to keep it consistent later
@ostromart PTAL again |
operator/cmd/mesh/testdata/manifest-generate/input/ingressgateway_k8s_settings.yaml
Show resolved
Hide resolved
kiali: | ||
enabled: true | ||
k8s: | ||
serviceAnnotations: |
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.
could you please also add something like resources here too?
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.
ok done
operator/pkg/translate/translate.go
Outdated
// getK8SSpecFromIOP is helper function to get k8s spec from IOP using path | ||
// 1. if component is not an addonComponent, get the spec directly from IOP | ||
// 2. otherwise convert the path and the root to point it to the entry of addonComponents map. | ||
// e.x: path "Components.AddonComponents.K8S.ReplicaCount" and root "Spec" -> |
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.
very hard to follow this example, could you rewrite in terms of API inputs and outputs?
In response to a cherrypick label: #22104 failed to apply on top of branch "release-1.5":
|
* add service to kiali charts * fix overlay for k8s * address comment * address comment and rebase * address comment
fix #21995
Notes: the reordering of some fields in the test output is caused by the json merge generates different order with original yaml