debug some typo
This commit is contained in:
parent
98c54eb080
commit
aa42f5f49c
@ -309,7 +309,7 @@ func (k *KubernetesService) CreateAdmiraltyTarget(context context.Context,execut
|
||||
},
|
||||
}
|
||||
|
||||
res, err := dynamicClientApply(executionId, gvrTargets, context, target)
|
||||
res, err := dynamicClientApply(executionId, "target", gvrTargets, context, target)
|
||||
if err != nil {
|
||||
return nil, errors.New("Error when trying to apply Source definition :" + err.Error())
|
||||
}
|
||||
@ -342,7 +342,7 @@ func (k *KubernetesService) CreateAdmiraltySource(context context.Context,execut
|
||||
}
|
||||
|
||||
|
||||
res, err := dynamicClientApply(executionId, gvrSources, context, source)
|
||||
res, err := dynamicClientApply(executionId, "source",gvrSources, context, source)
|
||||
if err != nil {
|
||||
return nil, errors.New("Error when trying to apply Source definition :" + err.Error())
|
||||
}
|
||||
@ -452,7 +452,7 @@ func getCDRapiKube(client kubernetes.Clientset, ctx context.Context, path string
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func dynamicClientApply(executionId string, resourceDefinition schema.GroupVersionResource, ctx context.Context, object map[string]interface{}) ([]byte, error) {
|
||||
func dynamicClientApply(executionId string, typeResource string, resourceDefinition schema.GroupVersionResource, ctx context.Context, object map[string]interface{}) ([]byte, error) {
|
||||
cli, err := NewDynamicClient()
|
||||
if err != nil {
|
||||
return nil, errors.New("Could not retrieve dynamic client when creating Admiralty Source : " + err.Error())
|
||||
@ -461,7 +461,7 @@ func dynamicClientApply(executionId string, resourceDefinition schema.GroupVersi
|
||||
res, err := cli.Resource(resourceDefinition).
|
||||
Namespace(executionId).
|
||||
Apply(ctx,
|
||||
"source-"+executionId,
|
||||
typeResource + "-" + executionId,
|
||||
&unstructured.Unstructured{Object: object},
|
||||
metav1.ApplyOptions{
|
||||
FieldManager: "kubectl-client-side-apply",
|
||||
|
Loading…
Reference in New Issue
Block a user