myysophia commented on issue #13484:
URL: https://github.com/apache/iotdb/issues/13484#issuecomment-2434865708

   @SeanGaluzzi 
   you can try this yaml without configmap。
   - configNode
   `
   apiVersion: apps/v1
   kind: StatefulSet
   metadata:
     name: iotdb-confignode
     namespace: iotdb
   spec:
     replicas: 1
     revisionHistoryLimit: 10
     selector:
       matchLabels:
         app.kubernetes.io/instance: iotdb-cn1.3
         app.kubernetes.io/name: iotdb-confignode
     serviceName: iotdb-confignode
     template:
       metadata:
         creationTimestamp: null
         labels:
           app.kubernetes.io/instance: iotdb-cn1.3
           app.kubernetes.io/name: iotdb-confignode
       spec:
         affinity:
           podAntiAffinity:
             requiredDuringSchedulingIgnoredDuringExecution:
             - labelSelector:
                 matchExpressions:
                 - key: app.kubernetes.io/name
                   operator: In
                   values:
                   - iotdb-confignode
               topologyKey: kubernetes.io/hostname
         containers:
         - env:
           - name: MY_NS_NAME
             valueFrom:
               fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.namespace
           - name: MY_POD_NAME
             valueFrom:
               fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.name
           - name: cn_internal_address
             value: 
$(MY_POD_NAME).iotdb-confignode.$(MY_NS_NAME).svc.cluster.local
           - name: cn_seed_config_node
             value: 
iotdb-confignode-0.iotdb-confignode.$(MY_NS_NAME).svc.cluster.local:10710
           - name: schema_replication_factor
             value: "1"
           - name: data_replication_factor
             value: "1"
           - name: cn_internal_port
             value: "10710"
           - name: cn_consensus_port
             value: "10720"
           - name: schema_region_consensus_protocol_class
             value: org.apache.iotdb.consensus.ratis.RatisConsensus
           - name: config_node_consensus_protocol_class
             value: org.apache.iotdb.consensus.ratis.RatisConsensus
           - name: data_region_consensus_protocol_class
             value: org.apache.iotdb.consensus.iot.IoTConsensus
           - name: cn_metric_reporter_list
             value: PROMETHEUS
           - name: cn_metric_level
             value: CORE
           - name: cn_metric_prometheus_reporter_port
             value: "9092"
           image: apache/iotdb:1.3.2-confignode
           imagePullPolicy: IfNotPresent
           name: iotdb-confignode
           ports:
           - containerPort: 10710
             name: tcp-10710
             protocol: TCP
           - containerPort: 10720
             name: tcp-10720
             protocol: TCP
           - containerPort: 10730
             name: tcp-10730
             protocol: TCP
           - containerPort: 10740
             name: tcp-10740
             protocol: TCP
           - containerPort: 9092
             name: tcp-9092
             protocol: TCP
           resources:
             limits:
               cpu: "1"
               memory: 2Gi
             requests:
               cpu: "1"
               memory: 1Gi
           terminationMessagePath: /dev/termination-log
           terminationMessagePolicy: File
           volumeMounts:
           - mountPath: /etc/localtime
             name: host-time
           - mountPath: /iotdb/data/
             name: iotdb-confignode-data
         dnsPolicy: ClusterFirst
         restartPolicy: Always
         schedulerName: default-scheduler
         securityContext: {}
         terminationGracePeriodSeconds: 30
         volumes:
         - hostPath:
             path: /etc/localtime
             type: ""
           name: host-time
     updateStrategy:
       rollingUpdate:
         partition: 0
       type: RollingUpdate
     volumeClaimTemplates:
     - apiVersion: v1
       kind: PersistentVolumeClaim
       metadata:
         creationTimestamp: null
         name: iotdb-confignode-data
       spec:
         accessModes:
         - ReadWriteOnce
         resources:
           requests:
             storage: 20Gi
         storageClassName: gp2
         volumeMode: Filesystem
   
   `
   - datanode
   `
   apiVersion: apps/v1
   kind: StatefulSet
   metadata:
     name: iotdb-datanode
     namespace: iotdb
   spec:
     replicas: 1
     revisionHistoryLimit: 10
     selector:
       matchLabels:
         app.kubernetes.io/instance: iotdb-dn1.3
         app.kubernetes.io/name: iotdb-datanode
     serviceName: iotdb-datanode
     template:
       metadata:
         annotations:
           kubectl.kubernetes.io/restartedAt: "2024-08-14T11:07:05+08:00"
         creationTimestamp: null
         labels:
           app.kubernetes.io/instance: iotdb-dn1.3
           app.kubernetes.io/name: iotdb-datanode
       spec:
         affinity:
           podAntiAffinity: {}
         containers:
         - env:
           - name: MY_POD_NAME
             valueFrom:
               fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.name
           - name: MY_NS_NAME
             valueFrom:
               fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.namespace
           - name: dn_rpc_address
             value: 
$(MY_POD_NAME).iotdb-datanode.$(MY_NS_NAME).svc.cluster.local
           - name: dn_internal_address
             value: 
$(MY_POD_NAME).iotdb-datanode.$(MY_NS_NAME).svc.cluster.local
           - name: dn_seed_config_node
             value: 
iotdb-confignode-0.iotdb-confignode.$(MY_NS_NAME).svc.cluster.local:10710
           - name: schema_replication_factor
             value: "1"
           - name: data_replication_factor
             value: "1"
           - name: dn_rpc_port
             value: "6667"
           - name: dn_mpp_data_exchange_port
             value: "10740"
           - name: dn_schema_region_consensus_port
             value: "10750"
           - name: dn_data_region_consensus_port
             value: "10760"
           - name: schema_region_consensus_protocol_class
             value: org.apache.iotdb.consensus.ratis.RatisConsensus
           - name: config_node_consensus_protocol_class
             value: org.apache.iotdb.consensus.ratis.RatisConsensus
           - name: data_region_consensus_protocol_class
             value: org.apache.iotdb.consensus.iot.IoTConsensus
           - name: enable_auto_create_schema
             value: "true"
           - name: dn_metric_reporter_list
             value: PROMETHEUS
           - name: dn_metric_level
             value: CORE
           - name: dn_metric_prometheus_reporter_port
             value: "9091"
           image: apache/iotdb:1.3.2-datanode
           imagePullPolicy: IfNotPresent
           name: iotdb-datanode
           ports:
           - containerPort: 10710
             name: tcp-10710
             protocol: TCP
           - containerPort: 10720
             name: tcp-10720
             protocol: TCP
           - containerPort: 10730
             name: tcp-10730
             protocol: TCP
           - containerPort: 10740
             name: tcp-10740
             protocol: TCP
           - containerPort: 6667
             name: tcp-6667
             protocol: TCP
           - containerPort: 9091
             name: tcp-9091
             protocol: TCP
           resources:
             limits:
               cpu: "1"
               memory: 4Gi
             requests:
               cpu: "1"
               memory: 1Gi
           terminationMessagePath: /dev/termination-log
           terminationMessagePolicy: File
           volumeMounts:
           - mountPath: /etc/localtime
             name: host-time
           - mountPath: /iotdb/data/
             name: iotdb-datanode-data
           - mountPath: /iotdb/conf/datanode-env.sh
             name: iotdb-datanode-env
             subPath: datanode-env.sh
         dnsPolicy: ClusterFirst
         restartPolicy: Always
         schedulerName: default-scheduler
         securityContext: {}
         terminationGracePeriodSeconds: 30
         volumes:
         - hostPath:
             path: /etc/localtime
             type: ""
           name: host-time
         - configMap:
             defaultMode: 420
             items:
             - key: datanode-env.sh
               path: datanode-env.sh
             name: iotdb-datanode-env
           name: iotdb-datanode-env
         - configMap:
             defaultMode: 420
             items:
             - key: iotdb-common.properties
               path: ' /iotdb/conf/iotdb-common.properties'
             name: iotdb-common-env
           name: iotdb-common-env
     updateStrategy:
       rollingUpdate:
         partition: 0
       type: RollingUpdate
     volumeClaimTemplates:
     - apiVersion: v1
       kind: PersistentVolumeClaim
       metadata:
         creationTimestamp: null
         name: iotdb-datanode-data
       spec:
         accessModes:
         - ReadWriteOnce
         resources:
           requests:
             storage: 20Gi
         storageClassName: gp2
         volumeMode: Filesystem
   
   `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to