-
Notifications
You must be signed in to change notification settings - Fork 33
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
wip: Rename configmap for sail #392
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #392 +/- ##
==========================================
- Coverage 65.87% 65.87% -0.01%
==========================================
Files 35 35
Lines 3795 3792 -3
==========================================
- Hits 2500 2498 -2
Misses 1112 1112
+ Partials 183 182 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -380,7 +383,10 @@ func controlPlaneProviderName() string { | |||
return env.GetString("ISTIOOPERATOR_NAME", "istiocontrolplane") | |||
} | |||
|
|||
func controlPlaneConfigMapName() string { | |||
func controlPlaneConfigMapName(isSail bool) string { |
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 wonder if this function doesn't belong to pkg/istio/mesh_config.go
. It looks like the name of the ConfigMap is an implementation detail of each kind of Istio operator.
If this is indeed the direction we want to go, WDYT about something like the following?
func (r *KuadrantReconciler) getIstioConfigObjects(ctx context.Context, logger logr.Logger) ([]common.ConfigWrapper, error) {
// ...
if err == nil || apierrors.IsNotFound(err) {
opw := istio.NewOperatorWrapper(iop)
configMapName = opw.ConfigMapName()
configsToUpdate = append(configsToUpdate, opw)
} else if !apimeta.IsNoMatchError(err) {
// ...
} else {
// ...
opw := istio.NewSailWrapper(ist)
configMapName = opw.ConfigMapName()
configsToUpdate = append(configsToUpdate, opw)
}
// ...
}
Of course, OperatorWrapper
and SailWrapper
structs would implement ConfigMapName() string
as well (apart from ConfigWrapper
).
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.
Yep that's along the lines of what I was thinking. Unfortunately these changes aren't enough though to solve the install issue, still investigating.
I'm going to close this in favour of #391 - the istio CR must be named |
Test to see if this fixes sail integration tests until we can pin version.
I don't like the solution will look at refactoring.