# Configuration for Notification

1. Create a new file **oes-notification-service.yaml** using the below configurations:

```python
apiVersion: v1
kind: Service
metadata:
  annotations:
  name: oes-notification-service
  namespace: <opsmxargo>
spec:
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: notificationservice
    port: 8099
    protocol: TCP
    targetPort: 8099
  selector:
    app: oes
    component: notificationservice
  sessionAffinity: None
  type: ClusterIP

```

Update the *namespace* in the above configuration and apply by executing the below command:

```
kubectl apply -f <path> -n <namespace>

```

2. Create a new file **oes-notification-service-config.yaml** using below configurations:

{% code overflow="wrap" %}

```
apiVersion: v1
data:
  notification-service-local.yml: c2VydmVyOgogIHBvcnQ6IDgwOTkKCnJlZGlzOgogICAgY29ubmVjdGlvbjogcmVkaXM6Ly86cGFzc3dvcmRAaXNkLXJlZGlzLW1hc3Rlcjo2Mzc5CgpzbXRwOgogIGhvc3Q6IHNtdHAuZ21haWwuY29tCiAgcG9ydDogNTg3CiAgdXNlcm5hbWU6IGR1bW1heUBkdW1tYXkuY29tCiAgcGFzc3dvcmQ6IHh4eHh4eAoKbWFuYWdlbWVudDoKICBoZWFsdGg6CiAgICBlbGFzdGljc2VhcmNoOgogICAgICBlbmFibGVkOiBmYWxzZQogICAgbGRhcDoKICAgICAgZW5hYmxlZDogZmFsc2UKICBlbmRwb2ludHM6CiAgICB3ZWI6CiAgICAgIGJhc2UtcGF0aDogL21nbXQKICAgICAgZXhwb3N1cmU6CiAgICAgICAgaW5jbHVkZTogaGVhbHRoLGluZm8sbWV0cmljcyxwcm9tZXRoZXVzCiAgICAgIAptZXNzYWdlLWJyb2tlcjoKICBlbmFibGVkOiB0cnVlCiAgdXNlcm5hbWU6ICdyYWJiaXRtcScKICBwYXNzd29yZDogJ05ldHdvcmtzMTIzJwogIGhvc3Q6IHJhYmJpdG1xLXNlcnZpY2UKICBwb3J0OiA1NjcyCiAgZW5kcG9pbnQ6CiAgICBuYW1lOiByYWJiaXRtcQ==
kind: Secret
metadata:
  name: oes-notification-service-config
  namespace: <opsmxargo>
type: Opaque



```

{% endcode %}

{% hint style="info" %}
You need to decode the value given in the  notification-service-local.yml and needs to update your username, password and redis service name, and encode and keep it in the above configurations.&#x20;
{% endhint %}

The decoded configuration looks like as shown below:

```
server:
  port: 8099

redis:
    connection: redis://:password@isd-redis-master:6379

smtp:
  host: smtp.gmail.com
  port: 587
  username: xxxxx@xxx.com
  password: ******

management:
  health:
    elasticsearch:
      enabled: false
    ldap:
      enabled: false
  endpoints:
    web:
      base-path: /mgmt
      exposure:
        include: health,info,metrics,prometheus
      
message-broker:
  enabled: true
  username: 'rabbitmq'
  password: 'Networks123'
  host: rabbitmq-service
  port: 5672
  endpoint:
    name: rabbitmq
```

Update the namespace and apply by executing the below command:

```
kubectl apply -f <path> -n <namespace>
```

3. Create a new file **oes-notification-service-deployment.yaml** using the below configurations:

```
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
  name: oes-notification-service
  namespace: <opsmxargo>
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: oes
      component: notificationservice
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        configmap/checksum: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
        moniker.spinnaker.io/application: isd
        prometheus.io/scrape: "false"
        prometheus_io_path: /mgmt/prometheus
        prometheus_io_port: "8099"
      labels:
        app: oes
        chart: oes-4.0.16
        component: notificationservice
        heritage: Helm
        release: isdargo2024.08.00
    spec:
      containers:
      - image: quay.io/opsmxpublic/ubi8-oes-notification-service:isd-argo-2024.08.00-202409031319
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /mgmt/health
            port: 8099
            scheme: HTTP
          initialDelaySeconds: 61
          periodSeconds: 60
          successThreshold: 1
          timeoutSeconds: 1
        name: oes-notification-service
        ports:
        - containerPort: 8099
          name: backend
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          initialDelaySeconds: 60
          periodSeconds: 10
          successThreshold: 1
          tcpSocket:
            port: 8099
          timeoutSeconds: 1
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /opsmx/conf/notification-service-local.yml
          name: notification-config-volume
          subPath: notification-service-local.yml
        - mountPath: /opsmx/conf/bootstrap.yml
          name: bootstrap-config-volume
          subPath: bootstrap.yml
        - mountPath: /opsmx/conf/standard-error-code.csv
          name: standard-error-conf
          subPath: standard-error-codes.csv
      volumes:
      - name: notification-config-volume
        secret:
          defaultMode: 420
          items:
          - key: notification-service-local.yml
            path: notification-service-local.yml
          secretName: oes-notification-service-config
      - name: bootstrap-config-volume
        secret:
          defaultMode: 420
          secretName: bootstrap
      - configMap:
          defaultMode: 420
          items:
          - key: standard-error-codes.csv
            path: standard-error-codes.csv
          name: standard-error-codes-config
        name: standard-error-conf


```

Update the namespace and apply by executing the below command

```
kubectl apply -f <path> -n <namespace>
```

4. Add the following code to the **oes-carina-config** secret:

```
message-broker:
  enabled: true
  username: 'rabbitmq'
  password: 'Networks123'
  host: rabbitmq-service
  port: 5672
  endpoint:
    name: rabbitmq

```

5. Add the following code to the **oes-gate-config** secret:

```
notifications:
	   baseUrl: "http://oes-notification-service:8099"
	   enabled: true

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opsmx.com/opsmx-1/opsmx-intelligent-software-delivery-isd-platform-argo/additional-resources/configuration-changes/configuration-changes-for-2024.08.00/configuration-for-notification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
