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 the ability to specify volumes and containers #113

Closed
Tracked by #109
kvaps opened this issue Apr 2, 2024 · 1 comment · Fixed by #120
Closed
Tracked by #109

Add the ability to specify volumes and containers #113

kvaps opened this issue Apr 2, 2024 · 1 comment · Fixed by #120
Assignees
Milestone

Comments

@kvaps
Copy link
Member

kvaps commented Apr 2, 2024

As part of #109

containers and volumes specified in a template should be merged using strategic merge patch, for example:

apiVersion: etcd.aenix.io/v1alpha1
kind: EtcdCluster
metadata:
  name: test
  namespace: default
spec:
  replicas: 3
  options: # map[string]string
    arg1: "value1"
    arg2: "value2"
  podTemplate:
    spec:
      containers: # []v1.Container
      - name: etcd
        volumeMounts:
        - name: test
          mountPath: /data/demo
      - name: exporter
        image: alpine
        args:
        - sleep
        - infinity
        volumeMounts:
        - name: test
          mountPath: /data/demo
      volumes: # []v1.Volume
      - name: test
        emptyDir: {}

should create a Pod with two containers: etcd and exporter and the same volume shared between them

@kvaps
Copy link
Member Author

kvaps commented Apr 3, 2024

Internally agreed to merge podTemplate as lower level and generated object as upper layer.
Currently it looks like more safe design. We can always change this behavior later.

@kvaps kvaps modified the milestones: v0.1.0, v0.2.0 Apr 3, 2024
sircthulhu added a commit that referenced this issue Apr 4, 2024
There's obvious constraint: user cannot add PVC's with `ReadWriteOnce`
or `ReadWriteOncePod` to pods as they should be included in
statefulset's volumeClaimTemplates or should have extra option in case
of custom pod controller

fixes #113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants