diff --git a/kafka/config/pv.yaml b/kafka/config/pv.yaml index 3a3158d..2bee44d 100644 --- a/kafka/config/pv.yaml +++ b/kafka/config/pv.yaml @@ -1,135 +1,75 @@ ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: data-kafka-zookeeper-0 -spec: - capacity: - storage: 10Gi - volumeMode: Filesystem - storageClassName: local-path - accessModes: - - ReadWriteOnce - local: - path: /home/ubuntu/volume/tm-gla/kafka/kafka-zk-0 - nodeAffinity: - required: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - glaciation-sogei-worker101 ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: data-kafka-broker-0 -spec: - capacity: - storage: 8Gi - volumeMode: Filesystem - storageClassName: local-path - accessModes: - - ReadWriteOnce - local: - path: /home/ubuntu/volume/tm-gla/kafka/kafka-broker-0 - nodeAffinity: - required: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - glaciation-sogei-worker101 ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: data-kafka-zookeeper-1 -spec: - capacity: - storage: 10Gi - volumeMode: Filesystem - storageClassName: local-path - accessModes: - - ReadWriteOnce - local: - path: /home/ubuntu/volume/tm-gla/kafka/kafka-zk-1 - nodeAffinity: - required: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - glaciation-sogei-worker102 ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: data-kafka-broker-1 -spec: - capacity: - storage: 8Gi - volumeMode: Filesystem - storageClassName: local-path - accessModes: - - ReadWriteOnce - local: - path: /home/ubuntu/volume/tm-gla/kafka/kafka-broker-1 - nodeAffinity: - required: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - glaciation-sogei-worker102 ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: data-kafka-zookeeper-2 -spec: - capacity: - storage: 10Gi - volumeMode: Filesystem - storageClassName: local-path - accessModes: - - ReadWriteOnce - local: - path: /home/ubuntu/volume/tm-gla/kafka/kafka-zk-2 - nodeAffinity: - required: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - glaciation-sogei-worker103 ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: data-kafka-broker-2 -spec: - capacity: - storage: 8Gi - volumeMode: Filesystem - storageClassName: local-path - accessModes: - - ReadWriteOnce - local: - path: /home/ubuntu/volume/tm-gla/kafka/kafka-broker-2 - nodeAffinity: - required: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - glaciation-sogei-worker103 +# --- +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: data-kafka-zookeeper-0 +# spec: +# capacity: +# storage: 10Gi +# volumeMode: Filesystem +# storageClassName: standard +# accessModes: +# - ReadWriteOnce +# --- +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: data-kafka-broker-0 +# spec: +# capacity: +# storage: 8Gi +# volumeMode: Filesystem +# storageClassName: standard +# accessModes: +# - ReadWriteOnce +# --- +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: data-kafka-zookeeper-1 +# spec: +# capacity: +# storage: 10Gi +# volumeMode: Filesystem +# storageClassName: standard +# accessModes: +# - ReadWriteOnce +# --- +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: data-kafka-broker-1 +# spec: +# capacity: +# storage: 8Gi +# volumeMode: Filesystem +# storageClassName: standard +# accessModes: +# - ReadWriteOnce +# --- +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: data-kafka-zookeeper-2 +# spec: +# capacity: +# storage: 10Gi +# volumeMode: Filesystem +# storageClassName: standard +# accessModes: +# - ReadWriteOnce +# --- +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: data-kafka-broker-2 +# spec: +# capacity: +# storage: 8Gi +# volumeMode: Filesystem +# storageClassName: standard +# accessModes: +# - ReadWriteOnce --- apiVersion: v1 kind: PersistentVolumeClaim @@ -142,8 +82,7 @@ spec: resources: requests: storage: 8Gi - storageClassName: local-path - volumeName: data-kafka-broker-0 + storageClassName: longhorn --- apiVersion: v1 kind: PersistentVolumeClaim @@ -156,8 +95,7 @@ spec: resources: requests: storage: 8Gi - storageClassName: local-path - volumeName: data-kafka-broker-1 + storageClassName: longhorn --- apiVersion: v1 kind: PersistentVolumeClaim @@ -170,8 +108,7 @@ spec: resources: requests: storage: 8Gi - storageClassName: local-path - volumeName: data-kafka-broker-2 + storageClassName: longhorn --- apiVersion: v1 kind: PersistentVolumeClaim @@ -184,8 +121,7 @@ spec: resources: requests: storage: 10Gi - storageClassName: local-path - volumeName: data-kafka-zookeeper-0 + storageClassName: longhorn --- apiVersion: v1 kind: PersistentVolumeClaim @@ -198,8 +134,7 @@ spec: resources: requests: storage: 10Gi - storageClassName: local-path - volumeName: data-kafka-zookeeper-1 + storageClassName: longhorn --- apiVersion: v1 kind: PersistentVolumeClaim @@ -212,5 +147,4 @@ spec: resources: requests: storage: 10Gi - storageClassName: local-path - volumeName: data-kafka-zookeeper-2 + storageClassName: longhorn diff --git a/kafka/kafka/charts/zookeeper/values.yaml b/kafka/kafka/charts/zookeeper/values.yaml index c2763e3..53e5d5b 100644 --- a/kafka/kafka/charts/zookeeper/values.yaml +++ b/kafka/kafka/charts/zookeeper/values.yaml @@ -790,7 +790,13 @@ volumePermissions: ## cpu: 3 ## memory: 1024Mi ## - resources: {} + resources: + limits: + cpu: 1 + memory: 2Gi + requests: + cpu: 1 + memory: 2Gi ## Init container' Security Context ## Note: the chown of the data folder is done to containerSecurityContext.runAsUser ## and not the below volumePermissions.containerSecurityContext.runAsUser diff --git a/kafka/kafka/values.yaml b/kafka/kafka/values.yaml index 2251222..3de6c0c 100644 --- a/kafka/kafka/values.yaml +++ b/kafka/kafka/values.yaml @@ -1021,7 +1021,13 @@ broker: ## cpu: 3 ## memory: 1024Mi ## - resources: {} + resources: + requests: + cpu: 1 + memory: 2Gi + limits: + cpu: 1 + memory: 2Gi ## Kafka pods' Security Context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod ## @param broker.podSecurityContext.enabled Enable security context for the pods diff --git a/metric-server/metric-server.yaml b/metric-server/metric-server.yaml index 786018e..9e0edbf 100644 --- a/metric-server/metric-server.yaml +++ b/metric-server/metric-server.yaml @@ -162,8 +162,11 @@ spec: periodSeconds: 10 resources: requests: - cpu: 100m - memory: 200Mi + cpu: 1 + memory: "2Gi" + limits: + cpu: 1 + memory: "2Gi" securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/scheduled-client/deployment.yaml b/scheduled-client/deployment.yaml index bd901af..be648e0 100644 --- a/scheduled-client/deployment.yaml +++ b/scheduled-client/deployment.yaml @@ -1,25 +1,15 @@ -apiVersion: v1 -kind: PersistentVolume -metadata: - name: data-mef-pv -spec: - capacity: - storage: 10Gi - volumeMode: Filesystem - storageClassName: local-path - accessModes: - - ReadWriteOnce - local: - path: /home/ubuntu/volume/tm-gla/mef - nodeAffinity: - required: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - glaciation-sogei-worker101 ---- +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: data-mef-pv +# spec: +# capacity: +# storage: 10Gi +# volumeMode: Filesystem +# storageClassName: longhorn +# accessModes: +# - ReadWriteOnce +# --- apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -30,8 +20,7 @@ spec: resources: requests: storage: 10Gi - storageClassName: local-path - volumeName: data-mef-pv + storageClassName: longhorn --- apiVersion: apps/v1 kind: Deployment @@ -51,6 +40,13 @@ spec: containers: - name: scheduled-client image: scheduled-client:latest + resources: + requests: + memory: "2Gi" + cpu: 1 + limits: + memory: "2Gi" + cpu: 1 imagePullPolicy: Never ports: - containerPort: 8080