From 3ac661f249f73bfcd4536842917c0b8664f9c633 Mon Sep 17 00:00:00 2001 From: Ishrath Ahamed Date: Fri, 21 Mar 2025 11:17:30 +0530 Subject: [PATCH] Reduce replica count for csi-adt-ui deployment from 2 to 1 --- manifests/01-jboss-infinispan-server.yaml | 674 ++++++++++++++++++++++ manifests/15-csi-adt-ui.yaml | 2 +- 2 files changed, 675 insertions(+), 1 deletion(-) create mode 100644 manifests/01-jboss-infinispan-server.yaml diff --git a/manifests/01-jboss-infinispan-server.yaml b/manifests/01-jboss-infinispan-server.yaml new file mode 100644 index 0000000..1652fa1 --- /dev/null +++ b/manifests/01-jboss-infinispan-server.yaml @@ -0,0 +1,674 @@ +apiVersion: v1 +data: + clustered-csi.xml: | + + + + + + + + + + + + + + + + + + + + + + + + + + not-so-secret-password + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + h2 + + sa + sa + + + + + org.h2.jdbcx.JdbcDataSource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + ${jgroups.gossip.initial_hosts:} + + + + + + + false + + + + + + + + + + 360000 + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/instance: jboss-infinispan-server + name: infinispan-clustered-cm + namespace: csi-uat + +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: jgroups-kubeping-service-account + namespace: csi-uat +--- + +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app.kubernetes.io/instance: jboss-infinispan-server + application: infinispan-server + name: infinispan-server + namespace: csi-uat +spec: + selector: + matchLabels: + application: infinispan-server + serviceName: infinispan-server-headless + template: + metadata: + labels: + application: infinispan-server + deploymentConfig: infinispan-server + name: infinispan-server + spec: + containers: + - args: + - clustered-csi + - '-Djboss.default.jgroups.stack=kubernetes' + env: + - name: KUBERNETES_LABELS + value: application=infinispan-server + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SERVER_CONFIGURATION + value: clustered-csi.xml + - name: APP_USER + valueFrom: + secretKeyRef: + key: application-user + name: infinispan-server + - name: APP_PASS + valueFrom: + secretKeyRef: + key: application-password + name: infinispan-server + image: >- + registry.cloudsolutions.com.sa/vida-qa/jboss-infinispan-server:9.4.8.Final + livenessProbe: + exec: + command: + - /usr/local/bin/is_running.sh + failureThreshold: 5 + initialDelaySeconds: 10 + periodSeconds: 60 + successThreshold: 1 + timeoutSeconds: 80 + name: infinispan-server + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 9990 + name: management + protocol: TCP + - containerPort: 8888 + name: ping + protocol: TCP + - containerPort: 11222 + name: hotrod + protocol: TCP + readinessProbe: + exec: + command: + - /usr/local/bin/is_healthy.sh + failureThreshold: 5 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 80 + resources: + limits: + memory: 2Gi + requests: + cpu: '0.5' + memory: 512Mi + volumeMounts: + - mountPath: >- + opt/jboss/infinispan-server/standalone/configuration/clustered-csi.xml + name: config-volume + subPath: clustered-csi.xml + imagePullSecrets: + - name: regcred + serviceAccountName: jgroups-kubeping-service-account + terminationGracePeriodSeconds: 120 + tolerations: + - effect: NoSchedule + key: treat + operator: Equal + value: core + volumes: + - configMap: + name: infinispan-clustered-cm + name: config-volume diff --git a/manifests/15-csi-adt-ui.yaml b/manifests/15-csi-adt-ui.yaml index 1f545a8..d7ab93a 100644 --- a/manifests/15-csi-adt-ui.yaml +++ b/manifests/15-csi-adt-ui.yaml @@ -6,7 +6,7 @@ metadata: name: csi-adt-ui namespace: csi-uat spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: csi-adt-ui