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

Provide default images and volume mounts to user-provided init containers #1022

Merged
merged 1 commit into from Jun 10, 2019

Commits on Jun 7, 2019

  1. Provide default images and volume mounts to user-provided init contai…

    …ners.
    
    This makes the user-provided init containers run after our built-ins,
    meaning the user-provided init containers gets the final say on what
    the environment is going to look like.
    
    It defaults the init container image to the ES container image for convenience.
    
    The Volume mounts for the ES container is appended to the init containers
    volume mounts, with the result being that a simple init container will
    run in the same context as Elasticsearch (with a notable exception of
    environment variables)
    
    This change facilitates use cases such as installing custom plugins:
    
    ```yaml
    apiVersion: elasticsearch.k8s.elastic.co/v1alpha1
    kind: Elasticsearch
    metadata:
      name: elasticsearch-sample
    spec:
      version: "7.1.0"
      nodes:
      - podTemplate:
          spec:
            initContainers:
            - name: install-plugins
              command:
              - sh
              - -c
              - |
                bin/elasticsearch-plugin install --batch repository-azure
        nodeCount: 1
    ```
    nkvoll committed Jun 7, 2019
    Copy the full SHA
    2c0af65 View commit details
    Browse the repository at this point in the history