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

Feature idea: Custom Sidecars #204

Open
cognifloyd opened this issue Jun 22, 2021 · 0 comments
Open

Feature idea: Custom Sidecars #204

cognifloyd opened this issue Jun 22, 2021 · 0 comments

Comments

@cognifloyd
Copy link
Member

It might be useful to allow adding custom sidecars to our pods similar to how the prometheus chart does. The prometheus chart also allows templating of the sidecar values, which I'm on the fence about:

in the deployment

      containers:
        - name: ... # the primary container
          ...
      {{- if .Values.server.sidecarContainers }}
        {{- range $name, $spec :=  .Values.server.sidecarContainers }}
        - name: {{ $name }}
          {{- if kindIs "string" $spec }}
            {{- tpl $spec $ | nindent 10 }}
          {{- else }}
            {{- toYaml $spec | nindent 10 }}
          {{- end }}
        {{- end }}
      {{- end }}

in values.yaml

  # sidecarContainers - add more containers to prometheus server
  # Key/Value where Key is the sidecar `- name: <Key>`
  # Example:
  #   sidecarContainers:
  #      webserver:
  #        image: nginx
  sidecarContainers: {}

  # sidecarTemplateValues - context to be used in template for sidecarContainers
  # Example:
  #   sidecarTemplateValues: *your-custom-globals
  #   sidecarContainers:
  #     webserver: |-
  #       {{ include "webserver-container-template" . }}
  # Template for `webserver-container-template` might looks like this:
  #   image: "{{ .Values.server.sidecarTemplateValues.repository }}:{{ .Values.server.sidecarTemplateValues.tag }}"
  #   ...
  #
  sidecarTemplateValues: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant