radondb-mysql-kubernetes icon indicating copy to clipboard operation
radondb-mysql-kubernetes copied to clipboard

Does support docker-entrypoint-initdb.d in MysqlCluster CRD?

Open zengzhengrong opened this issue 3 years ago • 1 comments

I want to init my cluster db like this:

spec:
  initContainers:
    - name: wait-for-data
      image: alpine:3.9
      command:
        - "wget"
        - "--no-check-certificate"
        - "https://raw.githubusercontent.com/rnmulchandani/postgres-sample-data/master/employee_sample_data.sql"
        - "-O"
        - "/docker-entrypoint-initdb.d/ employee_sample_data.sql"
      volumeMounts:
        - mountPath: /docker-entrypoint-initdb.d
          name: sample-data
  containers:
    - name: postgres-with-data
      image: postgres
      env:
        - name: POSTGRES_HOST
          value: postgres
        - name: POSTGRES_PORT
          value: "5432"
        - name: POSTGRES_PASSWORD
          value: "a"
      volumeMounts:
        - mountPath: /docker-entrypoint-initdb.d
          name: sample-data
  volumes:
    - emptyDir: {}
      name: sample-data

zengzhengrong avatar Oct 15 '22 02:10 zengzhengrong

it doesn't support now, We'll consider your advices.

acekingke avatar Oct 19 '22 06:10 acekingke