Skip to content

Commit

Permalink
fix: use add instead of replace for updating resources
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Apr 21, 2021
1 parent a61d3bc commit af16269
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions frontend/packages/rhoas-plugin/locales/en/rhoas-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"Failed to load list of services": "Failed to load list of services: {{error}}",
"Go back to Services Catalog": "Go back to Services Catalog",
"Failed to create connection": "Failed to create connection",
"Please try again": "{{error}} Please try again",
"Select Kafka Instance": "Select Kafka Instance",
"The selected Kafka instance will be added to the topology view.": "The selected Kafka instance will be added to the topology view.",
"Could not connect to RHOAS with API Token": "Could not connect to RHOAS with API Token",
Expand Down Expand Up @@ -53,8 +54,5 @@
"Cloud Service": "Cloud Service",
"This resource represents service that exist outside your cluster": "This resource represents service that exist outside your cluster",
"Details": "Details",
"Resources": "Resources",
"Create a binding connector": "Create a binding connector",
"Description": "Description",
"Please try again": "{{error}} Please try again"
"Resources": "Resources"
}
6 changes: 2 additions & 4 deletions frontend/packages/rhoas-plugin/src/utils/resourceCreators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const createManagedServiceAccount = async (currentNamespace: string) => {
namespace: currentNamespace,
},
spec: {
forceRefresh: new Date().toISOString(),
accessTokenSecretName: AccessTokenSecretName,
serviceAccountName: `rhoas-operator-${getRandomChars(4)}`,
serviceAccountDescription: 'Created by rhoas operator',
Expand All @@ -58,7 +57,6 @@ export const createCloudServicesRequest = async (currentNamespace: string) => {
namespace: currentNamespace,
},
spec: {
forceRefresh: new Date().toISOString(),
accessTokenSecretName: AccessTokenSecretName,
},
};
Expand All @@ -71,7 +69,7 @@ export const patchServiceAccountRequest = async (request: any) => {
return k8sPatch(CloudServiceAccountRequest, request, [
{
path,
op: 'replace',
op: 'add',
value: new Date().toISOString(),
},
]);
Expand All @@ -83,7 +81,7 @@ export const patchCloudServicesRequest = async (request: any) => {
return k8sPatch(CloudServicesRequestModel, request, [
{
path,
op: 'replace',
op: 'add',
value: new Date().toISOString(),
},
]);
Expand Down

0 comments on commit af16269

Please sign in to comment.