Skip to content

Commit

Permalink
adding doc
Browse files Browse the repository at this point in the history
Signed-off-by: Vishwanath Hiremath <[email protected]>
  • Loading branch information
vishwahiremat committed Feb 15, 2024
1 parent 240d9f9 commit b0023e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/corerp/frontend/controller/secretstores/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ func UpsertSecret(ctx context.Context, newResource, old *datamodel.SecretStore,
ksecret := &corev1.Secret{}
err = options.KubeClient.Get(ctx, runtimeclient.ObjectKey{Namespace: ns, Name: name}, ksecret)
if apierrors.IsNotFound(err) {
// If resource in incoming request references resource, then the resource must exist.
// If resource in incoming request references resource, then the resource must exist for a application/environment scoped resource.
// For global scoped resource create the kubernetes resource if not exists.
if ref != "" && !isGlobalScopedResource(newResource) {
return rest.NewBadRequestResponse(fmt.Sprintf("'%s' referenced resource does not exist.", ref)), nil
}
Expand Down

0 comments on commit b0023e5

Please sign in to comment.