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 Support for custom sidecars and initContainers #158

Closed
samir-gandhi opened this issue Jun 23, 2021 · 0 comments · Fixed by #161
Closed

Add Support for custom sidecars and initContainers #158

samir-gandhi opened this issue Jun 23, 2021 · 0 comments · Fixed by #161
Assignees
Labels
enhancement New feature or request

Comments

@samir-gandhi
Copy link
Contributor

samir-gandhi commented Jun 23, 2021

Sidecars and initContainers are valuable for a multitude of reasons - log forwarding, metric exporting, backup jobs. Because of this they can also have many ways of being configured.

So for our first foray into sidecars with helm, it would be nice to just have the option available and nonlimiting.

Allow for defining three top level maps to provide details for:

  • sidecars
  • initContainers
  • volumes

Examples include:

sidecars:
  pd-access-logger:
    name: pd-access-log-container
    image: pingidentity/pingtoolkit:2105
    volumeMounts:
      - mountPath: /tmp/pd-access-logs/
        name: pd-access-logs
        readOnly: false
  statsd-exporter:
    name: statsd-exporter
    image: prom/statsd-exporter:v0.14.1
    args:
    - "--statsd.mapping-config=/tmp/mapping/statsd-mapping.yml"
    - "--statsd.listen-udp=:8125"
    - "--web.listen-address=:9102"
    ports:
      - containerPort: 9102
        protocol: TCP
      - containerPort: 8125
        protocol: UDP

initContainers:
  init-1:
    name: 01-init
    image: pingidentity/pingtoolkit:2105
    command: ['sh', '-c', 'echo "Initing 1" && touch /tmp/pd-access-logs/init-1']
    volumeMounts:
      - mountPath: /tmp/pd-access-logs/
        name: pd-access-logs
        readOnly: false

volumes:
  pd-access-logs:
    emptyDir: {}
  statsd-mapping:
    configMap:
      name: statsd-config
      items:
        - key: config
          path: statsd-mapping.yml

And within the product definition, allow for 3 includes:

  • includeSidecars
  • includeInitContainers
  • includeVolumes
pingdirectory:
  enabled: false
  name: pingdirectory
  volumeMounts:
    - mountPath: /opt/access-logs/
      name: pd-access-logs
  includeSidecars:
    - pd-access-logger
  includeInitContainers:
    - init-1
  includeVolumes:
    - pd-access-logs
@samir-gandhi samir-gandhi changed the title Add Option for Sidecars Add Support for Sidecars Jun 23, 2021
@samir-gandhi samir-gandhi added the enhancement New feature or request label Jun 23, 2021
@tsigle tsigle changed the title Add Support for Sidecars Add Support for custom sidecars and initContainers Jun 30, 2021
@pingidentity pingidentity deleted a comment from samir-gandhi Jun 30, 2021
@tsigle tsigle self-assigned this Jun 30, 2021
@tsigle tsigle mentioned this issue Jul 1, 2021
@tsigle tsigle linked a pull request Jul 1, 2021 that will close this issue
tsigle added a commit that referenced this issue Jul 1, 2021
* Issue #158 - Adding suport for sidecars, initContainers and volumes

* Release 0.6.4 index.yaml
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 a pull request may close this issue.

2 participants