github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/kube/bundle.yaml (about)

     1  # AUTOMATICALLY GENERATED (build_bundle.sh) - DO NOT EDIT
     2  ---
     3  apiVersion: v1
     4  kind: Namespace
     5  metadata:
     6    name: m3db
     7  ---
     8  apiVersion: v1
     9  kind: Service
    10  metadata:
    11    name: etcd
    12    labels:
    13      app: etcd
    14    namespace: m3db
    15  spec:
    16    ports:
    17    - port: 2379
    18      name: client
    19    - port: 2380
    20      name: peer
    21    clusterIP: None
    22    selector:
    23      app: etcd
    24  ---
    25  apiVersion: v1
    26  kind: Service
    27  metadata:
    28    name: etcd-cluster
    29    labels:
    30      app: etcd
    31    namespace: m3db
    32  spec:
    33    selector:
    34      app: etcd
    35    ports:
    36    - port: 2379
    37      protocol: TCP
    38    type: ClusterIP
    39  ---
    40  apiVersion: apps/v1
    41  kind: StatefulSet
    42  metadata:
    43    name: etcd
    44    labels:
    45      app: etcd
    46    namespace: m3db
    47  spec:
    48    serviceName: "etcd"
    49    replicas: 3
    50    selector:
    51      matchLabels:
    52        app: etcd
    53    template:
    54      metadata:
    55        labels:
    56          app: etcd
    57      spec:
    58        containers:
    59        - name: etcd
    60          image: quay.io/coreos/etcd:v3.4.3
    61          command:
    62          - "etcd"
    63          - "--name"
    64          - "$(MY_POD_NAME)"
    65          - "--listen-peer-urls"
    66          - "http://$(MY_IP):2380"
    67          - "--listen-client-urls"
    68          - "http://$(MY_IP):2379,http://127.0.0.1:2379"
    69          - "--advertise-client-urls"
    70          - "http://$(MY_POD_NAME).etcd:2379"
    71          - "--initial-cluster-token"
    72          - "etcd-cluster-1"
    73          - "--initial-advertise-peer-urls"
    74          - "http://$(MY_POD_NAME).etcd:2380"
    75          - "--initial-cluster"
    76          - "etcd-0=http://etcd-0.etcd:2380,etcd-1=http://etcd-1.etcd:2380,etcd-2=http://etcd-2.etcd:2380"
    77          - "--initial-cluster-state"
    78          - "new"
    79          - "--data-dir"
    80          - "/var/lib/etcd"
    81          ports:
    82          - containerPort: 2379
    83            name: client
    84          - containerPort: 2380
    85            name: peer
    86          volumeMounts:
    87          - name: etcd-data
    88            mountPath: /var/lib/etcd
    89          env:
    90          - name: MY_IP
    91            valueFrom:
    92              fieldRef:
    93                fieldPath: status.podIP
    94          - name: MY_POD_NAME
    95            valueFrom:
    96              fieldRef:
    97                fieldPath: metadata.name
    98          - name: ETCDCTL_API
    99            value: "3"
   100    volumeClaimTemplates:
   101      - metadata:
   102          name: etcd-data
   103        spec:
   104          accessModes:
   105            - ReadWriteOnce
   106          storageClassName: fast
   107          resources:
   108            requests:
   109              storage: 50Gi
   110  ---
   111  apiVersion: v1
   112  kind: ConfigMap
   113  metadata:
   114    name: m3dbnode-config
   115    namespace: m3db
   116  data:
   117    m3dbnode.yml: |+
   118      coordinator:
   119        listenAddress: 0.0.0.0:7201
   120        logging:
   121          level: info
   122        metrics:
   123          scope:
   124            prefix: "coordinator"
   125          prometheus:
   126            handlerPath: /metrics
   127            listenAddress: 0.0.0.0:7203
   128          sanitization: prometheus
   129          samplingRate: 1.0
   130          extended: none
   131        tagOptions:
   132          idScheme: quoted
   133  
   134      db:
   135        logging:
   136          level: info
   137  
   138        metrics:
   139          prometheus:
   140            handlerPath: /metrics
   141          sanitization: prometheus
   142          samplingRate: 1.0
   143          extended: detailed
   144  
   145        listenAddress: 0.0.0.0:9000
   146        clusterListenAddress: 0.0.0.0:9001
   147        httpNodeListenAddress: 0.0.0.0:9002
   148        httpClusterListenAddress: 0.0.0.0:9003
   149        debugListenAddress: 0.0.0.0:9004
   150  
   151        hostID:
   152          resolver: hostname
   153  
   154        client:
   155          writeConsistencyLevel: majority
   156          readConsistencyLevel: unstrict_majority
   157  
   158        gcPercentage: 100
   159  
   160        writeNewSeriesAsync: true
   161        writeNewSeriesBackoffDuration: 2ms
   162  
   163        commitlog:
   164          flushMaxBytes: 524288
   165          flushEvery: 1s
   166          queue:
   167            calculationType: fixed
   168            size: 2097152
   169  
   170        filesystem:
   171          filePathPrefix: /var/lib/m3db
   172  
   173        discovery:
   174          config:
   175            service:
   176                env: default_env
   177                zone: embedded
   178                service: m3db
   179                cacheDir: /var/lib/m3kv
   180                etcdClusters:
   181                - zone: embedded
   182                  endpoints:
   183                  - http://etcd-0.etcd:2379
   184                  - http://etcd-1.etcd:2379
   185                  - http://etcd-2.etcd:2379
   186  ---
   187  # Headless service for the statefulset
   188  apiVersion: v1
   189  kind: Service
   190  metadata:
   191    name: m3dbnode
   192    labels:
   193      app: m3dbnode
   194    namespace: m3db
   195  spec:
   196    ports:
   197    - port: 9000
   198      name: client
   199    - port: 9001
   200      name: cluster
   201    - port: 9002
   202      name: http-node
   203    - port: 9003
   204      name: http-cluster
   205    - port: 9004
   206      name: debug
   207    - port: 7201
   208      name: coordinator
   209    - port: 7203
   210      name: coordinator-metrics
   211    # NOTE: There MUST be a headless (clusterIP == None) service with name equal
   212    # to the `spec.serviceName` field of the stateful set. Search "headless" on
   213    # https://v1-10.docs.kubernetes.io/docs/concepts/workloads/controllers/statefulset/
   214    # for more info
   215    clusterIP: None
   216    selector:
   217      app: m3dbnode
   218  ---
   219  apiVersion: v1
   220  kind: Service
   221  metadata:
   222    name: m3coordinator
   223    labels:
   224      app: m3dbnode
   225    namespace: m3db
   226  spec:
   227    selector:
   228      app: m3dbnode
   229    ports:
   230    - port: 7201
   231      name: coordinator
   232    - port: 7203
   233      name: coordinator-metrics
   234  ---
   235  apiVersion: apps/v1
   236  kind: StatefulSet
   237  metadata:
   238    labels:
   239      app: m3dbnode
   240    name: m3dbnode
   241    namespace: m3db
   242  spec:
   243    serviceName: m3dbnode
   244    replicas: 3
   245    selector:
   246      matchLabels:
   247        app: m3dbnode
   248    updateStrategy:
   249      type: RollingUpdate
   250    template:
   251      metadata:
   252        labels:
   253          app: m3dbnode
   254      spec:
   255        tolerations:
   256          - key: "dedicated-m3db"
   257            effect: NoSchedule
   258            operator: Exists
   259        affinity:
   260          nodeAffinity:
   261            preferredDuringSchedulingIgnoredDuringExecution:
   262            - preference:
   263                matchExpressions:
   264                - key: m3db.io/dedicated-m3db
   265                  operator: In
   266                  values:
   267                    - "true"
   268              weight: 10
   269        containers:
   270        - name: m3db
   271          image: quay.io/m3/m3dbnode:latest
   272          # Allows m3dbnode to raise its own file limits. Comment this out if you
   273          # have a restrictive Pod Security Policy or similar enforcement
   274          # mechanisms.
   275          securityContext:
   276            capabilities:
   277              add:
   278              - SYS_RESOURCE
   279          imagePullPolicy: Always
   280          # resources:
   281          #   limits:
   282          #     memory: 15Gi
   283          #   requests:
   284          #     memory: 10Gi
   285          args:
   286            - "-f"
   287            - "/etc/m3db/m3dbnode.yml"
   288          volumeMounts:
   289          - name: config-vol
   290            mountPath: /etc/m3db/
   291          - name: m3db-db
   292            mountPath: /var/lib/m3db
   293          ports:
   294          - containerPort: 9000
   295            name: client
   296            protocol: TCP
   297          - containerPort: 9001
   298            name: cluster
   299            protocol: TCP
   300          - containerPort: 9002
   301            name: http-node
   302            protocol: TCP
   303          - containerPort: 9003
   304            name: http-cluster
   305            protocol: TCP
   306          - containerPort: 9004
   307            name: debug
   308            protocol: TCP
   309          - containerPort: 7201
   310            name: coordinator
   311            protocol: TCP
   312          - containerPort: 7203
   313            # max name length == 15 chars
   314            name: coord-metrics
   315            protocol: TCP
   316        volumes:
   317        - name: config-vol
   318          configMap:
   319            name: m3dbnode-config
   320        dnsPolicy: ClusterFirst
   321        restartPolicy: Always
   322        schedulerName: default-scheduler
   323        securityContext: {}
   324        terminationGracePeriodSeconds: 30
   325    volumeClaimTemplates:
   326      - metadata:
   327          name: m3db-db
   328        spec:
   329          accessModes:
   330            - ReadWriteOnce
   331          storageClassName: fast
   332          resources:
   333            requests:
   334              storage: 200Gi
   335  ---