Skip to content

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

Open
@zengzhengrong

Description

@zengzhengrong

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions