-
Notifications
You must be signed in to change notification settings - Fork 1
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
fixing name for nextcloud deployment in collabora install script #285
Conversation
@@ -540,7 +540,7 @@ func createInstallCollaboraJob(comp *vshnv1.VSHNNextcloud, svc *runtime.ServiceR | |||
Command: []string{ | |||
"bash", | |||
"-cefx", | |||
fmt.Sprintf("oc exec -i deployments/%s -- /install-collabora.sh \"%s\" \"%s\" \"%s\"", comp.GetName(), svc.Config.Data["isOpenshift"], comp.GetName(), comp.Spec.Parameters.Service.Collabora.FQDN), | |||
fmt.Sprintf("oc exec -i deployments/%s -- /install-collabora.sh \"%s\" \"%s\" \"%s\"", comp.GetName()+"-nextcloud", svc.Config.Data["isOpenshift"], comp.GetName(), comp.Spec.Parameters.Service.Collabora.FQDN), |
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.
please update and use comp.GetWorkloadName()
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 funtion returns GetName()
func (v *VSHNNextcloud) GetWorkloadName() string {
return v.GetName()
}
why do we even keep such method?
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 just commited updated code to GetWorkloadName(), but I'm really unsure if that's the way we should go
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.
TLDR: we have one single place for getting the name of the workload so that we reduce potential bugs in the future.
During a feature request we needed the workload names of all our services. Later the implementation changed and we were not relying on on the workload names anymore. We still agreed to keep the functions anyway for the reason of this PR you opened. Unfortunately if you take a look at all our service api implementations you will realise that not all services have their workload name comp.GetName()
. You have to see these methods as constants for each service and most of them luckily have the same name as comp.GetName()
. To keep our code bug free, whenever there are constants we need to put them in our APIs.
Summary
Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog