Commit 3d3c4208 authored by Nikhil Singh[MicroSoft]'s avatar Nikhil Singh[MicroSoft]
Browse files

IT Update

parent 0af63339
Pipeline #64389 failed with stages
in 26 minutes and 50 seconds
# Source: istio/templates/notification.yaml
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: notification-sb-jwt-authz
namespace: osdu
spec:
selector:
matchLabels:
app: notification-sb
action: DENY
rules:
- from:
- source:
notRequestPrincipals: ["*"]
to:
- operation:
notPaths: ["/","*/swagger-resources","*/swagger",
"/api/notification/v1/swagger-resources/*","*/swagger-ui.html","*/actuator/health"]
\ No newline at end of file
......@@ -100,10 +100,10 @@ spec:
- name: initial_subscription_manager_delay_seconds
value: "0"
- name: consecutive_subscription_manager_delay_seconds
value: "1800"
value: "10"
- name: service_bus_enabled
value: "false"
value: "true"
- name: event_grid_to_service_bus_enabled
value: "false"
- name: event_grid_enabled
value: "true"
\ No newline at end of file
value: "false"
\ No newline at end of file
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-sb
namespace: osdu
spec:
replicas: {{ .Values.global.replicaCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}-sb
template:
metadata:
labels:
app: {{ .Chart.Name }}-sb
aadpodidbinding: osdu-identity
spec:
volumes:
- name: azure-keyvault
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: azure-keyvault
containers:
- name: {{ .Chart.Name }}-sb
image: {{ .Values.image.repository }}/{{ .Chart.Name }}-{{ .Values.image.branch }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: Always
ports:
- containerPort: 81
readinessProbe:
httpGet:
path: /api/notification/v1/swagger-ui.html
port: 81
volumeMounts:
- name: azure-keyvault
mountPath: "/mnt/azure-keyvault"
readOnly: true
env:
- name: spring_application_name
value: notification-sb-azure
- name: LOG_PREFIX
value: "notification-sb"
- name: server.servlet.contextPath
value: /api/notification/v1
- name: server_port
value: "81"
- name: notification_spring_logging_level
value: INFO
- name: KEYVAULT_URI
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_KEYVAULT
- name: aad_client_id
valueFrom:
secretKeyRef:
name: active-directory
key: application-appid
- name: appinsights_key
valueFrom:
secretKeyRef:
name: central-logging
key: appinsights
- name: cosmosdb_database
value: osdu-db
- name: entitlements_service_endpoint
value: http://entitlements/api/entitlements/v2
- name: entitlements_service_api_key
value: "OBSOLETE"
- name: registeration_service_endpoint
value: http://register/api/register/v1
- name: partition_service_endpoint
value: http://partition/api/partition/v1
- name: maxCacheSize
value: "20"
- name: max_concurrent_calls
value: "3"
- name: executor_n_threads
value: "32"
- name: max_lock_renew_duration_seconds
value: "500"
- name: initial_subscription_manager_delay_seconds
value: "0"
- name: consecutive_subscription_manager_delay_seconds
value: "600"
- name: service_bus_enabled
value: "true"
- name: event_grid_to_service_bus_enabled
value: "false"
- name: event_grid_enabled
value: "false"
\ No newline at end of file
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-sb
namespace: osdu
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 81
targetPort: 81
selector:
app: {{ .Chart.Name }}-sb
\ No newline at end of file
......@@ -141,7 +141,8 @@ public class TestStorageIntegration extends BaseTestTemplate {
try {
// Creates an actual subscription with a test endpoint i.e REGISTER_CUSTOM_PUSH_URL_HMAC
this.createResource();
TimeUnit.SECONDS.sleep(20);
System.out.println("Wait-time of 20 seconds for registeration");
// Delete the Test Ack subscription if there exists any as a part of cleanup.
// The Test Ack Subscription gets created if the the test endpoint of actual subscription
// created above receives notification from Notification Service.
......@@ -149,6 +150,7 @@ public class TestStorageIntegration extends BaseTestTemplate {
// Create legal tag used in storage record
LegalTagUtils.create(LEGAL_TAG, this.testUtils.getAdminToken());
System.out.println("legal tag created");
// Insert a storage Record.This will send a notification to the event grid/service bus topic
// subscriptions.From there it goes to the Notification Service.Finally from there it goes to the
......@@ -156,6 +158,7 @@ public class TestStorageIntegration extends BaseTestTemplate {
String URL = Config.Instance().StorageServicePath;
ClientResponse response = descriptor.run(URL, "", this.testUtils.getAdminToken());
assertEquals(error(response.getEntity(String.class)), 201, response.getStatus());
System.out.println("Storage Record inserted");
// Verification of Test Ack Subscription creation from the above process.
StopWatch stopWatch = new StopWatch();
......@@ -164,13 +167,16 @@ public class TestStorageIntegration extends BaseTestTemplate {
long retryCount = Long.parseLong(Config.Instance().RetryCount);
long timeOut = Long.parseLong(Config.Instance().TimeOutSeconds);
SubscriptionInfo ackSubscription = subscriptionService.get(ackSubscriptionId);
System.out.println("No ack found"+ retryCount);
while (ackSubscription == null && retryCount > 0) {
TimeUnit.SECONDS.sleep(timeOut);
ackSubscription = subscriptionService.get(ackSubscriptionId);
System.out.println("No ack found"+ retryCount);
retryCount--;
}
Assertions.assertNotNull(ackSubscription, "Unable to retrieve test ack subscription. Elapsed time in minutes : " + (stopWatch.getTime(TimeUnit.MINUTES)));
if (ackSubscription != null) {
System.out.println("Found test ack");
assertEquals("Unexpected Test Ack Subscription.", ackNotificationId, ackSubscription.getNotificationId());
}
stopWatch.stop();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment