Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initContainer support #227

Merged
merged 3 commits into from
Apr 4, 2024

Conversation

zfalen
Copy link

@zfalen zfalen commented Apr 3, 2024

Pull Request

Related issue

Fixes #226

What does this PR do?

  • Enables support for initContainers consistent with enablement for containers and volumes etc

Example

I was able to create an initContainer pattern that pulled a .dump file from S3 and mounted it into the Meili pod using the following values:

initContainers:
  - name: aws-copy
    image: amazon/aws-cli
    envFrom:
      - configMapRef:
          name: env-with-s3-creds
    command:
      - "/bin/sh"
      - "-c"
      - aws s3 cp "s3://$S3_BUCKET/meilisearch_dumps" /meili_data/dumps --recursive
    volumeMounts:
      - name: meili-dumps
        mountPath: /meili_data/dumps
volumes:
  - name: meili-dumps
    emptyDir: {}
volumeMounts:
  - name: meili-dumps
    mountPath: /meili_data/dumps
environment:
  MEILI_IMPORT_DUMP: /meili_data/dumps/myClonedDumpFile.dump
  MEILI_ENV: development
  MEILI_MASTER_KEY: someReallyCoolKeyAlsoWookiesRule
  MEILI_NO_ANALYTICS: true

PR checklist

Please check if your PR fulfills the following requirements:

  • [ X ] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • [ X ] Have you read the contributing guidelines?
  • [ X ] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@zfalen
Copy link
Author

zfalen commented Apr 3, 2024

My prettier config messed some formatting up it looks like. We can resolve prior to merge.

@brunoocasali
Copy link
Member

@meilisearch sync-manifest

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@brunoocasali brunoocasali added the enhancement New feature or request label Apr 4, 2024
Copy link
Contributor

meili-bors bot commented Apr 4, 2024

Build succeeded:

@meili-bors meili-bors bot merged commit 328d981 into meilisearch:main Apr 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chart Support for initContainers
3 participants