Skip to content

Use subpath instead of initContianer copy shell script  #12

@J1a-wei

Description

@J1a-wei

Hi, I'm little curious about initContainer logic (e.g. lotus).

Can I use subPath mount config toml file Instead of initContainer?

apiVersion: apps/v1
kind: StatefulSet
spec:
  template:
    spec:
      containers:
      - args:
        - lotus
        - daemon
        env:
        - name: LOTUS_PATH
          value: /home/filecoin/kotal-data
        - name: GOLOG_LOG_LEVEL
          value: info
        imagePullPolicy: IfNotPresent
        name: node
        volumeMounts:
        - mountPath: /home/filecoin/kotal-data
          name: data
        - mountPath: /home/filecoin/kotal-data/config.toml
          name: config
          subPath: config.toml
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: filecoin-mainnet-ckeil8ouci5s
      - configMap:
          defaultMode: 420
          name: filecoin-mainnet-ckeil8ouci5s
        name: config

I tested it , it works well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions